dart-tools 0.7.4__py3-none-any.whl → 0.7.6__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/dart.py +14 -1
- dart/generated/api/__init__.py +1 -1
- dart/generated/api/comment/list_comments.py +351 -0
- dart/generated/models/__init__.py +6 -0
- dart/generated/models/comment.py +20 -9
- dart/generated/models/comment_create.py +12 -1
- dart/generated/models/list_comments_o_item.py +10 -0
- dart/generated/models/paginated_comment_list.py +123 -0
- dart/generated/models/task.py +35 -0
- dart/generated/models/task_create.py +35 -0
- dart/generated/models/task_relationships.py +89 -0
- dart/generated/models/task_update.py +35 -0
- {dart_tools-0.7.4.dist-info → dart_tools-0.7.6.dist-info}/METADATA +1 -1
- {dart_tools-0.7.4.dist-info → dart_tools-0.7.6.dist-info}/RECORD +18 -14
- {dart_tools-0.7.4.dist-info → dart_tools-0.7.6.dist-info}/WHEEL +0 -0
- {dart_tools-0.7.4.dist-info → dart_tools-0.7.6.dist-info}/entry_points.txt +0 -0
- {dart_tools-0.7.4.dist-info → dart_tools-0.7.6.dist-info}/licenses/LICENSE +0 -0
- {dart_tools-0.7.4.dist-info → dart_tools-0.7.6.dist-info}/top_level.txt +0 -0
dart/dart.py
CHANGED
|
@@ -36,6 +36,7 @@ from .generated.models import (
|
|
|
36
36
|
Doc,
|
|
37
37
|
DocCreate,
|
|
38
38
|
DocUpdate,
|
|
39
|
+
PaginatedCommentList,
|
|
39
40
|
PaginatedConciseDocList,
|
|
40
41
|
PaginatedConciseTaskList,
|
|
41
42
|
Priority,
|
|
@@ -100,6 +101,7 @@ _PRIORITY_MAP: dict[int, str] = {
|
|
|
100
101
|
3: Priority.LOW,
|
|
101
102
|
}
|
|
102
103
|
_SIZES = {1, 2, 3, 5, 8}
|
|
104
|
+
_DEFAULT_DARTBOARD = "General/Active"
|
|
103
105
|
|
|
104
106
|
_VERSION = version(_APP)
|
|
105
107
|
_AUTH_TOKEN_ENVVAR = os.environ.get(_AUTH_TOKEN_ENVVAR_KEY)
|
|
@@ -334,6 +336,11 @@ class Dart:
|
|
|
334
336
|
response = api.create_comment.sync_detailed(client=self._public_api, body=body)
|
|
335
337
|
return _get_response_parsed(response)
|
|
336
338
|
|
|
339
|
+
@_handle_request_errors
|
|
340
|
+
def list_comments(self, **kwargs) -> PaginatedCommentList:
|
|
341
|
+
response = api.list_comments.sync_detailed(client=self._public_api, **kwargs)
|
|
342
|
+
return _get_response_parsed(response)
|
|
343
|
+
|
|
337
344
|
@_handle_request_errors
|
|
338
345
|
def create_doc(self, body: WrappedDocCreate) -> WrappedDoc:
|
|
339
346
|
response = api.create_doc.sync_detailed(client=self._public_api, body=body)
|
|
@@ -498,6 +505,10 @@ def login(token: str | None = None) -> bool:
|
|
|
498
505
|
config = _Config()
|
|
499
506
|
dart = Dart(config=config)
|
|
500
507
|
|
|
508
|
+
if dart.is_logged_in():
|
|
509
|
+
_log("Already logged in.")
|
|
510
|
+
return True
|
|
511
|
+
|
|
501
512
|
_log("Log in to Dart")
|
|
502
513
|
if token is None:
|
|
503
514
|
if not _is_cli:
|
|
@@ -535,7 +546,9 @@ def begin_task() -> bool:
|
|
|
535
546
|
dart = Dart()
|
|
536
547
|
config = dart.get_config()
|
|
537
548
|
user = config.user
|
|
538
|
-
|
|
549
|
+
print(config.dartboards)
|
|
550
|
+
dartboard_maybe = {"dartboard": _DEFAULT_DARTBOARD} if _DEFAULT_DARTBOARD in config.dartboards else {}
|
|
551
|
+
filtered_tasks = dart.list_tasks(assignee=user.email, is_completed=False, **dartboard_maybe).results
|
|
539
552
|
|
|
540
553
|
if not filtered_tasks:
|
|
541
554
|
_dart_exit("No active, incomplete tasks found.")
|
dart/generated/api/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Contains methods for accessing the API"""
|
|
2
2
|
|
|
3
|
-
from .comment import create_comment
|
|
3
|
+
from .comment import create_comment, list_comments
|
|
4
4
|
from .config import get_config
|
|
5
5
|
from .dartboard import retrieve_dartboard
|
|
6
6
|
from .doc import create_doc, delete_doc, list_docs, retrieve_doc, update_doc
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from http import HTTPStatus
|
|
3
|
+
from typing import Any, Optional, Union
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.list_comments_o_item import ListCommentsOItem
|
|
10
|
+
from ...models.paginated_comment_list import PaginatedCommentList
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
author: Union[Unset, str] = UNSET,
|
|
17
|
+
author_id: Union[Unset, str] = UNSET,
|
|
18
|
+
ids: Union[Unset, str] = UNSET,
|
|
19
|
+
limit: Union[Unset, int] = UNSET,
|
|
20
|
+
o: Union[Unset, list[ListCommentsOItem]] = UNSET,
|
|
21
|
+
offset: Union[Unset, int] = UNSET,
|
|
22
|
+
parent_id: Union[None, Unset, str] = UNSET,
|
|
23
|
+
published_at_after: Union[Unset, datetime.datetime] = UNSET,
|
|
24
|
+
published_at_before: Union[Unset, datetime.datetime] = UNSET,
|
|
25
|
+
task: Union[Unset, str] = UNSET,
|
|
26
|
+
task_id: str,
|
|
27
|
+
text: Union[Unset, str] = UNSET,
|
|
28
|
+
) -> dict[str, Any]:
|
|
29
|
+
params: dict[str, Any] = {}
|
|
30
|
+
|
|
31
|
+
params["author"] = author
|
|
32
|
+
|
|
33
|
+
params["author_id"] = author_id
|
|
34
|
+
|
|
35
|
+
params["ids"] = ids
|
|
36
|
+
|
|
37
|
+
params["limit"] = limit
|
|
38
|
+
|
|
39
|
+
json_o: Union[Unset, list[str]] = UNSET
|
|
40
|
+
if not isinstance(o, Unset):
|
|
41
|
+
json_o = []
|
|
42
|
+
for o_item_data in o:
|
|
43
|
+
o_item = o_item_data.value
|
|
44
|
+
json_o.append(o_item)
|
|
45
|
+
|
|
46
|
+
params["o"] = json_o
|
|
47
|
+
|
|
48
|
+
params["offset"] = offset
|
|
49
|
+
|
|
50
|
+
json_parent_id: Union[None, Unset, str]
|
|
51
|
+
if isinstance(parent_id, Unset):
|
|
52
|
+
json_parent_id = UNSET
|
|
53
|
+
else:
|
|
54
|
+
json_parent_id = parent_id
|
|
55
|
+
params["parent_id"] = json_parent_id
|
|
56
|
+
|
|
57
|
+
json_published_at_after: Union[Unset, str] = UNSET
|
|
58
|
+
if not isinstance(published_at_after, Unset):
|
|
59
|
+
json_published_at_after = published_at_after.isoformat()
|
|
60
|
+
params["published_at_after"] = json_published_at_after
|
|
61
|
+
|
|
62
|
+
json_published_at_before: Union[Unset, str] = UNSET
|
|
63
|
+
if not isinstance(published_at_before, Unset):
|
|
64
|
+
json_published_at_before = published_at_before.isoformat()
|
|
65
|
+
params["published_at_before"] = json_published_at_before
|
|
66
|
+
|
|
67
|
+
params["task"] = task
|
|
68
|
+
|
|
69
|
+
params["task_id"] = task_id
|
|
70
|
+
|
|
71
|
+
params["text"] = text
|
|
72
|
+
|
|
73
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
74
|
+
|
|
75
|
+
_kwargs: dict[str, Any] = {
|
|
76
|
+
"method": "get",
|
|
77
|
+
"url": "/comments/list",
|
|
78
|
+
"params": params,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return _kwargs
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _parse_response(
|
|
85
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
86
|
+
) -> Optional[PaginatedCommentList]:
|
|
87
|
+
if response.status_code == 200:
|
|
88
|
+
response_200 = PaginatedCommentList.from_dict(response.json())
|
|
89
|
+
|
|
90
|
+
return response_200
|
|
91
|
+
if client.raise_on_unexpected_status:
|
|
92
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
93
|
+
else:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _build_response(
|
|
98
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
99
|
+
) -> Response[PaginatedCommentList]:
|
|
100
|
+
return Response(
|
|
101
|
+
status_code=HTTPStatus(response.status_code),
|
|
102
|
+
content=response.content,
|
|
103
|
+
headers=response.headers,
|
|
104
|
+
parsed=_parse_response(client=client, response=response),
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def sync_detailed(
|
|
109
|
+
*,
|
|
110
|
+
client: Union[AuthenticatedClient, Client],
|
|
111
|
+
author: Union[Unset, str] = UNSET,
|
|
112
|
+
author_id: Union[Unset, str] = UNSET,
|
|
113
|
+
ids: Union[Unset, str] = UNSET,
|
|
114
|
+
limit: Union[Unset, int] = UNSET,
|
|
115
|
+
o: Union[Unset, list[ListCommentsOItem]] = UNSET,
|
|
116
|
+
offset: Union[Unset, int] = UNSET,
|
|
117
|
+
parent_id: Union[None, Unset, str] = UNSET,
|
|
118
|
+
published_at_after: Union[Unset, datetime.datetime] = UNSET,
|
|
119
|
+
published_at_before: Union[Unset, datetime.datetime] = UNSET,
|
|
120
|
+
task: Union[Unset, str] = UNSET,
|
|
121
|
+
task_id: str,
|
|
122
|
+
text: Union[Unset, str] = UNSET,
|
|
123
|
+
) -> Response[PaginatedCommentList]:
|
|
124
|
+
"""List all comments that the user has access to. This will return a list of comments, including the
|
|
125
|
+
text, associated task ID, and others. Comments are ordered by thread and then by when they were
|
|
126
|
+
written.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
author (Union[Unset, str]):
|
|
130
|
+
author_id (Union[Unset, str]):
|
|
131
|
+
ids (Union[Unset, str]):
|
|
132
|
+
limit (Union[Unset, int]):
|
|
133
|
+
o (Union[Unset, list[ListCommentsOItem]]):
|
|
134
|
+
offset (Union[Unset, int]):
|
|
135
|
+
parent_id (Union[None, Unset, str]):
|
|
136
|
+
published_at_after (Union[Unset, datetime.datetime]):
|
|
137
|
+
published_at_before (Union[Unset, datetime.datetime]):
|
|
138
|
+
task (Union[Unset, str]):
|
|
139
|
+
task_id (str):
|
|
140
|
+
text (Union[Unset, str]):
|
|
141
|
+
|
|
142
|
+
Raises:
|
|
143
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
144
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
Response[PaginatedCommentList]
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
kwargs = _get_kwargs(
|
|
151
|
+
author=author,
|
|
152
|
+
author_id=author_id,
|
|
153
|
+
ids=ids,
|
|
154
|
+
limit=limit,
|
|
155
|
+
o=o,
|
|
156
|
+
offset=offset,
|
|
157
|
+
parent_id=parent_id,
|
|
158
|
+
published_at_after=published_at_after,
|
|
159
|
+
published_at_before=published_at_before,
|
|
160
|
+
task=task,
|
|
161
|
+
task_id=task_id,
|
|
162
|
+
text=text,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
response = client.get_httpx_client().request(
|
|
166
|
+
**kwargs,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
return _build_response(client=client, response=response)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def sync(
|
|
173
|
+
*,
|
|
174
|
+
client: Union[AuthenticatedClient, Client],
|
|
175
|
+
author: Union[Unset, str] = UNSET,
|
|
176
|
+
author_id: Union[Unset, str] = UNSET,
|
|
177
|
+
ids: Union[Unset, str] = UNSET,
|
|
178
|
+
limit: Union[Unset, int] = UNSET,
|
|
179
|
+
o: Union[Unset, list[ListCommentsOItem]] = UNSET,
|
|
180
|
+
offset: Union[Unset, int] = UNSET,
|
|
181
|
+
parent_id: Union[None, Unset, str] = UNSET,
|
|
182
|
+
published_at_after: Union[Unset, datetime.datetime] = UNSET,
|
|
183
|
+
published_at_before: Union[Unset, datetime.datetime] = UNSET,
|
|
184
|
+
task: Union[Unset, str] = UNSET,
|
|
185
|
+
task_id: str,
|
|
186
|
+
text: Union[Unset, str] = UNSET,
|
|
187
|
+
) -> Optional[PaginatedCommentList]:
|
|
188
|
+
"""List all comments that the user has access to. This will return a list of comments, including the
|
|
189
|
+
text, associated task ID, and others. Comments are ordered by thread and then by when they were
|
|
190
|
+
written.
|
|
191
|
+
|
|
192
|
+
Args:
|
|
193
|
+
author (Union[Unset, str]):
|
|
194
|
+
author_id (Union[Unset, str]):
|
|
195
|
+
ids (Union[Unset, str]):
|
|
196
|
+
limit (Union[Unset, int]):
|
|
197
|
+
o (Union[Unset, list[ListCommentsOItem]]):
|
|
198
|
+
offset (Union[Unset, int]):
|
|
199
|
+
parent_id (Union[None, Unset, str]):
|
|
200
|
+
published_at_after (Union[Unset, datetime.datetime]):
|
|
201
|
+
published_at_before (Union[Unset, datetime.datetime]):
|
|
202
|
+
task (Union[Unset, str]):
|
|
203
|
+
task_id (str):
|
|
204
|
+
text (Union[Unset, str]):
|
|
205
|
+
|
|
206
|
+
Raises:
|
|
207
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
208
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
209
|
+
|
|
210
|
+
Returns:
|
|
211
|
+
PaginatedCommentList
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
return sync_detailed(
|
|
215
|
+
client=client,
|
|
216
|
+
author=author,
|
|
217
|
+
author_id=author_id,
|
|
218
|
+
ids=ids,
|
|
219
|
+
limit=limit,
|
|
220
|
+
o=o,
|
|
221
|
+
offset=offset,
|
|
222
|
+
parent_id=parent_id,
|
|
223
|
+
published_at_after=published_at_after,
|
|
224
|
+
published_at_before=published_at_before,
|
|
225
|
+
task=task,
|
|
226
|
+
task_id=task_id,
|
|
227
|
+
text=text,
|
|
228
|
+
).parsed
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
async def asyncio_detailed(
|
|
232
|
+
*,
|
|
233
|
+
client: Union[AuthenticatedClient, Client],
|
|
234
|
+
author: Union[Unset, str] = UNSET,
|
|
235
|
+
author_id: Union[Unset, str] = UNSET,
|
|
236
|
+
ids: Union[Unset, str] = UNSET,
|
|
237
|
+
limit: Union[Unset, int] = UNSET,
|
|
238
|
+
o: Union[Unset, list[ListCommentsOItem]] = UNSET,
|
|
239
|
+
offset: Union[Unset, int] = UNSET,
|
|
240
|
+
parent_id: Union[None, Unset, str] = UNSET,
|
|
241
|
+
published_at_after: Union[Unset, datetime.datetime] = UNSET,
|
|
242
|
+
published_at_before: Union[Unset, datetime.datetime] = UNSET,
|
|
243
|
+
task: Union[Unset, str] = UNSET,
|
|
244
|
+
task_id: str,
|
|
245
|
+
text: Union[Unset, str] = UNSET,
|
|
246
|
+
) -> Response[PaginatedCommentList]:
|
|
247
|
+
"""List all comments that the user has access to. This will return a list of comments, including the
|
|
248
|
+
text, associated task ID, and others. Comments are ordered by thread and then by when they were
|
|
249
|
+
written.
|
|
250
|
+
|
|
251
|
+
Args:
|
|
252
|
+
author (Union[Unset, str]):
|
|
253
|
+
author_id (Union[Unset, str]):
|
|
254
|
+
ids (Union[Unset, str]):
|
|
255
|
+
limit (Union[Unset, int]):
|
|
256
|
+
o (Union[Unset, list[ListCommentsOItem]]):
|
|
257
|
+
offset (Union[Unset, int]):
|
|
258
|
+
parent_id (Union[None, Unset, str]):
|
|
259
|
+
published_at_after (Union[Unset, datetime.datetime]):
|
|
260
|
+
published_at_before (Union[Unset, datetime.datetime]):
|
|
261
|
+
task (Union[Unset, str]):
|
|
262
|
+
task_id (str):
|
|
263
|
+
text (Union[Unset, str]):
|
|
264
|
+
|
|
265
|
+
Raises:
|
|
266
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
267
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
268
|
+
|
|
269
|
+
Returns:
|
|
270
|
+
Response[PaginatedCommentList]
|
|
271
|
+
"""
|
|
272
|
+
|
|
273
|
+
kwargs = _get_kwargs(
|
|
274
|
+
author=author,
|
|
275
|
+
author_id=author_id,
|
|
276
|
+
ids=ids,
|
|
277
|
+
limit=limit,
|
|
278
|
+
o=o,
|
|
279
|
+
offset=offset,
|
|
280
|
+
parent_id=parent_id,
|
|
281
|
+
published_at_after=published_at_after,
|
|
282
|
+
published_at_before=published_at_before,
|
|
283
|
+
task=task,
|
|
284
|
+
task_id=task_id,
|
|
285
|
+
text=text,
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
289
|
+
|
|
290
|
+
return _build_response(client=client, response=response)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
async def asyncio(
|
|
294
|
+
*,
|
|
295
|
+
client: Union[AuthenticatedClient, Client],
|
|
296
|
+
author: Union[Unset, str] = UNSET,
|
|
297
|
+
author_id: Union[Unset, str] = UNSET,
|
|
298
|
+
ids: Union[Unset, str] = UNSET,
|
|
299
|
+
limit: Union[Unset, int] = UNSET,
|
|
300
|
+
o: Union[Unset, list[ListCommentsOItem]] = UNSET,
|
|
301
|
+
offset: Union[Unset, int] = UNSET,
|
|
302
|
+
parent_id: Union[None, Unset, str] = UNSET,
|
|
303
|
+
published_at_after: Union[Unset, datetime.datetime] = UNSET,
|
|
304
|
+
published_at_before: Union[Unset, datetime.datetime] = UNSET,
|
|
305
|
+
task: Union[Unset, str] = UNSET,
|
|
306
|
+
task_id: str,
|
|
307
|
+
text: Union[Unset, str] = UNSET,
|
|
308
|
+
) -> Optional[PaginatedCommentList]:
|
|
309
|
+
"""List all comments that the user has access to. This will return a list of comments, including the
|
|
310
|
+
text, associated task ID, and others. Comments are ordered by thread and then by when they were
|
|
311
|
+
written.
|
|
312
|
+
|
|
313
|
+
Args:
|
|
314
|
+
author (Union[Unset, str]):
|
|
315
|
+
author_id (Union[Unset, str]):
|
|
316
|
+
ids (Union[Unset, str]):
|
|
317
|
+
limit (Union[Unset, int]):
|
|
318
|
+
o (Union[Unset, list[ListCommentsOItem]]):
|
|
319
|
+
offset (Union[Unset, int]):
|
|
320
|
+
parent_id (Union[None, Unset, str]):
|
|
321
|
+
published_at_after (Union[Unset, datetime.datetime]):
|
|
322
|
+
published_at_before (Union[Unset, datetime.datetime]):
|
|
323
|
+
task (Union[Unset, str]):
|
|
324
|
+
task_id (str):
|
|
325
|
+
text (Union[Unset, str]):
|
|
326
|
+
|
|
327
|
+
Raises:
|
|
328
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
329
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
330
|
+
|
|
331
|
+
Returns:
|
|
332
|
+
PaginatedCommentList
|
|
333
|
+
"""
|
|
334
|
+
|
|
335
|
+
return (
|
|
336
|
+
await asyncio_detailed(
|
|
337
|
+
client=client,
|
|
338
|
+
author=author,
|
|
339
|
+
author_id=author_id,
|
|
340
|
+
ids=ids,
|
|
341
|
+
limit=limit,
|
|
342
|
+
o=o,
|
|
343
|
+
offset=offset,
|
|
344
|
+
parent_id=parent_id,
|
|
345
|
+
published_at_after=published_at_after,
|
|
346
|
+
published_at_before=published_at_before,
|
|
347
|
+
task=task,
|
|
348
|
+
task_id=task_id,
|
|
349
|
+
text=text,
|
|
350
|
+
)
|
|
351
|
+
).parsed
|
|
@@ -10,12 +10,15 @@ from .doc import Doc
|
|
|
10
10
|
from .doc_create import DocCreate
|
|
11
11
|
from .doc_update import DocUpdate
|
|
12
12
|
from .folder import Folder
|
|
13
|
+
from .list_comments_o_item import ListCommentsOItem
|
|
13
14
|
from .list_docs_o_item import ListDocsOItem
|
|
15
|
+
from .paginated_comment_list import PaginatedCommentList
|
|
14
16
|
from .paginated_concise_doc_list import PaginatedConciseDocList
|
|
15
17
|
from .paginated_concise_task_list import PaginatedConciseTaskList
|
|
16
18
|
from .priority import Priority
|
|
17
19
|
from .task import Task
|
|
18
20
|
from .task_create import TaskCreate
|
|
21
|
+
from .task_relationships import TaskRelationships
|
|
19
22
|
from .task_update import TaskUpdate
|
|
20
23
|
from .user import User
|
|
21
24
|
from .user_space_configuration import UserSpaceConfiguration
|
|
@@ -73,12 +76,15 @@ __all__ = (
|
|
|
73
76
|
"DocCreate",
|
|
74
77
|
"DocUpdate",
|
|
75
78
|
"Folder",
|
|
79
|
+
"ListCommentsOItem",
|
|
76
80
|
"ListDocsOItem",
|
|
81
|
+
"PaginatedCommentList",
|
|
77
82
|
"PaginatedConciseDocList",
|
|
78
83
|
"PaginatedConciseTaskList",
|
|
79
84
|
"Priority",
|
|
80
85
|
"Task",
|
|
81
86
|
"TaskCreate",
|
|
87
|
+
"TaskRelationships",
|
|
82
88
|
"TaskUpdate",
|
|
83
89
|
"User",
|
|
84
90
|
"UserSpaceConfiguration",
|
dart/generated/models/comment.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="Comment")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -13,16 +15,18 @@ class Comment:
|
|
|
13
15
|
Attributes:
|
|
14
16
|
id (str): The universal, unique ID of the comment.
|
|
15
17
|
html_url (str): The URL that can be used to open the comment in the Dart web UI.
|
|
16
|
-
task_id (str): The universal, unique ID of the task that the comment is associated with.
|
|
17
18
|
author (str): The name or email of the user that authored the comment.
|
|
19
|
+
task_id (str): The universal, unique ID of the task that the comment is associated with.
|
|
18
20
|
text (str): The full content of the comment, which can include markdown formatting.
|
|
21
|
+
parent_id (Union[Unset, str]): The universal, unique ID of the parent comment, if any.
|
|
19
22
|
"""
|
|
20
23
|
|
|
21
24
|
id: str
|
|
22
25
|
html_url: str
|
|
23
|
-
task_id: str
|
|
24
26
|
author: str
|
|
27
|
+
task_id: str
|
|
25
28
|
text: str
|
|
29
|
+
parent_id: Union[Unset, str] = UNSET
|
|
26
30
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
31
|
|
|
28
32
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -30,23 +34,27 @@ class Comment:
|
|
|
30
34
|
|
|
31
35
|
html_url = self.html_url
|
|
32
36
|
|
|
33
|
-
task_id = self.task_id
|
|
34
|
-
|
|
35
37
|
author = self.author
|
|
36
38
|
|
|
39
|
+
task_id = self.task_id
|
|
40
|
+
|
|
37
41
|
text = self.text
|
|
38
42
|
|
|
43
|
+
parent_id = self.parent_id
|
|
44
|
+
|
|
39
45
|
field_dict: dict[str, Any] = {}
|
|
40
46
|
field_dict.update(self.additional_properties)
|
|
41
47
|
field_dict.update(
|
|
42
48
|
{
|
|
43
49
|
"id": id,
|
|
44
50
|
"htmlUrl": html_url,
|
|
45
|
-
"taskId": task_id,
|
|
46
51
|
"author": author,
|
|
52
|
+
"taskId": task_id,
|
|
47
53
|
"text": text,
|
|
48
54
|
}
|
|
49
55
|
)
|
|
56
|
+
if parent_id is not UNSET:
|
|
57
|
+
field_dict["parentId"] = parent_id
|
|
50
58
|
|
|
51
59
|
return field_dict
|
|
52
60
|
|
|
@@ -57,18 +65,21 @@ class Comment:
|
|
|
57
65
|
|
|
58
66
|
html_url = d.pop("htmlUrl")
|
|
59
67
|
|
|
60
|
-
task_id = d.pop("taskId")
|
|
61
|
-
|
|
62
68
|
author = d.pop("author")
|
|
63
69
|
|
|
70
|
+
task_id = d.pop("taskId")
|
|
71
|
+
|
|
64
72
|
text = d.pop("text")
|
|
65
73
|
|
|
74
|
+
parent_id = d.pop("parentId", UNSET)
|
|
75
|
+
|
|
66
76
|
comment = cls(
|
|
67
77
|
id=id,
|
|
68
78
|
html_url=html_url,
|
|
69
|
-
task_id=task_id,
|
|
70
79
|
author=author,
|
|
80
|
+
task_id=task_id,
|
|
71
81
|
text=text,
|
|
82
|
+
parent_id=parent_id,
|
|
72
83
|
)
|
|
73
84
|
|
|
74
85
|
comment.additional_properties = d
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
7
9
|
T = TypeVar("T", bound="CommentCreate")
|
|
8
10
|
|
|
9
11
|
|
|
@@ -13,10 +15,12 @@ class CommentCreate:
|
|
|
13
15
|
Attributes:
|
|
14
16
|
task_id (str): The universal, unique ID of the task that the comment is associated with.
|
|
15
17
|
text (str): The full content of the comment, which can include markdown formatting.
|
|
18
|
+
parent_id (Union[Unset, str]): The universal, unique ID of the parent comment, if any.
|
|
16
19
|
"""
|
|
17
20
|
|
|
18
21
|
task_id: str
|
|
19
22
|
text: str
|
|
23
|
+
parent_id: Union[Unset, str] = UNSET
|
|
20
24
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
25
|
|
|
22
26
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -24,6 +28,8 @@ class CommentCreate:
|
|
|
24
28
|
|
|
25
29
|
text = self.text
|
|
26
30
|
|
|
31
|
+
parent_id = self.parent_id
|
|
32
|
+
|
|
27
33
|
field_dict: dict[str, Any] = {}
|
|
28
34
|
field_dict.update(self.additional_properties)
|
|
29
35
|
field_dict.update(
|
|
@@ -32,6 +38,8 @@ class CommentCreate:
|
|
|
32
38
|
"text": text,
|
|
33
39
|
}
|
|
34
40
|
)
|
|
41
|
+
if parent_id is not UNSET:
|
|
42
|
+
field_dict["parentId"] = parent_id
|
|
35
43
|
|
|
36
44
|
return field_dict
|
|
37
45
|
|
|
@@ -42,9 +50,12 @@ class CommentCreate:
|
|
|
42
50
|
|
|
43
51
|
text = d.pop("text")
|
|
44
52
|
|
|
53
|
+
parent_id = d.pop("parentId", UNSET)
|
|
54
|
+
|
|
45
55
|
comment_create = cls(
|
|
46
56
|
task_id=task_id,
|
|
47
57
|
text=text,
|
|
58
|
+
parent_id=parent_id,
|
|
48
59
|
)
|
|
49
60
|
|
|
50
61
|
comment_create.additional_properties = d
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.comment import Comment
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PaginatedCommentList")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PaginatedCommentList:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
count (int): Example: 123.
|
|
21
|
+
results (list['Comment']):
|
|
22
|
+
next_ (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=400&limit=100.
|
|
23
|
+
previous (Union[None, Unset, str]): Example: http://api.example.org/accounts/?offset=200&limit=100.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
count: int
|
|
27
|
+
results: list["Comment"]
|
|
28
|
+
next_: Union[None, Unset, str] = UNSET
|
|
29
|
+
previous: Union[None, Unset, str] = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
count = self.count
|
|
34
|
+
|
|
35
|
+
results = []
|
|
36
|
+
for results_item_data in self.results:
|
|
37
|
+
results_item = results_item_data.to_dict()
|
|
38
|
+
results.append(results_item)
|
|
39
|
+
|
|
40
|
+
next_: Union[None, Unset, str]
|
|
41
|
+
if isinstance(self.next_, Unset):
|
|
42
|
+
next_ = UNSET
|
|
43
|
+
else:
|
|
44
|
+
next_ = self.next_
|
|
45
|
+
|
|
46
|
+
previous: Union[None, Unset, str]
|
|
47
|
+
if isinstance(self.previous, Unset):
|
|
48
|
+
previous = UNSET
|
|
49
|
+
else:
|
|
50
|
+
previous = self.previous
|
|
51
|
+
|
|
52
|
+
field_dict: dict[str, Any] = {}
|
|
53
|
+
field_dict.update(self.additional_properties)
|
|
54
|
+
field_dict.update(
|
|
55
|
+
{
|
|
56
|
+
"count": count,
|
|
57
|
+
"results": results,
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
if next_ is not UNSET:
|
|
61
|
+
field_dict["next"] = next_
|
|
62
|
+
if previous is not UNSET:
|
|
63
|
+
field_dict["previous"] = previous
|
|
64
|
+
|
|
65
|
+
return field_dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
69
|
+
from ..models.comment import Comment
|
|
70
|
+
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
count = d.pop("count")
|
|
73
|
+
|
|
74
|
+
results = []
|
|
75
|
+
_results = d.pop("results")
|
|
76
|
+
for results_item_data in _results:
|
|
77
|
+
results_item = Comment.from_dict(results_item_data)
|
|
78
|
+
|
|
79
|
+
results.append(results_item)
|
|
80
|
+
|
|
81
|
+
def _parse_next_(data: object) -> Union[None, Unset, str]:
|
|
82
|
+
if data is None:
|
|
83
|
+
return data
|
|
84
|
+
if isinstance(data, Unset):
|
|
85
|
+
return data
|
|
86
|
+
return cast(Union[None, Unset, str], data)
|
|
87
|
+
|
|
88
|
+
next_ = _parse_next_(d.pop("next", UNSET))
|
|
89
|
+
|
|
90
|
+
def _parse_previous(data: object) -> Union[None, Unset, str]:
|
|
91
|
+
if data is None:
|
|
92
|
+
return data
|
|
93
|
+
if isinstance(data, Unset):
|
|
94
|
+
return data
|
|
95
|
+
return cast(Union[None, Unset, str], data)
|
|
96
|
+
|
|
97
|
+
previous = _parse_previous(d.pop("previous", UNSET))
|
|
98
|
+
|
|
99
|
+
paginated_comment_list = cls(
|
|
100
|
+
count=count,
|
|
101
|
+
results=results,
|
|
102
|
+
next_=next_,
|
|
103
|
+
previous=previous,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
paginated_comment_list.additional_properties = d
|
|
107
|
+
return paginated_comment_list
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def additional_keys(self) -> list[str]:
|
|
111
|
+
return list(self.additional_properties.keys())
|
|
112
|
+
|
|
113
|
+
def __getitem__(self, key: str) -> Any:
|
|
114
|
+
return self.additional_properties[key]
|
|
115
|
+
|
|
116
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
117
|
+
self.additional_properties[key] = value
|
|
118
|
+
|
|
119
|
+
def __delitem__(self, key: str) -> None:
|
|
120
|
+
del self.additional_properties[key]
|
|
121
|
+
|
|
122
|
+
def __contains__(self, key: str) -> bool:
|
|
123
|
+
return key in self.additional_properties
|
dart/generated/models/task.py
CHANGED
|
@@ -9,6 +9,7 @@ from ..types import UNSET, Unset
|
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
from ..models.custom_properties import CustomProperties
|
|
12
|
+
from ..models.task_relationships import TaskRelationships
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
T = TypeVar("T", bound="Task")
|
|
@@ -45,6 +46,7 @@ class Task:
|
|
|
45
46
|
on the task in hh:mm:ss format (or an empty string if no time has been tracked).
|
|
46
47
|
custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
|
|
47
48
|
properties that are associated with the task.
|
|
49
|
+
task_relationships (Union['TaskRelationships', None, Unset]): The relationships associated with the task.
|
|
48
50
|
"""
|
|
49
51
|
|
|
50
52
|
id: str
|
|
@@ -64,10 +66,12 @@ class Task:
|
|
|
64
66
|
size: Union[None, Unset, int, str] = UNSET
|
|
65
67
|
time_tracking: Union[Unset, str] = UNSET
|
|
66
68
|
custom_properties: Union["CustomProperties", None, Unset] = UNSET
|
|
69
|
+
task_relationships: Union["TaskRelationships", None, Unset] = UNSET
|
|
67
70
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
68
71
|
|
|
69
72
|
def to_dict(self) -> dict[str, Any]:
|
|
70
73
|
from ..models.custom_properties import CustomProperties
|
|
74
|
+
from ..models.task_relationships import TaskRelationships
|
|
71
75
|
|
|
72
76
|
id = self.id
|
|
73
77
|
|
|
@@ -141,6 +145,14 @@ class Task:
|
|
|
141
145
|
else:
|
|
142
146
|
custom_properties = self.custom_properties
|
|
143
147
|
|
|
148
|
+
task_relationships: Union[None, Unset, dict[str, Any]]
|
|
149
|
+
if isinstance(self.task_relationships, Unset):
|
|
150
|
+
task_relationships = UNSET
|
|
151
|
+
elif isinstance(self.task_relationships, TaskRelationships):
|
|
152
|
+
task_relationships = self.task_relationships.to_dict()
|
|
153
|
+
else:
|
|
154
|
+
task_relationships = self.task_relationships
|
|
155
|
+
|
|
144
156
|
field_dict: dict[str, Any] = {}
|
|
145
157
|
field_dict.update(self.additional_properties)
|
|
146
158
|
field_dict.update(
|
|
@@ -173,12 +185,15 @@ class Task:
|
|
|
173
185
|
field_dict["timeTracking"] = time_tracking
|
|
174
186
|
if custom_properties is not UNSET:
|
|
175
187
|
field_dict["customProperties"] = custom_properties
|
|
188
|
+
if task_relationships is not UNSET:
|
|
189
|
+
field_dict["taskRelationships"] = task_relationships
|
|
176
190
|
|
|
177
191
|
return field_dict
|
|
178
192
|
|
|
179
193
|
@classmethod
|
|
180
194
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
181
195
|
from ..models.custom_properties import CustomProperties
|
|
196
|
+
from ..models.task_relationships import TaskRelationships
|
|
182
197
|
|
|
183
198
|
d = dict(src_dict)
|
|
184
199
|
id = d.pop("id")
|
|
@@ -295,6 +310,25 @@ class Task:
|
|
|
295
310
|
|
|
296
311
|
custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
|
|
297
312
|
|
|
313
|
+
def _parse_task_relationships(
|
|
314
|
+
data: object,
|
|
315
|
+
) -> Union["TaskRelationships", None, Unset]:
|
|
316
|
+
if data is None:
|
|
317
|
+
return data
|
|
318
|
+
if isinstance(data, Unset):
|
|
319
|
+
return data
|
|
320
|
+
try:
|
|
321
|
+
if not isinstance(data, dict):
|
|
322
|
+
raise TypeError()
|
|
323
|
+
task_relationships_type_0 = TaskRelationships.from_dict(data)
|
|
324
|
+
|
|
325
|
+
return task_relationships_type_0
|
|
326
|
+
except: # noqa: E722
|
|
327
|
+
pass
|
|
328
|
+
return cast(Union["TaskRelationships", None, Unset], data)
|
|
329
|
+
|
|
330
|
+
task_relationships = _parse_task_relationships(d.pop("taskRelationships", UNSET))
|
|
331
|
+
|
|
298
332
|
task = cls(
|
|
299
333
|
id=id,
|
|
300
334
|
html_url=html_url,
|
|
@@ -313,6 +347,7 @@ class Task:
|
|
|
313
347
|
size=size,
|
|
314
348
|
time_tracking=time_tracking,
|
|
315
349
|
custom_properties=custom_properties,
|
|
350
|
+
task_relationships=task_relationships,
|
|
316
351
|
)
|
|
317
352
|
|
|
318
353
|
task.additional_properties = d
|
|
@@ -9,6 +9,7 @@ from ..types import UNSET, Unset
|
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
from ..models.custom_properties import CustomProperties
|
|
12
|
+
from ..models.task_relationships import TaskRelationships
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
T = TypeVar("T", bound="TaskCreate")
|
|
@@ -41,6 +42,7 @@ class TaskCreate:
|
|
|
41
42
|
is used to determine how long the task will take to complete.
|
|
42
43
|
custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
|
|
43
44
|
properties that are associated with the task.
|
|
45
|
+
task_relationships (Union['TaskRelationships', None, Unset]): The relationships associated with the task.
|
|
44
46
|
"""
|
|
45
47
|
|
|
46
48
|
title: str
|
|
@@ -57,10 +59,12 @@ class TaskCreate:
|
|
|
57
59
|
due_at: Union[None, Unset, str] = UNSET
|
|
58
60
|
size: Union[None, Unset, int, str] = UNSET
|
|
59
61
|
custom_properties: Union["CustomProperties", None, Unset] = UNSET
|
|
62
|
+
task_relationships: Union["TaskRelationships", None, Unset] = UNSET
|
|
60
63
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
61
64
|
|
|
62
65
|
def to_dict(self) -> dict[str, Any]:
|
|
63
66
|
from ..models.custom_properties import CustomProperties
|
|
67
|
+
from ..models.task_relationships import TaskRelationships
|
|
64
68
|
|
|
65
69
|
title = self.title
|
|
66
70
|
|
|
@@ -131,6 +135,14 @@ class TaskCreate:
|
|
|
131
135
|
else:
|
|
132
136
|
custom_properties = self.custom_properties
|
|
133
137
|
|
|
138
|
+
task_relationships: Union[None, Unset, dict[str, Any]]
|
|
139
|
+
if isinstance(self.task_relationships, Unset):
|
|
140
|
+
task_relationships = UNSET
|
|
141
|
+
elif isinstance(self.task_relationships, TaskRelationships):
|
|
142
|
+
task_relationships = self.task_relationships.to_dict()
|
|
143
|
+
else:
|
|
144
|
+
task_relationships = self.task_relationships
|
|
145
|
+
|
|
134
146
|
field_dict: dict[str, Any] = {}
|
|
135
147
|
field_dict.update(self.additional_properties)
|
|
136
148
|
field_dict.update(
|
|
@@ -164,12 +176,15 @@ class TaskCreate:
|
|
|
164
176
|
field_dict["size"] = size
|
|
165
177
|
if custom_properties is not UNSET:
|
|
166
178
|
field_dict["customProperties"] = custom_properties
|
|
179
|
+
if task_relationships is not UNSET:
|
|
180
|
+
field_dict["taskRelationships"] = task_relationships
|
|
167
181
|
|
|
168
182
|
return field_dict
|
|
169
183
|
|
|
170
184
|
@classmethod
|
|
171
185
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
172
186
|
from ..models.custom_properties import CustomProperties
|
|
187
|
+
from ..models.task_relationships import TaskRelationships
|
|
173
188
|
|
|
174
189
|
d = dict(src_dict)
|
|
175
190
|
title = d.pop("title")
|
|
@@ -282,6 +297,25 @@ class TaskCreate:
|
|
|
282
297
|
|
|
283
298
|
custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
|
|
284
299
|
|
|
300
|
+
def _parse_task_relationships(
|
|
301
|
+
data: object,
|
|
302
|
+
) -> Union["TaskRelationships", None, Unset]:
|
|
303
|
+
if data is None:
|
|
304
|
+
return data
|
|
305
|
+
if isinstance(data, Unset):
|
|
306
|
+
return data
|
|
307
|
+
try:
|
|
308
|
+
if not isinstance(data, dict):
|
|
309
|
+
raise TypeError()
|
|
310
|
+
task_relationships_type_0 = TaskRelationships.from_dict(data)
|
|
311
|
+
|
|
312
|
+
return task_relationships_type_0
|
|
313
|
+
except: # noqa: E722
|
|
314
|
+
pass
|
|
315
|
+
return cast(Union["TaskRelationships", None, Unset], data)
|
|
316
|
+
|
|
317
|
+
task_relationships = _parse_task_relationships(d.pop("taskRelationships", UNSET))
|
|
318
|
+
|
|
285
319
|
task_create = cls(
|
|
286
320
|
title=title,
|
|
287
321
|
parent_id=parent_id,
|
|
@@ -297,6 +331,7 @@ class TaskCreate:
|
|
|
297
331
|
due_at=due_at,
|
|
298
332
|
size=size,
|
|
299
333
|
custom_properties=custom_properties,
|
|
334
|
+
task_relationships=task_relationships,
|
|
300
335
|
)
|
|
301
336
|
|
|
302
337
|
task_create.additional_properties = d
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="TaskRelationships")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class TaskRelationships:
|
|
13
|
+
"""
|
|
14
|
+
Example:
|
|
15
|
+
{'subtaskIds': ['abcdefghijk1', 'abcdefghijk2'], 'blockerIds': ['abcdefghijk3'], 'blockingIds':
|
|
16
|
+
['abcdefghijk4'], 'duplicateIds': ['abcdefghijk5'], 'relatedIds': ['abcdefghijk6', 'abcdefghijk7']}
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
subtask_ids (Union[Unset, list[str]]): List of task IDs that are subtasks of this task
|
|
20
|
+
blocker_ids (Union[Unset, list[str]]): List of task IDs that block this task
|
|
21
|
+
blocking_ids (Union[Unset, list[str]]): List of task IDs that this task blocks
|
|
22
|
+
duplicate_ids (Union[Unset, list[str]]): List of task IDs that are duplicates of this task
|
|
23
|
+
related_ids (Union[Unset, list[str]]): List of task IDs that are related to this task
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
subtask_ids: Union[Unset, list[str]] = UNSET
|
|
27
|
+
blocker_ids: Union[Unset, list[str]] = UNSET
|
|
28
|
+
blocking_ids: Union[Unset, list[str]] = UNSET
|
|
29
|
+
duplicate_ids: Union[Unset, list[str]] = UNSET
|
|
30
|
+
related_ids: Union[Unset, list[str]] = UNSET
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
subtask_ids: Union[Unset, list[str]] = UNSET
|
|
34
|
+
if not isinstance(self.subtask_ids, Unset):
|
|
35
|
+
subtask_ids = self.subtask_ids
|
|
36
|
+
|
|
37
|
+
blocker_ids: Union[Unset, list[str]] = UNSET
|
|
38
|
+
if not isinstance(self.blocker_ids, Unset):
|
|
39
|
+
blocker_ids = self.blocker_ids
|
|
40
|
+
|
|
41
|
+
blocking_ids: Union[Unset, list[str]] = UNSET
|
|
42
|
+
if not isinstance(self.blocking_ids, Unset):
|
|
43
|
+
blocking_ids = self.blocking_ids
|
|
44
|
+
|
|
45
|
+
duplicate_ids: Union[Unset, list[str]] = UNSET
|
|
46
|
+
if not isinstance(self.duplicate_ids, Unset):
|
|
47
|
+
duplicate_ids = self.duplicate_ids
|
|
48
|
+
|
|
49
|
+
related_ids: Union[Unset, list[str]] = UNSET
|
|
50
|
+
if not isinstance(self.related_ids, Unset):
|
|
51
|
+
related_ids = self.related_ids
|
|
52
|
+
|
|
53
|
+
field_dict: dict[str, Any] = {}
|
|
54
|
+
field_dict.update({})
|
|
55
|
+
if subtask_ids is not UNSET:
|
|
56
|
+
field_dict["subtaskIds"] = subtask_ids
|
|
57
|
+
if blocker_ids is not UNSET:
|
|
58
|
+
field_dict["blockerIds"] = blocker_ids
|
|
59
|
+
if blocking_ids is not UNSET:
|
|
60
|
+
field_dict["blockingIds"] = blocking_ids
|
|
61
|
+
if duplicate_ids is not UNSET:
|
|
62
|
+
field_dict["duplicateIds"] = duplicate_ids
|
|
63
|
+
if related_ids is not UNSET:
|
|
64
|
+
field_dict["relatedIds"] = related_ids
|
|
65
|
+
|
|
66
|
+
return field_dict
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
70
|
+
d = dict(src_dict)
|
|
71
|
+
subtask_ids = cast(list[str], d.pop("subtaskIds", UNSET))
|
|
72
|
+
|
|
73
|
+
blocker_ids = cast(list[str], d.pop("blockerIds", UNSET))
|
|
74
|
+
|
|
75
|
+
blocking_ids = cast(list[str], d.pop("blockingIds", UNSET))
|
|
76
|
+
|
|
77
|
+
duplicate_ids = cast(list[str], d.pop("duplicateIds", UNSET))
|
|
78
|
+
|
|
79
|
+
related_ids = cast(list[str], d.pop("relatedIds", UNSET))
|
|
80
|
+
|
|
81
|
+
task_relationships = cls(
|
|
82
|
+
subtask_ids=subtask_ids,
|
|
83
|
+
blocker_ids=blocker_ids,
|
|
84
|
+
blocking_ids=blocking_ids,
|
|
85
|
+
duplicate_ids=duplicate_ids,
|
|
86
|
+
related_ids=related_ids,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return task_relationships
|
|
@@ -9,6 +9,7 @@ from ..types import UNSET, Unset
|
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
from ..models.custom_properties import CustomProperties
|
|
12
|
+
from ..models.task_relationships import TaskRelationships
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
T = TypeVar("T", bound="TaskUpdate")
|
|
@@ -42,6 +43,7 @@ class TaskUpdate:
|
|
|
42
43
|
is used to determine how long the task will take to complete.
|
|
43
44
|
custom_properties (Union['CustomProperties', None, Unset]): The custom properties, which is a dict of custom
|
|
44
45
|
properties that are associated with the task.
|
|
46
|
+
task_relationships (Union['TaskRelationships', None, Unset]): The relationships associated with the task.
|
|
45
47
|
"""
|
|
46
48
|
|
|
47
49
|
id: str
|
|
@@ -59,10 +61,12 @@ class TaskUpdate:
|
|
|
59
61
|
due_at: Union[None, Unset, str] = UNSET
|
|
60
62
|
size: Union[None, Unset, int, str] = UNSET
|
|
61
63
|
custom_properties: Union["CustomProperties", None, Unset] = UNSET
|
|
64
|
+
task_relationships: Union["TaskRelationships", None, Unset] = UNSET
|
|
62
65
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
63
66
|
|
|
64
67
|
def to_dict(self) -> dict[str, Any]:
|
|
65
68
|
from ..models.custom_properties import CustomProperties
|
|
69
|
+
from ..models.task_relationships import TaskRelationships
|
|
66
70
|
|
|
67
71
|
id = self.id
|
|
68
72
|
|
|
@@ -135,6 +139,14 @@ class TaskUpdate:
|
|
|
135
139
|
else:
|
|
136
140
|
custom_properties = self.custom_properties
|
|
137
141
|
|
|
142
|
+
task_relationships: Union[None, Unset, dict[str, Any]]
|
|
143
|
+
if isinstance(self.task_relationships, Unset):
|
|
144
|
+
task_relationships = UNSET
|
|
145
|
+
elif isinstance(self.task_relationships, TaskRelationships):
|
|
146
|
+
task_relationships = self.task_relationships.to_dict()
|
|
147
|
+
else:
|
|
148
|
+
task_relationships = self.task_relationships
|
|
149
|
+
|
|
138
150
|
field_dict: dict[str, Any] = {}
|
|
139
151
|
field_dict.update(self.additional_properties)
|
|
140
152
|
field_dict.update(
|
|
@@ -170,12 +182,15 @@ class TaskUpdate:
|
|
|
170
182
|
field_dict["size"] = size
|
|
171
183
|
if custom_properties is not UNSET:
|
|
172
184
|
field_dict["customProperties"] = custom_properties
|
|
185
|
+
if task_relationships is not UNSET:
|
|
186
|
+
field_dict["taskRelationships"] = task_relationships
|
|
173
187
|
|
|
174
188
|
return field_dict
|
|
175
189
|
|
|
176
190
|
@classmethod
|
|
177
191
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
178
192
|
from ..models.custom_properties import CustomProperties
|
|
193
|
+
from ..models.task_relationships import TaskRelationships
|
|
179
194
|
|
|
180
195
|
d = dict(src_dict)
|
|
181
196
|
id = d.pop("id")
|
|
@@ -290,6 +305,25 @@ class TaskUpdate:
|
|
|
290
305
|
|
|
291
306
|
custom_properties = _parse_custom_properties(d.pop("customProperties", UNSET))
|
|
292
307
|
|
|
308
|
+
def _parse_task_relationships(
|
|
309
|
+
data: object,
|
|
310
|
+
) -> Union["TaskRelationships", None, Unset]:
|
|
311
|
+
if data is None:
|
|
312
|
+
return data
|
|
313
|
+
if isinstance(data, Unset):
|
|
314
|
+
return data
|
|
315
|
+
try:
|
|
316
|
+
if not isinstance(data, dict):
|
|
317
|
+
raise TypeError()
|
|
318
|
+
task_relationships_type_0 = TaskRelationships.from_dict(data)
|
|
319
|
+
|
|
320
|
+
return task_relationships_type_0
|
|
321
|
+
except: # noqa: E722
|
|
322
|
+
pass
|
|
323
|
+
return cast(Union["TaskRelationships", None, Unset], data)
|
|
324
|
+
|
|
325
|
+
task_relationships = _parse_task_relationships(d.pop("taskRelationships", UNSET))
|
|
326
|
+
|
|
293
327
|
task_update = cls(
|
|
294
328
|
id=id,
|
|
295
329
|
title=title,
|
|
@@ -306,6 +340,7 @@ class TaskUpdate:
|
|
|
306
340
|
due_at=due_at,
|
|
307
341
|
size=size,
|
|
308
342
|
custom_properties=custom_properties,
|
|
343
|
+
task_relationships=task_relationships,
|
|
309
344
|
)
|
|
310
345
|
|
|
311
346
|
task_update.additional_properties = d
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
dart/__init__.py,sha256=M4oDY_DtfE7s50jXziRxVuL95hE1EKEaWOEmWxy8_Ig,523
|
|
2
|
-
dart/dart.py,sha256=
|
|
2
|
+
dart/dart.py,sha256=pP8Gpir5dAx16ctmTG5TjFgqThd6zbEWmEfS9D6DG34,27292
|
|
3
3
|
dart/exception.py,sha256=evN1SFV7Bal5dQIIOnhYA0cRu6jSa0cOCiG7AkHZD5A,85
|
|
4
4
|
dart/old.py,sha256=LqwFKYDpNwHlp_0NT9UACmAsx8PwYLyogLmY7YcuzVg,7053
|
|
5
5
|
dart/order_manager.py,sha256=WI8YEjdOuEFDNcRCm30INAA5lY8016ttt0yXElGIeUU,1882
|
|
@@ -8,9 +8,10 @@ dart/generated/__init__.py,sha256=8fO-FKZzuZzOUUaqtlgw7k08MUwNLf8Ll-cAt7BgmAU,15
|
|
|
8
8
|
dart/generated/client.py,sha256=o_mdLqyBCQstu5tS1WZFwqIEbGwkvWQ7eQjuCJw_5VY,12419
|
|
9
9
|
dart/generated/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
|
|
10
10
|
dart/generated/types.py,sha256=E1hhDh_zXfsSQ0NCt9-uw90_Mr5iIlsdfnfvxv5HarU,1005
|
|
11
|
-
dart/generated/api/__init__.py,sha256=
|
|
11
|
+
dart/generated/api/__init__.py,sha256=g9MEi__ZevU-eY9vjBZFzC2pVVocTexVgIFghWPU304,398
|
|
12
12
|
dart/generated/api/comment/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
13
13
|
dart/generated/api/comment/create_comment.py,sha256=G9kpQ60IrMC4cxXP--wsPvVtYPMmByy-t55wV4WkvbI,4757
|
|
14
|
+
dart/generated/api/comment/list_comments.py,sha256=dYmzqR6uQNAq_BFwCvurx3fb-ehXsZ2pO0kviCYCraM,11401
|
|
14
15
|
dart/generated/api/config/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
15
16
|
dart/generated/api/config/get_config.py,sha256=C9Pw-IhVpxCaIv_rbL85kKBsHze9rJ0O1FTXyFbSw9I,3913
|
|
16
17
|
dart/generated/api/dartboard/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
@@ -31,9 +32,9 @@ dart/generated/api/task/retrieve_task.py,sha256=Cmf0FPrbGxzIEO22BrcsixDs_HCEqw07
|
|
|
31
32
|
dart/generated/api/task/update_task.py,sha256=5f8wbMwQqRHya7D-iMFOcSL2VF1-flBUIIOYRJ1PjOA,5183
|
|
32
33
|
dart/generated/api/view/__init__.py,sha256=5vd9uJWAjRqa9xzxzYkLD1yoZ12Ld_bAaNB5WX4fbE8,56
|
|
33
34
|
dart/generated/api/view/retrieve_view.py,sha256=hQUpYzihR6u9m6Zy02RyHT5UDgPTa8ZvTlyYf-Znm0Y,4454
|
|
34
|
-
dart/generated/models/__init__.py,sha256=
|
|
35
|
-
dart/generated/models/comment.py,sha256=
|
|
36
|
-
dart/generated/models/comment_create.py,sha256=
|
|
35
|
+
dart/generated/models/__init__.py,sha256=N2TIgHOFIK2BXWzrogN98OQyD1RPAT0t0pW9LLrDYag,4177
|
|
36
|
+
dart/generated/models/comment.py,sha256=kLh7iDCW9uTq4kHxi_MSys4uTBpaZj2k5lIKUTkpSUY,2735
|
|
37
|
+
dart/generated/models/comment_create.py,sha256=GVC_LWi0_afdJkN0-qZsYFt9RCmU2DjRmKOwTsmAWTo,2138
|
|
37
38
|
dart/generated/models/concise_doc.py,sha256=xrJIJr4rm_iG0DlmpemBtzDaOxroHC2NgsG-V9CNsX8,2200
|
|
38
39
|
dart/generated/models/concise_task.py,sha256=aME0txheSEfVzFnIF2kKo5gNrOeAxCFrqxwQCG4etV4,11675
|
|
39
40
|
dart/generated/models/custom_properties.py,sha256=NmBTVtlzJbhZn_DURZLREdw_rVeK_isTQ9LT9CEYDVg,5172
|
|
@@ -42,13 +43,16 @@ dart/generated/models/doc.py,sha256=f_1aVMo7aCQTGOhH19IjrkucIbINj7n_OkbaZnbJ9tc,
|
|
|
42
43
|
dart/generated/models/doc_create.py,sha256=HOpiuuDg7fNEkwoUvXqceXKI59cDVBS5PzTR08iYE7E,2134
|
|
43
44
|
dart/generated/models/doc_update.py,sha256=Wv565KyrxMWxUCvqDJjcfzk2lalOj987o69RgBYF8wc,2376
|
|
44
45
|
dart/generated/models/folder.py,sha256=G0uGZqOgnj6ehkEsIMDjU5EGeDzIMp6H4KDreg6PfsI,2729
|
|
46
|
+
dart/generated/models/list_comments_o_item.py,sha256=N4zhK9euG0-r0nvT961QEQ0RLzFYqJ3J6HzTjNKntr8,230
|
|
45
47
|
dart/generated/models/list_docs_o_item.py,sha256=owGxTljNQTi1KAHkfTknrSTMEome1x75vUbHRVO12JM,320
|
|
48
|
+
dart/generated/models/paginated_comment_list.py,sha256=EHuFqkBMa1xPagKGq6p6qBktb7IgNPkdSbO5aij7M6k,3624
|
|
46
49
|
dart/generated/models/paginated_concise_doc_list.py,sha256=Y7YbOwd7TaHm7b9rHJvVKEynHEp-xgCyN0Kw5gEZ4i8,3665
|
|
47
50
|
dart/generated/models/paginated_concise_task_list.py,sha256=Yu-r-WvWBH3LfMWGm3YNQ30w1-B0mdxjx5jykKFFQlY,3677
|
|
48
51
|
dart/generated/models/priority.py,sha256=eupjzXQndyaia8svwVmylisIGwl6OQ_0g8pgcsm8118,195
|
|
49
|
-
dart/generated/models/task.py,sha256=
|
|
50
|
-
dart/generated/models/task_create.py,sha256=
|
|
51
|
-
dart/generated/models/
|
|
52
|
+
dart/generated/models/task.py,sha256=gdQgA9nplF5lREELSycflnUflQNECMFIazz4b6QO8rw,13443
|
|
53
|
+
dart/generated/models/task_create.py,sha256=WAgkslCtWfp3nNCLhgBzpZu3FwyodNUhz9rRUQAnEQ4,13175
|
|
54
|
+
dart/generated/models/task_relationships.py,sha256=EP51ZcmAYa8K-NIG54P_voXOo5a87BUeOMBRE-QN1BQ,3284
|
|
55
|
+
dart/generated/models/task_update.py,sha256=YCNDEM2xdg4ComkPIFZ74U4m86n7cPZZsw_jLy_ARfg,13418
|
|
52
56
|
dart/generated/models/user.py,sha256=Vl63zDoadat1k5NtTq3AAI0NMTp5T3DOIAcM5zZXD3o,1552
|
|
53
57
|
dart/generated/models/user_space_configuration.py,sha256=iFfcWLp2kmSYO3uR92CyeY2BV6mm6FtGSyYeW5y_zZk,16898
|
|
54
58
|
dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py,sha256=tW7yyj3vN2_pf_DFLiWDEiXnIwj2P-fPsl9cc4y55uw,2014
|
|
@@ -73,9 +77,9 @@ dart/generated/models/wrapped_task.py,sha256=TRlVMxIGhDwSaJlXdMH6q7Vx2hpz7EdiGns
|
|
|
73
77
|
dart/generated/models/wrapped_task_create.py,sha256=Oxdot2EwfEuC3l4uo0fAvmyjRNVkXALmWCvfgHI7BcI,1654
|
|
74
78
|
dart/generated/models/wrapped_task_update.py,sha256=_erGSSR_k6ahF_RFjgLKdyitx5TDQiFw_Ml77zHQdJM,1654
|
|
75
79
|
dart/generated/models/wrapped_view.py,sha256=zflJxA4UnITM8w-0EObw4AF54yS-c_e5UL6vaikXyG8,1577
|
|
76
|
-
dart_tools-0.7.
|
|
77
|
-
dart_tools-0.7.
|
|
78
|
-
dart_tools-0.7.
|
|
79
|
-
dart_tools-0.7.
|
|
80
|
-
dart_tools-0.7.
|
|
81
|
-
dart_tools-0.7.
|
|
80
|
+
dart_tools-0.7.6.dist-info/licenses/LICENSE,sha256=aD_0TnuylEaAHWNURgifNek_ODn5Pg36o9gFdspgHtg,1061
|
|
81
|
+
dart_tools-0.7.6.dist-info/METADATA,sha256=jtzQN12Iyx_2kayjnkwwb2fVTQEXm4Ra-1Y4pSqikJc,9008
|
|
82
|
+
dart_tools-0.7.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
83
|
+
dart_tools-0.7.6.dist-info/entry_points.txt,sha256=KOVAnDWJbSKn9HoXWQ7x6NfACYzSMGHBBaBxonHEv6w,34
|
|
84
|
+
dart_tools-0.7.6.dist-info/top_level.txt,sha256=ZwUQ6QjCyi1i32BJOAkbOA7UfgitLmIwToJGJwZXPrg,5
|
|
85
|
+
dart_tools-0.7.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|