dart-tools 0.7.1__py3-none-any.whl → 0.7.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dart-tools might be problematic. Click here for more details.

Files changed (37) hide show
  1. dart/dart.py +1 -1
  2. dart/generated/api/config/get_config.py +11 -14
  3. dart/generated/api/dartboard/retrieve_dartboard.py +6 -1
  4. dart/generated/api/doc/delete_doc.py +6 -1
  5. dart/generated/api/doc/list_docs.py +12 -4
  6. dart/generated/api/doc/retrieve_doc.py +6 -1
  7. dart/generated/api/doc/update_doc.py +6 -1
  8. dart/generated/api/folder/retrieve_folder.py +6 -1
  9. dart/generated/api/task/delete_task.py +6 -1
  10. dart/generated/api/task/list_tasks.py +48 -40
  11. dart/generated/api/task/retrieve_task.py +6 -1
  12. dart/generated/api/task/update_task.py +6 -1
  13. dart/generated/api/view/retrieve_view.py +6 -1
  14. dart/generated/models/__init__.py +42 -0
  15. dart/generated/models/concise_task.py +78 -17
  16. dart/generated/models/custom_properties.py +131 -0
  17. dart/generated/models/task.py +78 -17
  18. dart/generated/models/task_create.py +76 -25
  19. dart/generated/models/task_update.py +76 -25
  20. dart/generated/models/user_space_configuration.py +276 -5
  21. dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +74 -0
  22. dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +82 -0
  23. dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +82 -0
  24. dart/generated/models/user_space_configuration_custom_property_number_type_def.py +86 -0
  25. dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +10 -0
  26. dart/generated/models/user_space_configuration_custom_property_select_type_def.py +82 -0
  27. dart/generated/models/user_space_configuration_custom_property_status_type_def.py +74 -0
  28. dart/generated/models/user_space_configuration_custom_property_text_type_def.py +74 -0
  29. dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +74 -0
  30. dart/generated/models/user_space_configuration_custom_property_user_type_def.py +82 -0
  31. {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/METADATA +7 -7
  32. {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/RECORD +36 -26
  33. {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/WHEEL +1 -1
  34. {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/licenses/LICENSE +1 -1
  35. dart/generated/py.typed +0 -1
  36. {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/entry_points.txt +0 -0
  37. {dart_tools-0.7.1.dist-info → dart_tools-0.7.3.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union, cast
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -7,6 +7,10 @@ from attrs import field as _attrs_field
7
7
  from ..models.priority import Priority
8
8
  from ..types import UNSET, Unset
9
9
 
10
+ if TYPE_CHECKING:
11
+ from ..models.custom_properties import CustomProperties
12
+
13
+
10
14
  T = TypeVar("T", bound="ConciseTask")
11
15
 
12
16
 
@@ -22,8 +26,8 @@ class ConciseTask:
22
26
  dartboard (str): The full title of the dartboard, which is a project or list of tasks.
23
27
  type_ (str): The title of the type of the task.
24
28
  status (str): The status from the list of available statuses.
25
- assignees (Union[Unset, list[str]]): The names or emails of the users that the task is assigned to. Either this
26
- or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
29
+ assignees (Union[None, Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
30
+ this or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
27
31
  assignee (Union[None, Unset, str]): The name or email of the user that the task is assigned to. Either this or
28
32
  assignees must be included, depending on whether the workspaces allows multiple assignees or not.
29
33
  tags (Union[Unset, list[str]]): Any tags that should be applied to the task, which can be used to filter and
@@ -31,14 +35,16 @@ class ConciseTask:
31
35
  be short and descriptive. This list can be empty.
32
36
  priority (Union[None, Priority, Unset]): The priority, which is a string that can be one of the specified
33
37
  options. This is used to sort tasks and determine which tasks should be done first.
34
- start_at (Union[None, Unset, str]): The start date, which is a date and time that the task should be started by
35
- in ISO format. It should be at 9:00am in the timezone of the user.
36
- due_at (Union[None, Unset, str]): The due date, which is a date and time that the task should be completed by in
37
- ISO format. It should be at 9:00am in the timezone of the user.
38
- size (Union[None, Unset, int]): The size, which is a number that represents the amount of work that needs to be
39
- done. This is used to determine how long the task will take to complete.
38
+ start_at (Union[None, Unset, str]): The start date, which is a date that the task should be started by in ISO
39
+ format, like YYYY-MM-DD.
40
+ due_at (Union[None, Unset, str]): The due date, which is a date that the task should be completed by in ISO
41
+ format, like YYYY-MM-DD.
42
+ size (Union[None, Unset, int, str]): The size, which represents the amount of work that needs to be done. This
43
+ is used to determine how long the task will take to complete.
40
44
  time_tracking (Union[Unset, str]): The time tracking, which is a string that indicates the amount of time spent
41
45
  on the task in hh:mm:ss format (or an empty string if no time has been tracked).
46
+ custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
47
+ properties that are associated with the task.
42
48
  """
43
49
 
44
50
  id: str
@@ -48,17 +54,20 @@ class ConciseTask:
48
54
  dartboard: str
49
55
  type_: str
50
56
  status: str
51
- assignees: Union[Unset, list[str]] = UNSET
57
+ assignees: Union[None, Unset, list[str]] = UNSET
52
58
  assignee: Union[None, Unset, str] = UNSET
53
59
  tags: Union[Unset, list[str]] = UNSET
54
60
  priority: Union[None, Priority, Unset] = UNSET
55
61
  start_at: Union[None, Unset, str] = UNSET
56
62
  due_at: Union[None, Unset, str] = UNSET
57
- size: Union[None, Unset, int] = UNSET
63
+ size: Union[None, Unset, int, str] = UNSET
58
64
  time_tracking: Union[Unset, str] = UNSET
65
+ custom_properties: Union["CustomProperties", None, Unset] = UNSET
59
66
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
60
67
 
61
68
  def to_dict(self) -> dict[str, Any]:
69
+ from ..models.custom_properties import CustomProperties
70
+
62
71
  id = self.id
63
72
 
64
73
  html_url = self.html_url
@@ -74,8 +83,13 @@ class ConciseTask:
74
83
 
75
84
  status = self.status
76
85
 
77
- assignees: Union[Unset, list[str]] = UNSET
78
- if not isinstance(self.assignees, Unset):
86
+ assignees: Union[None, Unset, list[str]]
87
+ if isinstance(self.assignees, Unset):
88
+ assignees = UNSET
89
+ elif isinstance(self.assignees, list):
90
+ assignees = self.assignees
91
+
92
+ else:
79
93
  assignees = self.assignees
80
94
 
81
95
  assignee: Union[None, Unset, str]
@@ -108,7 +122,7 @@ class ConciseTask:
108
122
  else:
109
123
  due_at = self.due_at
110
124
 
111
- size: Union[None, Unset, int]
125
+ size: Union[None, Unset, int, str]
112
126
  if isinstance(self.size, Unset):
113
127
  size = UNSET
114
128
  else:
@@ -116,6 +130,14 @@ class ConciseTask:
116
130
 
117
131
  time_tracking = self.time_tracking
118
132
 
133
+ custom_properties: Union[None, Unset, dict[str, Any]]
134
+ if isinstance(self.custom_properties, Unset):
135
+ custom_properties = UNSET
136
+ elif isinstance(self.custom_properties, CustomProperties):
137
+ custom_properties = self.custom_properties.to_dict()
138
+ else:
139
+ custom_properties = self.custom_properties
140
+
119
141
  field_dict: dict[str, Any] = {}
120
142
  field_dict.update(self.additional_properties)
121
143
  field_dict.update(
@@ -145,11 +167,15 @@ class ConciseTask:
145
167
  field_dict["size"] = size
146
168
  if time_tracking is not UNSET:
147
169
  field_dict["timeTracking"] = time_tracking
170
+ if custom_properties is not UNSET:
171
+ field_dict["customProperties"] = custom_properties
148
172
 
149
173
  return field_dict
150
174
 
151
175
  @classmethod
152
176
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
177
+ from ..models.custom_properties import CustomProperties
178
+
153
179
  d = dict(src_dict)
154
180
  id = d.pop("id")
155
181
 
@@ -170,7 +196,22 @@ class ConciseTask:
170
196
 
171
197
  status = d.pop("status")
172
198
 
173
- assignees = cast(list[str], d.pop("assignees", UNSET))
199
+ def _parse_assignees(data: object) -> Union[None, Unset, list[str]]:
200
+ if data is None:
201
+ return data
202
+ if isinstance(data, Unset):
203
+ return data
204
+ try:
205
+ if not isinstance(data, list):
206
+ raise TypeError()
207
+ assignees_type_0 = cast(list[str], data)
208
+
209
+ return assignees_type_0
210
+ except: # noqa: E722
211
+ pass
212
+ return cast(Union[None, Unset, list[str]], data)
213
+
214
+ assignees = _parse_assignees(d.pop("assignees", UNSET))
174
215
 
175
216
  def _parse_assignee(data: object) -> Union[None, Unset, str]:
176
217
  if data is None:
@@ -218,17 +259,36 @@ class ConciseTask:
218
259
 
219
260
  due_at = _parse_due_at(d.pop("dueAt", UNSET))
220
261
 
221
- def _parse_size(data: object) -> Union[None, Unset, int]:
262
+ def _parse_size(data: object) -> Union[None, Unset, int, str]:
222
263
  if data is None:
223
264
  return data
224
265
  if isinstance(data, Unset):
225
266
  return data
226
- return cast(Union[None, Unset, int], data)
267
+ return cast(Union[None, Unset, int, str], data)
227
268
 
228
269
  size = _parse_size(d.pop("size", UNSET))
229
270
 
230
271
  time_tracking = d.pop("timeTracking", UNSET)
231
272
 
273
+ def _parse_custom_properties(
274
+ data: object,
275
+ ) -> Union["CustomProperties", None, Unset]:
276
+ if data is None:
277
+ return data
278
+ if isinstance(data, Unset):
279
+ return data
280
+ try:
281
+ if not isinstance(data, dict):
282
+ raise TypeError()
283
+ custom_properties_type_0 = CustomProperties.from_dict(data)
284
+
285
+ return custom_properties_type_0
286
+ except: # noqa: E722
287
+ pass
288
+ return cast(Union["CustomProperties", None, Unset], data)
289
+
290
+ custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
291
+
232
292
  concise_task = cls(
233
293
  id=id,
234
294
  html_url=html_url,
@@ -245,6 +305,7 @@ class ConciseTask:
245
305
  due_at=due_at,
246
306
  size=size,
247
307
  time_tracking=time_tracking,
308
+ custom_properties=custom_properties,
248
309
  )
249
310
 
250
311
  concise_task.additional_properties = d
@@ -0,0 +1,131 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="CustomProperties")
8
+
9
+
10
+ @_attrs_define
11
+ class CustomProperties:
12
+ """
13
+ Example:
14
+ {'customCheckboxProperty': True, 'customDatesProperty': '2025-05-10', 'customDatesPropertyWithRange':
15
+ ['2025-05-01', '2025-05-30'], 'customMultiselectProperty': ['frontend', 'bug'],
16
+ 'customNumberPropertyWithIntegerFormat': 5, 'customNumberPropertyWithPercentageFormat': 75,
17
+ 'customNumberPropertyWithDollarsFormat': 1500.5, 'customSelectProperty': 'In Progress', 'customStatusProperty':
18
+ 'Blocked', 'customTextProperty': 'This task requires additional review from the design team',
19
+ 'customUserProperty': 'john.doe@example.com', 'customMultipleUserProperty': ['john.doe@example.com', 'Alice
20
+ Smith']}
21
+
22
+ """
23
+
24
+ additional_properties: dict[str, Union[None, bool, float, list[Union[None, str]], list[str], str]] = _attrs_field(
25
+ init=False, factory=dict
26
+ )
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ field_dict: dict[str, Any] = {}
30
+ for prop_name, prop in self.additional_properties.items():
31
+ if isinstance(prop, list):
32
+ field_dict[prop_name] = []
33
+ for additional_property_type_1_type_0_item_data in prop:
34
+ additional_property_type_1_type_0_item: Union[None, str]
35
+ additional_property_type_1_type_0_item = additional_property_type_1_type_0_item_data
36
+ field_dict[prop_name].append(additional_property_type_1_type_0_item)
37
+
38
+ elif isinstance(prop, list):
39
+ field_dict[prop_name] = prop
40
+
41
+ elif isinstance(prop, list):
42
+ field_dict[prop_name] = prop
43
+
44
+ else:
45
+ field_dict[prop_name] = prop
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
51
+ d = dict(src_dict)
52
+ custom_properties = cls()
53
+
54
+ additional_properties = {}
55
+ for prop_name, prop_dict in d.items():
56
+
57
+ def _parse_additional_property(
58
+ data: object,
59
+ ) -> Union[None, bool, float, list[Union[None, str]], list[str], str]:
60
+ if data is None:
61
+ return data
62
+ try:
63
+ if not isinstance(data, list):
64
+ raise TypeError()
65
+ additional_property_type_1_type_0 = []
66
+ _additional_property_type_1_type_0 = data
67
+ for additional_property_type_1_type_0_item_data in _additional_property_type_1_type_0:
68
+
69
+ def _parse_additional_property_type_1_type_0_item(
70
+ data: object,
71
+ ) -> Union[None, str]:
72
+ if data is None:
73
+ return data
74
+ return cast(Union[None, str], data)
75
+
76
+ additional_property_type_1_type_0_item = _parse_additional_property_type_1_type_0_item(
77
+ additional_property_type_1_type_0_item_data
78
+ )
79
+
80
+ additional_property_type_1_type_0.append(additional_property_type_1_type_0_item)
81
+
82
+ return additional_property_type_1_type_0
83
+ except: # noqa: E722
84
+ pass
85
+ try:
86
+ if not isinstance(data, list):
87
+ raise TypeError()
88
+ additional_property_type_3 = cast(list[str], data)
89
+
90
+ return additional_property_type_3
91
+ except: # noqa: E722
92
+ pass
93
+ try:
94
+ if not isinstance(data, list):
95
+ raise TypeError()
96
+ additional_property_type_9 = cast(list[str], data)
97
+
98
+ return additional_property_type_9
99
+ except: # noqa: E722
100
+ pass
101
+ return cast(
102
+ Union[None, bool, float, list[Union[None, str]], list[str], str],
103
+ data,
104
+ )
105
+
106
+ additional_property = _parse_additional_property(prop_dict)
107
+
108
+ additional_properties[prop_name] = additional_property
109
+
110
+ custom_properties.additional_properties = additional_properties
111
+ return custom_properties
112
+
113
+ @property
114
+ def additional_keys(self) -> list[str]:
115
+ return list(self.additional_properties.keys())
116
+
117
+ def __getitem__(self, key: str) -> Union[None, bool, float, list[Union[None, str]], list[str], str]:
118
+ return self.additional_properties[key]
119
+
120
+ def __setitem__(
121
+ self,
122
+ key: str,
123
+ value: Union[None, bool, float, list[Union[None, str]], list[str], str],
124
+ ) -> None:
125
+ self.additional_properties[key] = value
126
+
127
+ def __delitem__(self, key: str) -> None:
128
+ del self.additional_properties[key]
129
+
130
+ def __contains__(self, key: str) -> bool:
131
+ return key in self.additional_properties
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union, cast
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -7,6 +7,10 @@ from attrs import field as _attrs_field
7
7
  from ..models.priority import Priority
8
8
  from ..types import UNSET, Unset
9
9
 
10
+ if TYPE_CHECKING:
11
+ from ..models.custom_properties import CustomProperties
12
+
13
+
10
14
  T = TypeVar("T", bound="Task")
11
15
 
12
16
 
@@ -22,8 +26,8 @@ class Task:
22
26
  type_ (str): The title of the type of the task.
23
27
  status (str): The status from the list of available statuses.
24
28
  description (str): A longer description of the task, which can include markdown formatting.
25
- assignees (Union[Unset, list[str]]): The names or emails of the users that the task is assigned to. Either this
26
- or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
29
+ assignees (Union[None, Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
30
+ this or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
27
31
  assignee (Union[None, Unset, str]): The name or email of the user that the task is assigned to. Either this or
28
32
  assignees must be included, depending on whether the workspaces allows multiple assignees or not.
29
33
  tags (Union[Unset, list[str]]): Any tags that should be applied to the task, which can be used to filter and
@@ -31,14 +35,16 @@ class Task:
31
35
  be short and descriptive. This list can be empty.
32
36
  priority (Union[None, Priority, Unset]): The priority, which is a string that can be one of the specified
33
37
  options. This is used to sort tasks and determine which tasks should be done first.
34
- start_at (Union[None, Unset, str]): The start date, which is a date and time that the task should be started by
35
- in ISO format. It should be at 9:00am in the timezone of the user.
36
- due_at (Union[None, Unset, str]): The due date, which is a date and time that the task should be completed by in
37
- ISO format. It should be at 9:00am in the timezone of the user.
38
- size (Union[None, Unset, int]): The size, which is a number that represents the amount of work that needs to be
39
- done. This is used to determine how long the task will take to complete.
38
+ start_at (Union[None, Unset, str]): The start date, which is a date that the task should be started by in ISO
39
+ format, like YYYY-MM-DD.
40
+ due_at (Union[None, Unset, str]): The due date, which is a date that the task should be completed by in ISO
41
+ format, like YYYY-MM-DD.
42
+ size (Union[None, Unset, int, str]): The size, which represents the amount of work that needs to be done. This
43
+ is used to determine how long the task will take to complete.
40
44
  time_tracking (Union[Unset, str]): The time tracking, which is a string that indicates the amount of time spent
41
45
  on the task in hh:mm:ss format (or an empty string if no time has been tracked).
46
+ custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
47
+ properties that are associated with the task.
42
48
  """
43
49
 
44
50
  id: str
@@ -49,17 +55,20 @@ class Task:
49
55
  type_: str
50
56
  status: str
51
57
  description: str
52
- assignees: Union[Unset, list[str]] = UNSET
58
+ assignees: Union[None, Unset, list[str]] = UNSET
53
59
  assignee: Union[None, Unset, str] = UNSET
54
60
  tags: Union[Unset, list[str]] = UNSET
55
61
  priority: Union[None, Priority, Unset] = UNSET
56
62
  start_at: Union[None, Unset, str] = UNSET
57
63
  due_at: Union[None, Unset, str] = UNSET
58
- size: Union[None, Unset, int] = UNSET
64
+ size: Union[None, Unset, int, str] = UNSET
59
65
  time_tracking: Union[Unset, str] = UNSET
66
+ custom_properties: Union["CustomProperties", None, Unset] = UNSET
60
67
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
61
68
 
62
69
  def to_dict(self) -> dict[str, Any]:
70
+ from ..models.custom_properties import CustomProperties
71
+
63
72
  id = self.id
64
73
 
65
74
  html_url = self.html_url
@@ -77,8 +86,13 @@ class Task:
77
86
 
78
87
  description = self.description
79
88
 
80
- assignees: Union[Unset, list[str]] = UNSET
81
- if not isinstance(self.assignees, Unset):
89
+ assignees: Union[None, Unset, list[str]]
90
+ if isinstance(self.assignees, Unset):
91
+ assignees = UNSET
92
+ elif isinstance(self.assignees, list):
93
+ assignees = self.assignees
94
+
95
+ else:
82
96
  assignees = self.assignees
83
97
 
84
98
  assignee: Union[None, Unset, str]
@@ -111,7 +125,7 @@ class Task:
111
125
  else:
112
126
  due_at = self.due_at
113
127
 
114
- size: Union[None, Unset, int]
128
+ size: Union[None, Unset, int, str]
115
129
  if isinstance(self.size, Unset):
116
130
  size = UNSET
117
131
  else:
@@ -119,6 +133,14 @@ class Task:
119
133
 
120
134
  time_tracking = self.time_tracking
121
135
 
136
+ custom_properties: Union[None, Unset, dict[str, Any]]
137
+ if isinstance(self.custom_properties, Unset):
138
+ custom_properties = UNSET
139
+ elif isinstance(self.custom_properties, CustomProperties):
140
+ custom_properties = self.custom_properties.to_dict()
141
+ else:
142
+ custom_properties = self.custom_properties
143
+
122
144
  field_dict: dict[str, Any] = {}
123
145
  field_dict.update(self.additional_properties)
124
146
  field_dict.update(
@@ -149,11 +171,15 @@ class Task:
149
171
  field_dict["size"] = size
150
172
  if time_tracking is not UNSET:
151
173
  field_dict["timeTracking"] = time_tracking
174
+ if custom_properties is not UNSET:
175
+ field_dict["customProperties"] = custom_properties
152
176
 
153
177
  return field_dict
154
178
 
155
179
  @classmethod
156
180
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
181
+ from ..models.custom_properties import CustomProperties
182
+
157
183
  d = dict(src_dict)
158
184
  id = d.pop("id")
159
185
 
@@ -176,7 +202,22 @@ class Task:
176
202
 
177
203
  description = d.pop("description")
178
204
 
179
- assignees = cast(list[str], d.pop("assignees", UNSET))
205
+ def _parse_assignees(data: object) -> Union[None, Unset, list[str]]:
206
+ if data is None:
207
+ return data
208
+ if isinstance(data, Unset):
209
+ return data
210
+ try:
211
+ if not isinstance(data, list):
212
+ raise TypeError()
213
+ assignees_type_0 = cast(list[str], data)
214
+
215
+ return assignees_type_0
216
+ except: # noqa: E722
217
+ pass
218
+ return cast(Union[None, Unset, list[str]], data)
219
+
220
+ assignees = _parse_assignees(d.pop("assignees", UNSET))
180
221
 
181
222
  def _parse_assignee(data: object) -> Union[None, Unset, str]:
182
223
  if data is None:
@@ -224,17 +265,36 @@ class Task:
224
265
 
225
266
  due_at = _parse_due_at(d.pop("dueAt", UNSET))
226
267
 
227
- def _parse_size(data: object) -> Union[None, Unset, int]:
268
+ def _parse_size(data: object) -> Union[None, Unset, int, str]:
228
269
  if data is None:
229
270
  return data
230
271
  if isinstance(data, Unset):
231
272
  return data
232
- return cast(Union[None, Unset, int], data)
273
+ return cast(Union[None, Unset, int, str], data)
233
274
 
234
275
  size = _parse_size(d.pop("size", UNSET))
235
276
 
236
277
  time_tracking = d.pop("timeTracking", UNSET)
237
278
 
279
+ def _parse_custom_properties(
280
+ data: object,
281
+ ) -> Union["CustomProperties", None, Unset]:
282
+ if data is None:
283
+ return data
284
+ if isinstance(data, Unset):
285
+ return data
286
+ try:
287
+ if not isinstance(data, dict):
288
+ raise TypeError()
289
+ custom_properties_type_0 = CustomProperties.from_dict(data)
290
+
291
+ return custom_properties_type_0
292
+ except: # noqa: E722
293
+ pass
294
+ return cast(Union["CustomProperties", None, Unset], data)
295
+
296
+ custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
297
+
238
298
  task = cls(
239
299
  id=id,
240
300
  html_url=html_url,
@@ -252,6 +312,7 @@ class Task:
252
312
  due_at=due_at,
253
313
  size=size,
254
314
  time_tracking=time_tracking,
315
+ custom_properties=custom_properties,
255
316
  )
256
317
 
257
318
  task.additional_properties = d