dart-tools 0.7.4__tar.gz → 0.7.5__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.

Potentially problematic release.


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

Files changed (89) hide show
  1. {dart_tools-0.7.4/dart_tools.egg-info → dart_tools-0.7.5}/PKG-INFO +1 -1
  2. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/dart.py +6 -0
  3. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/__init__.py +1 -1
  4. dart_tools-0.7.5/dart/generated/api/comment/list_comments.py +351 -0
  5. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/__init__.py +4 -0
  6. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/comment.py +20 -9
  7. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/comment_create.py +12 -1
  8. dart_tools-0.7.5/dart/generated/models/list_comments_o_item.py +10 -0
  9. dart_tools-0.7.5/dart/generated/models/paginated_comment_list.py +123 -0
  10. {dart_tools-0.7.4 → dart_tools-0.7.5/dart_tools.egg-info}/PKG-INFO +1 -1
  11. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart_tools.egg-info/SOURCES.txt +3 -0
  12. {dart_tools-0.7.4 → dart_tools-0.7.5}/pyproject.toml +1 -1
  13. {dart_tools-0.7.4 → dart_tools-0.7.5}/LICENSE +0 -0
  14. {dart_tools-0.7.4 → dart_tools-0.7.5}/README.md +0 -0
  15. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/__init__.py +0 -0
  16. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/exception.py +0 -0
  17. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/__init__.py +0 -0
  18. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/comment/__init__.py +0 -0
  19. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/comment/create_comment.py +0 -0
  20. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/config/__init__.py +0 -0
  21. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/config/get_config.py +0 -0
  22. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/dartboard/__init__.py +0 -0
  23. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/dartboard/retrieve_dartboard.py +0 -0
  24. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/doc/__init__.py +0 -0
  25. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/doc/create_doc.py +0 -0
  26. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/doc/delete_doc.py +0 -0
  27. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/doc/list_docs.py +0 -0
  28. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/doc/retrieve_doc.py +0 -0
  29. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/doc/update_doc.py +0 -0
  30. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/folder/__init__.py +0 -0
  31. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/folder/retrieve_folder.py +0 -0
  32. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/task/__init__.py +0 -0
  33. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/task/create_task.py +0 -0
  34. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/task/delete_task.py +0 -0
  35. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/task/list_tasks.py +0 -0
  36. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/task/retrieve_task.py +0 -0
  37. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/task/update_task.py +0 -0
  38. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/view/__init__.py +0 -0
  39. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/api/view/retrieve_view.py +0 -0
  40. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/client.py +0 -0
  41. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/errors.py +0 -0
  42. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/concise_doc.py +0 -0
  43. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/concise_task.py +0 -0
  44. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/custom_properties.py +0 -0
  45. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/dartboard.py +0 -0
  46. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/doc.py +0 -0
  47. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/doc_create.py +0 -0
  48. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/doc_update.py +0 -0
  49. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/folder.py +0 -0
  50. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/list_docs_o_item.py +0 -0
  51. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/paginated_concise_doc_list.py +0 -0
  52. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/paginated_concise_task_list.py +0 -0
  53. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/priority.py +0 -0
  54. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/task.py +0 -0
  55. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/task_create.py +0 -0
  56. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/task_update.py +0 -0
  57. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user.py +0 -0
  58. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration.py +0 -0
  59. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +0 -0
  60. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +0 -0
  61. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +0 -0
  62. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_number_type_def.py +0 -0
  63. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +0 -0
  64. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_select_type_def.py +0 -0
  65. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_status_type_def.py +0 -0
  66. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_text_type_def.py +0 -0
  67. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +0 -0
  68. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/user_space_configuration_custom_property_user_type_def.py +0 -0
  69. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/view.py +0 -0
  70. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_comment.py +0 -0
  71. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_comment_create.py +0 -0
  72. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_dartboard.py +0 -0
  73. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_doc.py +0 -0
  74. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_doc_create.py +0 -0
  75. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_doc_update.py +0 -0
  76. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_folder.py +0 -0
  77. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_task.py +0 -0
  78. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_task_create.py +0 -0
  79. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_task_update.py +0 -0
  80. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/models/wrapped_view.py +0 -0
  81. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/generated/types.py +0 -0
  82. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/old.py +0 -0
  83. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/order_manager.py +0 -0
  84. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart/webhook.py +0 -0
  85. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart_tools.egg-info/dependency_links.txt +0 -0
  86. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart_tools.egg-info/entry_points.txt +0 -0
  87. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart_tools.egg-info/requires.txt +0 -0
  88. {dart_tools-0.7.4 → dart_tools-0.7.5}/dart_tools.egg-info/top_level.txt +0 -0
  89. {dart_tools-0.7.4 → dart_tools-0.7.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dart-tools
3
- Version: 0.7.4
3
+ Version: 0.7.5
4
4
  Summary: The Dart CLI and Python Library
5
5
  Author-email: Dart <software@itsdart.com>
6
6
  License: MIT License
@@ -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,
@@ -334,6 +335,11 @@ class Dart:
334
335
  response = api.create_comment.sync_detailed(client=self._public_api, body=body)
335
336
  return _get_response_parsed(response)
336
337
 
338
+ @_handle_request_errors
339
+ def list_comments(self, **kwargs) -> PaginatedCommentList:
340
+ response = api.list_comments.sync_detailed(client=self._public_api, **kwargs)
341
+ return _get_response_parsed(response)
342
+
337
343
  @_handle_request_errors
338
344
  def create_doc(self, body: WrappedDocCreate) -> WrappedDoc:
339
345
  response = api.create_doc.sync_detailed(client=self._public_api, body=body)
@@ -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,7 +10,9 @@ 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
@@ -73,7 +75,9 @@ __all__ = (
73
75
  "DocCreate",
74
76
  "DocUpdate",
75
77
  "Folder",
78
+ "ListCommentsOItem",
76
79
  "ListDocsOItem",
80
+ "PaginatedCommentList",
77
81
  "PaginatedConciseDocList",
78
82
  "PaginatedConciseTaskList",
79
83
  "Priority",
@@ -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,10 @@
1
+ from enum import Enum
2
+
3
+
4
+ class ListCommentsOItem(str, Enum):
5
+ HIERARCHICAL = "hierarchical"
6
+ PUBLISHED_AT = "published_at"
7
+ PUBLISHED_AT_DESC = "-published_at"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dart-tools
3
- Version: 0.7.4
3
+ Version: 0.7.5
4
4
  Summary: The Dart CLI and Python Library
5
5
  Author-email: Dart <software@itsdart.com>
6
6
  License: MIT License
@@ -14,6 +14,7 @@ dart/generated/types.py
14
14
  dart/generated/api/__init__.py
15
15
  dart/generated/api/comment/__init__.py
16
16
  dart/generated/api/comment/create_comment.py
17
+ dart/generated/api/comment/list_comments.py
17
18
  dart/generated/api/config/__init__.py
18
19
  dart/generated/api/config/get_config.py
19
20
  dart/generated/api/dartboard/__init__.py
@@ -45,7 +46,9 @@ dart/generated/models/doc.py
45
46
  dart/generated/models/doc_create.py
46
47
  dart/generated/models/doc_update.py
47
48
  dart/generated/models/folder.py
49
+ dart/generated/models/list_comments_o_item.py
48
50
  dart/generated/models/list_docs_o_item.py
51
+ dart/generated/models/paginated_comment_list.py
49
52
  dart/generated/models/paginated_concise_doc_list.py
50
53
  dart/generated/models/paginated_concise_task_list.py
51
54
  dart/generated/models/priority.py
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dart-tools"
3
- version = "0.7.4"
3
+ version = "0.7.5"
4
4
  description = "The Dart CLI and Python Library"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes