dart-tools 0.7.4__tar.gz → 0.7.6__tar.gz
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.
- {dart_tools-0.7.4/dart_tools.egg-info → dart_tools-0.7.6}/PKG-INFO +1 -1
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/dart.py +14 -1
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/__init__.py +1 -1
- dart_tools-0.7.6/dart/generated/api/comment/list_comments.py +351 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/__init__.py +6 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/comment.py +20 -9
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/comment_create.py +12 -1
- dart_tools-0.7.6/dart/generated/models/list_comments_o_item.py +10 -0
- dart_tools-0.7.6/dart/generated/models/paginated_comment_list.py +123 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/task.py +35 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/task_create.py +35 -0
- dart_tools-0.7.6/dart/generated/models/task_relationships.py +89 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/task_update.py +35 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6/dart_tools.egg-info}/PKG-INFO +1 -1
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart_tools.egg-info/SOURCES.txt +4 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/pyproject.toml +1 -1
- {dart_tools-0.7.4 → dart_tools-0.7.6}/LICENSE +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/README.md +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/exception.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/comment/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/comment/create_comment.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/config/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/config/get_config.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/dartboard/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/dartboard/retrieve_dartboard.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/doc/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/doc/create_doc.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/doc/delete_doc.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/doc/list_docs.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/doc/retrieve_doc.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/doc/update_doc.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/folder/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/folder/retrieve_folder.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/task/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/task/create_task.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/task/delete_task.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/task/list_tasks.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/task/retrieve_task.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/task/update_task.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/view/__init__.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/api/view/retrieve_view.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/client.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/errors.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/concise_doc.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/concise_task.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/custom_properties.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/dartboard.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/doc.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/doc_create.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/doc_update.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/folder.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/list_docs_o_item.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/paginated_concise_doc_list.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/paginated_concise_task_list.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/priority.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_number_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_select_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_status_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_text_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/user_space_configuration_custom_property_user_type_def.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/view.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_comment.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_comment_create.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_dartboard.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_doc.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_doc_create.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_doc_update.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_folder.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_task.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_task_create.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_task_update.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/models/wrapped_view.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/generated/types.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/old.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/order_manager.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart/webhook.py +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart_tools.egg-info/dependency_links.txt +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart_tools.egg-info/entry_points.txt +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart_tools.egg-info/requires.txt +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/dart_tools.egg-info/top_level.txt +0 -0
- {dart_tools-0.7.4 → dart_tools-0.7.6}/setup.cfg +0 -0
|
@@ -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.")
|
|
@@ -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",
|
|
@@ -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
|