dart-tools 0.7.2__py3-none-any.whl → 0.7.4__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.
- dart/generated/api/__init__.py +5 -12
- dart/generated/api/dartboard/retrieve_dartboard.py +3 -1
- dart/generated/api/doc/delete_doc.py +3 -1
- dart/generated/api/doc/retrieve_doc.py +3 -1
- dart/generated/api/doc/update_doc.py +3 -1
- dart/generated/api/folder/retrieve_folder.py +3 -1
- dart/generated/api/task/delete_task.py +3 -1
- dart/generated/api/task/list_tasks.py +15 -0
- dart/generated/api/task/retrieve_task.py +3 -1
- dart/generated/api/task/update_task.py +3 -1
- dart/generated/api/view/retrieve_view.py +3 -1
- dart/generated/models/__init__.py +42 -0
- dart/generated/models/concise_task.py +68 -7
- dart/generated/models/custom_properties.py +131 -0
- dart/generated/models/task.py +68 -7
- dart/generated/models/task_create.py +66 -15
- dart/generated/models/task_update.py +66 -15
- dart/generated/models/user_space_configuration.py +242 -0
- dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +82 -0
- dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +82 -0
- dart/generated/models/user_space_configuration_custom_property_number_type_def.py +86 -0
- dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +10 -0
- dart/generated/models/user_space_configuration_custom_property_select_type_def.py +82 -0
- dart/generated/models/user_space_configuration_custom_property_status_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_text_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +74 -0
- dart/generated/models/user_space_configuration_custom_property_user_type_def.py +82 -0
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/METADATA +7 -7
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/RECORD +34 -24
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/WHEEL +1 -1
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/licenses/LICENSE +1 -1
- dart/generated/py.typed +0 -1
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/entry_points.txt +0 -0
- {dart_tools-0.7.2.dist-info → dart_tools-0.7.4.dist-info}/top_level.txt +0 -0
dart/generated/api/__init__.py
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
"""Contains methods for accessing the API"""
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
from .comment import create_comment
|
|
4
|
-
from .
|
|
4
|
+
from .config import get_config
|
|
5
5
|
from .dartboard import retrieve_dartboard
|
|
6
|
-
from .
|
|
7
|
-
from .
|
|
8
|
-
from .task import update_task
|
|
9
|
-
from .task import retrieve_task
|
|
10
|
-
from .task import list_tasks
|
|
6
|
+
from .doc import create_doc, delete_doc, list_docs, retrieve_doc, update_doc
|
|
7
|
+
from .folder import retrieve_folder
|
|
8
|
+
from .task import create_task, delete_task, list_tasks, retrieve_task, update_task
|
|
11
9
|
from .view import retrieve_view
|
|
12
|
-
from .doc import create_doc
|
|
13
|
-
from .doc import delete_doc
|
|
14
|
-
from .doc import update_doc
|
|
15
|
-
from .doc import list_docs
|
|
16
|
-
from .doc import retrieve_doc
|
|
@@ -24,6 +24,7 @@ def _get_kwargs(
|
|
|
24
24
|
is_completed: Union[Unset, bool] = UNSET,
|
|
25
25
|
limit: Union[Unset, int] = UNSET,
|
|
26
26
|
offset: Union[Unset, int] = UNSET,
|
|
27
|
+
parent_id: Union[Unset, str] = UNSET,
|
|
27
28
|
priority: Union[Unset, str] = UNSET,
|
|
28
29
|
size: Union[Unset, int] = UNSET,
|
|
29
30
|
start_at_after: Union[Unset, datetime.date] = UNSET,
|
|
@@ -68,6 +69,8 @@ def _get_kwargs(
|
|
|
68
69
|
|
|
69
70
|
params["offset"] = offset
|
|
70
71
|
|
|
72
|
+
params["parent_id"] = parent_id
|
|
73
|
+
|
|
71
74
|
params["priority"] = priority
|
|
72
75
|
|
|
73
76
|
params["size"] = size
|
|
@@ -146,6 +149,7 @@ def sync_detailed(
|
|
|
146
149
|
is_completed: Union[Unset, bool] = UNSET,
|
|
147
150
|
limit: Union[Unset, int] = UNSET,
|
|
148
151
|
offset: Union[Unset, int] = UNSET,
|
|
152
|
+
parent_id: Union[Unset, str] = UNSET,
|
|
149
153
|
priority: Union[Unset, str] = UNSET,
|
|
150
154
|
size: Union[Unset, int] = UNSET,
|
|
151
155
|
start_at_after: Union[Unset, datetime.date] = UNSET,
|
|
@@ -174,6 +178,7 @@ def sync_detailed(
|
|
|
174
178
|
is_completed (Union[Unset, bool]):
|
|
175
179
|
limit (Union[Unset, int]):
|
|
176
180
|
offset (Union[Unset, int]):
|
|
181
|
+
parent_id (Union[Unset, str]):
|
|
177
182
|
priority (Union[Unset, str]):
|
|
178
183
|
size (Union[Unset, int]):
|
|
179
184
|
start_at_after (Union[Unset, datetime.date]):
|
|
@@ -207,6 +212,7 @@ def sync_detailed(
|
|
|
207
212
|
is_completed=is_completed,
|
|
208
213
|
limit=limit,
|
|
209
214
|
offset=offset,
|
|
215
|
+
parent_id=parent_id,
|
|
210
216
|
priority=priority,
|
|
211
217
|
size=size,
|
|
212
218
|
start_at_after=start_at_after,
|
|
@@ -242,6 +248,7 @@ def sync(
|
|
|
242
248
|
is_completed: Union[Unset, bool] = UNSET,
|
|
243
249
|
limit: Union[Unset, int] = UNSET,
|
|
244
250
|
offset: Union[Unset, int] = UNSET,
|
|
251
|
+
parent_id: Union[Unset, str] = UNSET,
|
|
245
252
|
priority: Union[Unset, str] = UNSET,
|
|
246
253
|
size: Union[Unset, int] = UNSET,
|
|
247
254
|
start_at_after: Union[Unset, datetime.date] = UNSET,
|
|
@@ -270,6 +277,7 @@ def sync(
|
|
|
270
277
|
is_completed (Union[Unset, bool]):
|
|
271
278
|
limit (Union[Unset, int]):
|
|
272
279
|
offset (Union[Unset, int]):
|
|
280
|
+
parent_id (Union[Unset, str]):
|
|
273
281
|
priority (Union[Unset, str]):
|
|
274
282
|
size (Union[Unset, int]):
|
|
275
283
|
start_at_after (Union[Unset, datetime.date]):
|
|
@@ -304,6 +312,7 @@ def sync(
|
|
|
304
312
|
is_completed=is_completed,
|
|
305
313
|
limit=limit,
|
|
306
314
|
offset=offset,
|
|
315
|
+
parent_id=parent_id,
|
|
307
316
|
priority=priority,
|
|
308
317
|
size=size,
|
|
309
318
|
start_at_after=start_at_after,
|
|
@@ -333,6 +342,7 @@ async def asyncio_detailed(
|
|
|
333
342
|
is_completed: Union[Unset, bool] = UNSET,
|
|
334
343
|
limit: Union[Unset, int] = UNSET,
|
|
335
344
|
offset: Union[Unset, int] = UNSET,
|
|
345
|
+
parent_id: Union[Unset, str] = UNSET,
|
|
336
346
|
priority: Union[Unset, str] = UNSET,
|
|
337
347
|
size: Union[Unset, int] = UNSET,
|
|
338
348
|
start_at_after: Union[Unset, datetime.date] = UNSET,
|
|
@@ -361,6 +371,7 @@ async def asyncio_detailed(
|
|
|
361
371
|
is_completed (Union[Unset, bool]):
|
|
362
372
|
limit (Union[Unset, int]):
|
|
363
373
|
offset (Union[Unset, int]):
|
|
374
|
+
parent_id (Union[Unset, str]):
|
|
364
375
|
priority (Union[Unset, str]):
|
|
365
376
|
size (Union[Unset, int]):
|
|
366
377
|
start_at_after (Union[Unset, datetime.date]):
|
|
@@ -394,6 +405,7 @@ async def asyncio_detailed(
|
|
|
394
405
|
is_completed=is_completed,
|
|
395
406
|
limit=limit,
|
|
396
407
|
offset=offset,
|
|
408
|
+
parent_id=parent_id,
|
|
397
409
|
priority=priority,
|
|
398
410
|
size=size,
|
|
399
411
|
start_at_after=start_at_after,
|
|
@@ -427,6 +439,7 @@ async def asyncio(
|
|
|
427
439
|
is_completed: Union[Unset, bool] = UNSET,
|
|
428
440
|
limit: Union[Unset, int] = UNSET,
|
|
429
441
|
offset: Union[Unset, int] = UNSET,
|
|
442
|
+
parent_id: Union[Unset, str] = UNSET,
|
|
430
443
|
priority: Union[Unset, str] = UNSET,
|
|
431
444
|
size: Union[Unset, int] = UNSET,
|
|
432
445
|
start_at_after: Union[Unset, datetime.date] = UNSET,
|
|
@@ -455,6 +468,7 @@ async def asyncio(
|
|
|
455
468
|
is_completed (Union[Unset, bool]):
|
|
456
469
|
limit (Union[Unset, int]):
|
|
457
470
|
offset (Union[Unset, int]):
|
|
471
|
+
parent_id (Union[Unset, str]):
|
|
458
472
|
priority (Union[Unset, str]):
|
|
459
473
|
size (Union[Unset, int]):
|
|
460
474
|
start_at_after (Union[Unset, datetime.date]):
|
|
@@ -490,6 +504,7 @@ async def asyncio(
|
|
|
490
504
|
is_completed=is_completed,
|
|
491
505
|
limit=limit,
|
|
492
506
|
offset=offset,
|
|
507
|
+
parent_id=parent_id,
|
|
493
508
|
priority=priority,
|
|
494
509
|
size=size,
|
|
495
510
|
start_at_after=start_at_after,
|
|
@@ -4,6 +4,7 @@ from .comment import Comment
|
|
|
4
4
|
from .comment_create import CommentCreate
|
|
5
5
|
from .concise_doc import ConciseDoc
|
|
6
6
|
from .concise_task import ConciseTask
|
|
7
|
+
from .custom_properties import CustomProperties
|
|
7
8
|
from .dartboard import Dartboard
|
|
8
9
|
from .doc import Doc
|
|
9
10
|
from .doc_create import DocCreate
|
|
@@ -18,6 +19,36 @@ from .task_create import TaskCreate
|
|
|
18
19
|
from .task_update import TaskUpdate
|
|
19
20
|
from .user import User
|
|
20
21
|
from .user_space_configuration import UserSpaceConfiguration
|
|
22
|
+
from .user_space_configuration_custom_property_checkbox_type_def import (
|
|
23
|
+
UserSpaceConfigurationCustomPropertyCheckboxTypeDef,
|
|
24
|
+
)
|
|
25
|
+
from .user_space_configuration_custom_property_dates_type_def import (
|
|
26
|
+
UserSpaceConfigurationCustomPropertyDatesTypeDef,
|
|
27
|
+
)
|
|
28
|
+
from .user_space_configuration_custom_property_multiselect_type_def import (
|
|
29
|
+
UserSpaceConfigurationCustomPropertyMultiselectTypeDef,
|
|
30
|
+
)
|
|
31
|
+
from .user_space_configuration_custom_property_number_type_def import (
|
|
32
|
+
UserSpaceConfigurationCustomPropertyNumberTypeDef,
|
|
33
|
+
)
|
|
34
|
+
from .user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def import (
|
|
35
|
+
UserSpaceConfigurationCustomPropertyNumberTypeDefCustomPropertyNumberFormatTypeDef,
|
|
36
|
+
)
|
|
37
|
+
from .user_space_configuration_custom_property_select_type_def import (
|
|
38
|
+
UserSpaceConfigurationCustomPropertySelectTypeDef,
|
|
39
|
+
)
|
|
40
|
+
from .user_space_configuration_custom_property_status_type_def import (
|
|
41
|
+
UserSpaceConfigurationCustomPropertyStatusTypeDef,
|
|
42
|
+
)
|
|
43
|
+
from .user_space_configuration_custom_property_text_type_def import (
|
|
44
|
+
UserSpaceConfigurationCustomPropertyTextTypeDef,
|
|
45
|
+
)
|
|
46
|
+
from .user_space_configuration_custom_property_time_tracking_type_def import (
|
|
47
|
+
UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef,
|
|
48
|
+
)
|
|
49
|
+
from .user_space_configuration_custom_property_user_type_def import (
|
|
50
|
+
UserSpaceConfigurationCustomPropertyUserTypeDef,
|
|
51
|
+
)
|
|
21
52
|
from .view import View
|
|
22
53
|
from .wrapped_comment import WrappedComment
|
|
23
54
|
from .wrapped_comment_create import WrappedCommentCreate
|
|
@@ -36,6 +67,7 @@ __all__ = (
|
|
|
36
67
|
"CommentCreate",
|
|
37
68
|
"ConciseDoc",
|
|
38
69
|
"ConciseTask",
|
|
70
|
+
"CustomProperties",
|
|
39
71
|
"Dartboard",
|
|
40
72
|
"Doc",
|
|
41
73
|
"DocCreate",
|
|
@@ -50,6 +82,16 @@ __all__ = (
|
|
|
50
82
|
"TaskUpdate",
|
|
51
83
|
"User",
|
|
52
84
|
"UserSpaceConfiguration",
|
|
85
|
+
"UserSpaceConfigurationCustomPropertyCheckboxTypeDef",
|
|
86
|
+
"UserSpaceConfigurationCustomPropertyDatesTypeDef",
|
|
87
|
+
"UserSpaceConfigurationCustomPropertyMultiselectTypeDef",
|
|
88
|
+
"UserSpaceConfigurationCustomPropertyNumberTypeDef",
|
|
89
|
+
"UserSpaceConfigurationCustomPropertyNumberTypeDefCustomPropertyNumberFormatTypeDef",
|
|
90
|
+
"UserSpaceConfigurationCustomPropertySelectTypeDef",
|
|
91
|
+
"UserSpaceConfigurationCustomPropertyStatusTypeDef",
|
|
92
|
+
"UserSpaceConfigurationCustomPropertyTextTypeDef",
|
|
93
|
+
"UserSpaceConfigurationCustomPropertyTimeTrackingTypeDef",
|
|
94
|
+
"UserSpaceConfigurationCustomPropertyUserTypeDef",
|
|
53
95
|
"View",
|
|
54
96
|
"WrappedComment",
|
|
55
97
|
"WrappedCommentCreate",
|
|
@@ -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
|
|
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
|
|
@@ -39,6 +43,8 @@ class ConciseTask:
|
|
|
39
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,7 +54,7 @@ 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
|
|
@@ -56,9 +62,12 @@ class ConciseTask:
|
|
|
56
62
|
due_at: Union[None, Unset, str] = UNSET
|
|
57
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]]
|
|
78
|
-
if
|
|
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]
|
|
@@ -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
|
-
|
|
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:
|
|
@@ -229,6 +270,25 @@ class ConciseTask:
|
|
|
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
|