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="TaskCreate")
11
15
 
12
16
 
@@ -20,8 +24,8 @@ class TaskCreate:
20
24
  type_ (Union[Unset, str]): The title of the type of the task.
21
25
  status (Union[Unset, str]): The status from the list of available statuses.
22
26
  description (Union[Unset, str]): A longer description of the task, which can include markdown formatting.
23
- assignees (Union[Unset, list[str]]): The names or emails of the users that the task is assigned to. Either this
24
- or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
27
+ assignees (Union[None, Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
28
+ this or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
25
29
  assignee (Union[None, Unset, str]): The name or email of the user that the task is assigned to. Either this or
26
30
  assignees must be included, depending on whether the workspaces allows multiple assignees or not.
27
31
  tags (Union[Unset, list[str]]): Any tags that should be applied to the task, which can be used to filter and
@@ -29,14 +33,14 @@ class TaskCreate:
29
33
  be short and descriptive. This list can be empty.
30
34
  priority (Union[None, Priority, Unset]): The priority, which is a string that can be one of the specified
31
35
  options. This is used to sort tasks and determine which tasks should be done first.
32
- start_at (Union[None, Unset, str]): The start date, which is a date and time that the task should be started by
33
- in ISO format. It should be at 9:00am in the timezone of the user.
34
- due_at (Union[None, Unset, str]): The due date, which is a date and time that the task should be completed by in
35
- ISO format. It should be at 9:00am in the timezone of the user.
36
- size (Union[None, Unset, int]): The size, which is a number that represents the amount of work that needs to be
37
- done. This is used to determine how long the task will take to complete.
38
- time_tracking (Union[Unset, str]): The time tracking, which is a string that indicates the amount of time spent
39
- on the task in hh:mm:ss format (or an empty string if no time has been tracked).
36
+ start_at (Union[None, Unset, str]): The start date, which is a date that the task should be started by in ISO
37
+ format, like YYYY-MM-DD.
38
+ due_at (Union[None, Unset, str]): The due date, which is a date that the task should be completed by in ISO
39
+ format, like YYYY-MM-DD.
40
+ size (Union[None, Unset, int, str]): The size, which represents the amount of work that needs to be done. This
41
+ is used to determine how long the task will take to complete.
42
+ custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
43
+ properties that are associated with the task.
40
44
  """
41
45
 
42
46
  title: str
@@ -45,17 +49,19 @@ class TaskCreate:
45
49
  type_: Union[Unset, str] = UNSET
46
50
  status: Union[Unset, str] = UNSET
47
51
  description: Union[Unset, str] = UNSET
48
- assignees: Union[Unset, list[str]] = UNSET
52
+ assignees: Union[None, Unset, list[str]] = UNSET
49
53
  assignee: Union[None, Unset, str] = UNSET
50
54
  tags: Union[Unset, list[str]] = UNSET
51
55
  priority: Union[None, Priority, Unset] = UNSET
52
56
  start_at: Union[None, Unset, str] = UNSET
53
57
  due_at: Union[None, Unset, str] = UNSET
54
- size: Union[None, Unset, int] = UNSET
55
- time_tracking: Union[Unset, str] = UNSET
58
+ size: Union[None, Unset, int, str] = UNSET
59
+ custom_properties: Union["CustomProperties", None, Unset] = UNSET
56
60
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
57
61
 
58
62
  def to_dict(self) -> dict[str, Any]:
63
+ from ..models.custom_properties import CustomProperties
64
+
59
65
  title = self.title
60
66
 
61
67
  parent_id: Union[None, Unset, str]
@@ -72,8 +78,13 @@ class TaskCreate:
72
78
 
73
79
  description = self.description
74
80
 
75
- assignees: Union[Unset, list[str]] = UNSET
76
- if not isinstance(self.assignees, Unset):
81
+ assignees: Union[None, Unset, list[str]]
82
+ if isinstance(self.assignees, Unset):
83
+ assignees = UNSET
84
+ elif isinstance(self.assignees, list):
85
+ assignees = self.assignees
86
+
87
+ else:
77
88
  assignees = self.assignees
78
89
 
79
90
  assignee: Union[None, Unset, str]
@@ -106,13 +117,19 @@ class TaskCreate:
106
117
  else:
107
118
  due_at = self.due_at
108
119
 
109
- size: Union[None, Unset, int]
120
+ size: Union[None, Unset, int, str]
110
121
  if isinstance(self.size, Unset):
111
122
  size = UNSET
112
123
  else:
113
124
  size = self.size
114
125
 
115
- time_tracking = self.time_tracking
126
+ custom_properties: Union[None, Unset, dict[str, Any]]
127
+ if isinstance(self.custom_properties, Unset):
128
+ custom_properties = UNSET
129
+ elif isinstance(self.custom_properties, CustomProperties):
130
+ custom_properties = self.custom_properties.to_dict()
131
+ else:
132
+ custom_properties = self.custom_properties
116
133
 
117
134
  field_dict: dict[str, Any] = {}
118
135
  field_dict.update(self.additional_properties)
@@ -145,13 +162,15 @@ class TaskCreate:
145
162
  field_dict["dueAt"] = due_at
146
163
  if size is not UNSET:
147
164
  field_dict["size"] = size
148
- if time_tracking is not UNSET:
149
- field_dict["timeTracking"] = time_tracking
165
+ if custom_properties is not UNSET:
166
+ field_dict["customProperties"] = custom_properties
150
167
 
151
168
  return field_dict
152
169
 
153
170
  @classmethod
154
171
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
172
+ from ..models.custom_properties import CustomProperties
173
+
155
174
  d = dict(src_dict)
156
175
  title = d.pop("title")
157
176
 
@@ -172,7 +191,22 @@ class TaskCreate:
172
191
 
173
192
  description = d.pop("description", UNSET)
174
193
 
175
- assignees = cast(list[str], d.pop("assignees", UNSET))
194
+ def _parse_assignees(data: object) -> Union[None, Unset, list[str]]:
195
+ if data is None:
196
+ return data
197
+ if isinstance(data, Unset):
198
+ return data
199
+ try:
200
+ if not isinstance(data, list):
201
+ raise TypeError()
202
+ assignees_type_0 = cast(list[str], data)
203
+
204
+ return assignees_type_0
205
+ except: # noqa: E722
206
+ pass
207
+ return cast(Union[None, Unset, list[str]], data)
208
+
209
+ assignees = _parse_assignees(d.pop("assignees", UNSET))
176
210
 
177
211
  def _parse_assignee(data: object) -> Union[None, Unset, str]:
178
212
  if data is None:
@@ -220,16 +254,33 @@ class TaskCreate:
220
254
 
221
255
  due_at = _parse_due_at(d.pop("dueAt", UNSET))
222
256
 
223
- def _parse_size(data: object) -> Union[None, Unset, int]:
257
+ def _parse_size(data: object) -> Union[None, Unset, int, str]:
224
258
  if data is None:
225
259
  return data
226
260
  if isinstance(data, Unset):
227
261
  return data
228
- return cast(Union[None, Unset, int], data)
262
+ return cast(Union[None, Unset, int, str], data)
229
263
 
230
264
  size = _parse_size(d.pop("size", UNSET))
231
265
 
232
- time_tracking = d.pop("timeTracking", UNSET)
266
+ def _parse_custom_properties(
267
+ data: object,
268
+ ) -> Union["CustomProperties", None, Unset]:
269
+ if data is None:
270
+ return data
271
+ if isinstance(data, Unset):
272
+ return data
273
+ try:
274
+ if not isinstance(data, dict):
275
+ raise TypeError()
276
+ custom_properties_type_0 = CustomProperties.from_dict(data)
277
+
278
+ return custom_properties_type_0
279
+ except: # noqa: E722
280
+ pass
281
+ return cast(Union["CustomProperties", None, Unset], data)
282
+
283
+ custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
233
284
 
234
285
  task_create = cls(
235
286
  title=title,
@@ -245,7 +296,7 @@ class TaskCreate:
245
296
  start_at=start_at,
246
297
  due_at=due_at,
247
298
  size=size,
248
- time_tracking=time_tracking,
299
+ custom_properties=custom_properties,
249
300
  )
250
301
 
251
302
  task_create.additional_properties = d
@@ -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="TaskUpdate")
11
15
 
12
16
 
@@ -21,8 +25,8 @@ class TaskUpdate:
21
25
  type_ (Union[Unset, str]): The title of the type of the task.
22
26
  status (Union[Unset, str]): The status from the list of available statuses.
23
27
  description (Union[Unset, str]): A longer description of the task, which can include markdown formatting.
24
- assignees (Union[Unset, list[str]]): The names or emails of the users that the task is assigned to. Either this
25
- or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
28
+ assignees (Union[None, Unset, list[str]]): The names or emails of the users that the task is assigned to. Either
29
+ this or assignee must be included, depending on whether the workspaces allows multiple assignees or not.
26
30
  assignee (Union[None, Unset, str]): The name or email of the user that the task is assigned to. Either this or
27
31
  assignees must be included, depending on whether the workspaces allows multiple assignees or not.
28
32
  tags (Union[Unset, list[str]]): Any tags that should be applied to the task, which can be used to filter and
@@ -30,14 +34,14 @@ class TaskUpdate:
30
34
  be short and descriptive. This list can be empty.
31
35
  priority (Union[None, Priority, Unset]): The priority, which is a string that can be one of the specified
32
36
  options. This is used to sort tasks and determine which tasks should be done first.
33
- start_at (Union[None, Unset, str]): The start date, which is a date and time that the task should be started by
34
- in ISO format. It should be at 9:00am in the timezone of the user.
35
- due_at (Union[None, Unset, str]): The due date, which is a date and time that the task should be completed by in
36
- ISO format. It should be at 9:00am in the timezone of the user.
37
- size (Union[None, Unset, int]): The size, which is a number that represents the amount of work that needs to be
38
- done. This is used to determine how long the task will take to complete.
39
- time_tracking (Union[Unset, str]): The time tracking, which is a string that indicates the amount of time spent
40
- on the task in hh:mm:ss format (or an empty string if no time has been tracked).
37
+ start_at (Union[None, Unset, str]): The start date, which is a date that the task should be started by in ISO
38
+ format, like YYYY-MM-DD.
39
+ due_at (Union[None, Unset, str]): The due date, which is a date that the task should be completed by in ISO
40
+ format, like YYYY-MM-DD.
41
+ size (Union[None, Unset, int, str]): The size, which represents the amount of work that needs to be done. This
42
+ is used to determine how long the task will take to complete.
43
+ custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
44
+ properties that are associated with the task.
41
45
  """
42
46
 
43
47
  id: str
@@ -47,17 +51,19 @@ class TaskUpdate:
47
51
  type_: Union[Unset, str] = UNSET
48
52
  status: Union[Unset, str] = UNSET
49
53
  description: Union[Unset, str] = UNSET
50
- assignees: Union[Unset, list[str]] = UNSET
54
+ assignees: Union[None, Unset, list[str]] = UNSET
51
55
  assignee: Union[None, Unset, str] = UNSET
52
56
  tags: Union[Unset, list[str]] = UNSET
53
57
  priority: Union[None, Priority, Unset] = UNSET
54
58
  start_at: Union[None, Unset, str] = UNSET
55
59
  due_at: Union[None, Unset, str] = UNSET
56
- size: Union[None, Unset, int] = UNSET
57
- time_tracking: Union[Unset, str] = UNSET
60
+ size: Union[None, Unset, int, str] = UNSET
61
+ custom_properties: Union["CustomProperties", None, Unset] = UNSET
58
62
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
59
63
 
60
64
  def to_dict(self) -> dict[str, Any]:
65
+ from ..models.custom_properties import CustomProperties
66
+
61
67
  id = self.id
62
68
 
63
69
  title = self.title
@@ -76,8 +82,13 @@ class TaskUpdate:
76
82
 
77
83
  description = self.description
78
84
 
79
- assignees: Union[Unset, list[str]] = UNSET
80
- if not isinstance(self.assignees, Unset):
85
+ assignees: Union[None, Unset, list[str]]
86
+ if isinstance(self.assignees, Unset):
87
+ assignees = UNSET
88
+ elif isinstance(self.assignees, list):
89
+ assignees = self.assignees
90
+
91
+ else:
81
92
  assignees = self.assignees
82
93
 
83
94
  assignee: Union[None, Unset, str]
@@ -110,13 +121,19 @@ class TaskUpdate:
110
121
  else:
111
122
  due_at = self.due_at
112
123
 
113
- size: Union[None, Unset, int]
124
+ size: Union[None, Unset, int, str]
114
125
  if isinstance(self.size, Unset):
115
126
  size = UNSET
116
127
  else:
117
128
  size = self.size
118
129
 
119
- time_tracking = self.time_tracking
130
+ custom_properties: Union[None, Unset, dict[str, Any]]
131
+ if isinstance(self.custom_properties, Unset):
132
+ custom_properties = UNSET
133
+ elif isinstance(self.custom_properties, CustomProperties):
134
+ custom_properties = self.custom_properties.to_dict()
135
+ else:
136
+ custom_properties = self.custom_properties
120
137
 
121
138
  field_dict: dict[str, Any] = {}
122
139
  field_dict.update(self.additional_properties)
@@ -151,13 +168,15 @@ class TaskUpdate:
151
168
  field_dict["dueAt"] = due_at
152
169
  if size is not UNSET:
153
170
  field_dict["size"] = size
154
- if time_tracking is not UNSET:
155
- field_dict["timeTracking"] = time_tracking
171
+ if custom_properties is not UNSET:
172
+ field_dict["customProperties"] = custom_properties
156
173
 
157
174
  return field_dict
158
175
 
159
176
  @classmethod
160
177
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
178
+ from ..models.custom_properties import CustomProperties
179
+
161
180
  d = dict(src_dict)
162
181
  id = d.pop("id")
163
182
 
@@ -180,7 +199,22 @@ class TaskUpdate:
180
199
 
181
200
  description = d.pop("description", UNSET)
182
201
 
183
- assignees = cast(list[str], d.pop("assignees", UNSET))
202
+ def _parse_assignees(data: object) -> Union[None, Unset, list[str]]:
203
+ if data is None:
204
+ return data
205
+ if isinstance(data, Unset):
206
+ return data
207
+ try:
208
+ if not isinstance(data, list):
209
+ raise TypeError()
210
+ assignees_type_0 = cast(list[str], data)
211
+
212
+ return assignees_type_0
213
+ except: # noqa: E722
214
+ pass
215
+ return cast(Union[None, Unset, list[str]], data)
216
+
217
+ assignees = _parse_assignees(d.pop("assignees", UNSET))
184
218
 
185
219
  def _parse_assignee(data: object) -> Union[None, Unset, str]:
186
220
  if data is None:
@@ -228,16 +262,33 @@ class TaskUpdate:
228
262
 
229
263
  due_at = _parse_due_at(d.pop("dueAt", UNSET))
230
264
 
231
- def _parse_size(data: object) -> Union[None, Unset, int]:
265
+ def _parse_size(data: object) -> Union[None, Unset, int, str]:
232
266
  if data is None:
233
267
  return data
234
268
  if isinstance(data, Unset):
235
269
  return data
236
- return cast(Union[None, Unset, int], data)
270
+ return cast(Union[None, Unset, int, str], data)
237
271
 
238
272
  size = _parse_size(d.pop("size", UNSET))
239
273
 
240
- time_tracking = d.pop("timeTracking", UNSET)
274
+ def _parse_custom_properties(
275
+ data: object,
276
+ ) -> Union["CustomProperties", None, Unset]:
277
+ if data is None:
278
+ return data
279
+ if isinstance(data, Unset):
280
+ return data
281
+ try:
282
+ if not isinstance(data, dict):
283
+ raise TypeError()
284
+ custom_properties_type_0 = CustomProperties.from_dict(data)
285
+
286
+ return custom_properties_type_0
287
+ except: # noqa: E722
288
+ pass
289
+ return cast(Union["CustomProperties", None, Unset], data)
290
+
291
+ custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
241
292
 
242
293
  task_update = cls(
243
294
  id=id,
@@ -254,7 +305,7 @@ class TaskUpdate:
254
305
  start_at=start_at,
255
306
  due_at=due_at,
256
307
  size=size,
257
- time_tracking=time_tracking,
308
+ custom_properties=custom_properties,
258
309
  )
259
310
 
260
311
  task_update.additional_properties = d