dart-tools 0.8.6__py3-none-any.whl → 0.8.8__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.
- dart/dart.py +7 -94
- dart/generated/api/__init__.py +1 -1
- dart/generated/api/task/add_task_time_tracking.py +190 -0
- dart/generated/api/task/move_task.py +190 -0
- dart/generated/models/__init__.py +22 -0
- dart/generated/models/custom_properties.py +8 -8
- dart/generated/models/list_docs_o_item.py +5 -5
- dart/generated/models/list_tasks_o_item.py +5 -5
- dart/generated/models/paginated_comment_list.py +42 -0
- dart/generated/models/paginated_comment_list_meta_type_0.py +109 -0
- dart/generated/models/paginated_comment_list_meta_type_0_applied_default_filters.py +44 -0
- dart/generated/models/paginated_concise_doc_list.py +42 -0
- dart/generated/models/paginated_concise_doc_list_meta_type_0.py +109 -0
- dart/generated/models/paginated_concise_doc_list_meta_type_0_applied_default_filters.py +44 -0
- dart/generated/models/paginated_concise_task_list.py +42 -0
- dart/generated/models/paginated_concise_task_list_meta_type_0.py +109 -0
- dart/generated/models/paginated_concise_task_list_meta_type_0_applied_default_filters.py +44 -0
- dart/generated/models/task_move.py +94 -0
- dart/generated/models/task_time_tracking_create.py +84 -0
- {dart_tools-0.8.6.dist-info → dart_tools-0.8.8.dist-info}/METADATA +1 -1
- {dart_tools-0.8.6.dist-info → dart_tools-0.8.8.dist-info}/RECORD +25 -15
- {dart_tools-0.8.6.dist-info → dart_tools-0.8.8.dist-info}/WHEEL +0 -0
- {dart_tools-0.8.6.dist-info → dart_tools-0.8.8.dist-info}/entry_points.txt +0 -0
- {dart_tools-0.8.6.dist-info → dart_tools-0.8.8.dist-info}/licenses/LICENSE +0 -0
- {dart_tools-0.8.6.dist-info → dart_tools-0.8.8.dist-info}/top_level.txt +0 -0
dart/dart.py
CHANGED
|
@@ -374,70 +374,10 @@ class Dart:
|
|
|
374
374
|
self._private_api.get_httpx_client().post(_COPY_BRANCH_URL_FRAG, json={"duid": id})
|
|
375
375
|
|
|
376
376
|
|
|
377
|
-
|
|
378
|
-
@
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
_run_cmd(f"{cmd} 2>&1")
|
|
382
|
-
except subprocess.CalledProcessError as ex:
|
|
383
|
-
if "128" in str(ex):
|
|
384
|
-
return False
|
|
385
|
-
raise ex
|
|
386
|
-
return True
|
|
387
|
-
|
|
388
|
-
@staticmethod
|
|
389
|
-
def make_task_name(email: str, task: ConciseTask | Task) -> str:
|
|
390
|
-
username = slugify_str(email.split("@")[0], lower=True)
|
|
391
|
-
title = slugify_str(task.title, lower=True)
|
|
392
|
-
return trim_slug_str(f"{username}/{task.id}-{title}", length=60)
|
|
393
|
-
|
|
394
|
-
@staticmethod
|
|
395
|
-
def get_current_branch() -> str:
|
|
396
|
-
return _run_cmd("git rev-parse --abbrev-ref HEAD").strip()
|
|
397
|
-
|
|
398
|
-
@staticmethod
|
|
399
|
-
def ensure_in_repo() -> None:
|
|
400
|
-
if _Git._cmd_succeeds("git rev-parse --is-inside-work-tree"):
|
|
401
|
-
return
|
|
402
|
-
_dart_exit("You are not in a git repo.")
|
|
403
|
-
|
|
404
|
-
@staticmethod
|
|
405
|
-
def ensure_no_unstaged_changes() -> None:
|
|
406
|
-
if _run_cmd("git status --porcelain") == "":
|
|
407
|
-
return
|
|
408
|
-
_dart_exit("You have uncommitted changes. Please commit or stash them.")
|
|
409
|
-
|
|
410
|
-
@staticmethod
|
|
411
|
-
def ensure_on_main_or_intended() -> None:
|
|
412
|
-
branch = _Git.get_current_branch()
|
|
413
|
-
if branch == "main":
|
|
414
|
-
return
|
|
415
|
-
if (
|
|
416
|
-
pick(
|
|
417
|
-
["Yes", "No"],
|
|
418
|
-
"You're not on the 'main' branch. Is this intentional?",
|
|
419
|
-
"→",
|
|
420
|
-
)[0]
|
|
421
|
-
== "Yes"
|
|
422
|
-
):
|
|
423
|
-
return
|
|
424
|
-
_run_cmd("git checkout main")
|
|
425
|
-
|
|
426
|
-
@staticmethod
|
|
427
|
-
def branch_exists(branch: str) -> bool:
|
|
428
|
-
return _Git._cmd_succeeds(f"git rev-parse --verify {branch}")
|
|
429
|
-
|
|
430
|
-
@staticmethod
|
|
431
|
-
def checkout_branch(branch: str) -> None:
|
|
432
|
-
if _Git.branch_exists(branch):
|
|
433
|
-
_run_cmd(f"git checkout {branch}")
|
|
434
|
-
return
|
|
435
|
-
|
|
436
|
-
if _Git.branch_exists(f"origin/{branch}"):
|
|
437
|
-
_run_cmd(f"git checkout --track origin/{branch}")
|
|
438
|
-
return
|
|
439
|
-
|
|
440
|
-
_run_cmd(f"git checkout -b {branch}")
|
|
377
|
+
def make_task_branch_name(email: str, task: ConciseTask | Task) -> str:
|
|
378
|
+
username = slugify_str(email.split("@")[0], lower=True)
|
|
379
|
+
title = slugify_str(task.title, lower=True)
|
|
380
|
+
return trim_slug_str(f"{username}/{task.id}-{title}", length=60)
|
|
441
381
|
|
|
442
382
|
|
|
443
383
|
def get_host() -> str:
|
|
@@ -530,26 +470,11 @@ def login(token: str | None = None) -> bool:
|
|
|
530
470
|
return True
|
|
531
471
|
|
|
532
472
|
|
|
533
|
-
def _begin_task(dart: Dart, email: str, task: ConciseTask | Task) -> bool:
|
|
534
|
-
_Git.ensure_in_repo()
|
|
535
|
-
_Git.ensure_no_unstaged_changes()
|
|
536
|
-
_Git.ensure_on_main_or_intended()
|
|
537
|
-
|
|
538
|
-
dart = Dart()
|
|
539
|
-
dart.copy_branch_link(task.id)
|
|
540
|
-
|
|
541
|
-
branch_name = _Git.make_task_name(email, task)
|
|
542
|
-
_Git.checkout_branch(branch_name)
|
|
543
|
-
|
|
544
|
-
_log(f"Started work on\n\n {task.title}\n {task.html_url}\n")
|
|
545
|
-
return True
|
|
546
|
-
|
|
547
473
|
|
|
548
474
|
def begin_task() -> bool:
|
|
549
475
|
dart = Dart()
|
|
550
476
|
config = dart.get_config()
|
|
551
477
|
user = config.user
|
|
552
|
-
print(config.dartboards)
|
|
553
478
|
dartboard_maybe = {"dartboard": _DEFAULT_DARTBOARD} if _DEFAULT_DARTBOARD in config.dartboards else {}
|
|
554
479
|
filtered_tasks = dart.list_tasks(assignee=user.email, is_completed=False, **dartboard_maybe).results
|
|
555
480
|
|
|
@@ -563,9 +488,10 @@ def begin_task() -> bool:
|
|
|
563
488
|
)[1]
|
|
564
489
|
assert isinstance(picked_idx, int)
|
|
565
490
|
|
|
566
|
-
|
|
491
|
+
task = filtered_tasks[picked_idx]
|
|
492
|
+
branch_name = make_task_branch_name(user.email, task)
|
|
567
493
|
|
|
568
|
-
_log("
|
|
494
|
+
_log(json.dumps({"title": task.title, "branch": branch_name, "id": task.id}))
|
|
569
495
|
return True
|
|
570
496
|
|
|
571
497
|
|
|
@@ -601,7 +527,6 @@ def create_task(
|
|
|
601
527
|
priority_int: Union[int, None, Unset] = UNSET,
|
|
602
528
|
size_int: Union[int, None, Unset] = UNSET,
|
|
603
529
|
due_at_str: Union[str, None, Unset] = UNSET,
|
|
604
|
-
should_begin: bool = False,
|
|
605
530
|
) -> Task:
|
|
606
531
|
dart = Dart()
|
|
607
532
|
task_create = WrappedTaskCreate(
|
|
@@ -619,11 +544,6 @@ def create_task(
|
|
|
619
544
|
task = dart.create_task(task_create).item
|
|
620
545
|
_log(f"Created task\n\n {task.title}\n {task.html_url}\n ID: {task.id}\n")
|
|
621
546
|
|
|
622
|
-
if should_begin:
|
|
623
|
-
user = dart.get_config().user
|
|
624
|
-
_begin_task(dart, user.email, task)
|
|
625
|
-
|
|
626
|
-
_log("Done.")
|
|
627
547
|
return task
|
|
628
548
|
|
|
629
549
|
|
|
@@ -819,13 +739,6 @@ def cli() -> None:
|
|
|
819
739
|
_CREATE_TASK_CMD, aliases=["tc"], help=_HELP_TEXT_TO_COMMAND[_CREATE_TASK_CMD]
|
|
820
740
|
)
|
|
821
741
|
create_task_parser.add_argument("title", help="title of the task")
|
|
822
|
-
create_task_parser.add_argument(
|
|
823
|
-
"-b",
|
|
824
|
-
"--begin",
|
|
825
|
-
dest="should_begin",
|
|
826
|
-
action="store_true",
|
|
827
|
-
help="begin work on the task after creation",
|
|
828
|
-
)
|
|
829
742
|
_add_standard_task_arguments(create_task_parser)
|
|
830
743
|
create_task_parser.set_defaults(func=create_task)
|
|
831
744
|
|
dart/generated/api/__init__.py
CHANGED
|
@@ -8,5 +8,5 @@ from .doc import create_doc, delete_doc, get_doc, list_docs, update_doc
|
|
|
8
8
|
from .folder import get_folder
|
|
9
9
|
from .help_center_article import list_help_center_articles
|
|
10
10
|
from .skill import retrieve_skill_by_title
|
|
11
|
-
from .task import create_task, delete_task, get_task, list_tasks, update_task
|
|
11
|
+
from .task import add_task_time_tracking, create_task, delete_task, get_task, list_tasks, move_task, update_task
|
|
12
12
|
from .view import get_view
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.task_time_tracking_create import TaskTimeTrackingCreate
|
|
9
|
+
from ...models.wrapped_task import WrappedTask
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
id: str,
|
|
15
|
+
*,
|
|
16
|
+
body: TaskTimeTrackingCreate,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/tasks/{id}/time-tracking".format(
|
|
23
|
+
id=id,
|
|
24
|
+
),
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_body = body.to_dict()
|
|
28
|
+
|
|
29
|
+
_kwargs["json"] = _body
|
|
30
|
+
headers["Content-Type"] = "application/json"
|
|
31
|
+
|
|
32
|
+
_kwargs["headers"] = headers
|
|
33
|
+
return _kwargs
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
38
|
+
) -> Optional[Union[Any, WrappedTask]]:
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
response_200 = WrappedTask.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
if response.status_code == 400:
|
|
44
|
+
response_400 = cast(Any, None)
|
|
45
|
+
return response_400
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
54
|
+
) -> Response[Union[Any, WrappedTask]]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
id: str,
|
|
65
|
+
*,
|
|
66
|
+
client: Union[AuthenticatedClient, Client],
|
|
67
|
+
body: TaskTimeTrackingCreate,
|
|
68
|
+
) -> Response[Union[Any, WrappedTask]]:
|
|
69
|
+
"""Add a time tracking entry to a task
|
|
70
|
+
|
|
71
|
+
Record an additional time tracking entry on a task and return the updated task with refreshed time
|
|
72
|
+
tracking.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
id (str):
|
|
76
|
+
body (TaskTimeTrackingCreate):
|
|
77
|
+
|
|
78
|
+
Raises:
|
|
79
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
80
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
Response[Union[Any, WrappedTask]]
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
kwargs = _get_kwargs(
|
|
87
|
+
id=id,
|
|
88
|
+
body=body,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
response = client.get_httpx_client().request(
|
|
92
|
+
**kwargs,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
return _build_response(client=client, response=response)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def sync(
|
|
99
|
+
id: str,
|
|
100
|
+
*,
|
|
101
|
+
client: Union[AuthenticatedClient, Client],
|
|
102
|
+
body: TaskTimeTrackingCreate,
|
|
103
|
+
) -> Optional[Union[Any, WrappedTask]]:
|
|
104
|
+
"""Add a time tracking entry to a task
|
|
105
|
+
|
|
106
|
+
Record an additional time tracking entry on a task and return the updated task with refreshed time
|
|
107
|
+
tracking.
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
id (str):
|
|
111
|
+
body (TaskTimeTrackingCreate):
|
|
112
|
+
|
|
113
|
+
Raises:
|
|
114
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
115
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
Union[Any, WrappedTask]
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
return sync_detailed(
|
|
122
|
+
id=id,
|
|
123
|
+
client=client,
|
|
124
|
+
body=body,
|
|
125
|
+
).parsed
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
async def asyncio_detailed(
|
|
129
|
+
id: str,
|
|
130
|
+
*,
|
|
131
|
+
client: Union[AuthenticatedClient, Client],
|
|
132
|
+
body: TaskTimeTrackingCreate,
|
|
133
|
+
) -> Response[Union[Any, WrappedTask]]:
|
|
134
|
+
"""Add a time tracking entry to a task
|
|
135
|
+
|
|
136
|
+
Record an additional time tracking entry on a task and return the updated task with refreshed time
|
|
137
|
+
tracking.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
id (str):
|
|
141
|
+
body (TaskTimeTrackingCreate):
|
|
142
|
+
|
|
143
|
+
Raises:
|
|
144
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
145
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
Response[Union[Any, WrappedTask]]
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
kwargs = _get_kwargs(
|
|
152
|
+
id=id,
|
|
153
|
+
body=body,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
157
|
+
|
|
158
|
+
return _build_response(client=client, response=response)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
async def asyncio(
|
|
162
|
+
id: str,
|
|
163
|
+
*,
|
|
164
|
+
client: Union[AuthenticatedClient, Client],
|
|
165
|
+
body: TaskTimeTrackingCreate,
|
|
166
|
+
) -> Optional[Union[Any, WrappedTask]]:
|
|
167
|
+
"""Add a time tracking entry to a task
|
|
168
|
+
|
|
169
|
+
Record an additional time tracking entry on a task and return the updated task with refreshed time
|
|
170
|
+
tracking.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
id (str):
|
|
174
|
+
body (TaskTimeTrackingCreate):
|
|
175
|
+
|
|
176
|
+
Raises:
|
|
177
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
178
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
179
|
+
|
|
180
|
+
Returns:
|
|
181
|
+
Union[Any, WrappedTask]
|
|
182
|
+
"""
|
|
183
|
+
|
|
184
|
+
return (
|
|
185
|
+
await asyncio_detailed(
|
|
186
|
+
id=id,
|
|
187
|
+
client=client,
|
|
188
|
+
body=body,
|
|
189
|
+
)
|
|
190
|
+
).parsed
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.task_move import TaskMove
|
|
9
|
+
from ...models.wrapped_task import WrappedTask
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
id: str,
|
|
15
|
+
*,
|
|
16
|
+
body: TaskMove,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/tasks/{id}/move".format(
|
|
23
|
+
id=id,
|
|
24
|
+
),
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_body = body.to_dict()
|
|
28
|
+
|
|
29
|
+
_kwargs["json"] = _body
|
|
30
|
+
headers["Content-Type"] = "application/json"
|
|
31
|
+
|
|
32
|
+
_kwargs["headers"] = headers
|
|
33
|
+
return _kwargs
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
38
|
+
) -> Optional[Union[Any, WrappedTask]]:
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
response_200 = WrappedTask.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
if response.status_code == 400:
|
|
44
|
+
response_400 = cast(Any, None)
|
|
45
|
+
return response_400
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
54
|
+
) -> Response[Union[Any, WrappedTask]]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
id: str,
|
|
65
|
+
*,
|
|
66
|
+
client: Union[AuthenticatedClient, Client],
|
|
67
|
+
body: TaskMove,
|
|
68
|
+
) -> Response[Union[Any, WrappedTask]]:
|
|
69
|
+
"""Move a task within its dartboard
|
|
70
|
+
|
|
71
|
+
Move a task to a specific position within results sorted by the order field. Use afterTaskId to
|
|
72
|
+
place the task after a specific task, or beforeTaskId to place it before one.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
id (str):
|
|
76
|
+
body (TaskMove):
|
|
77
|
+
|
|
78
|
+
Raises:
|
|
79
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
80
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
Response[Union[Any, WrappedTask]]
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
kwargs = _get_kwargs(
|
|
87
|
+
id=id,
|
|
88
|
+
body=body,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
response = client.get_httpx_client().request(
|
|
92
|
+
**kwargs,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
return _build_response(client=client, response=response)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def sync(
|
|
99
|
+
id: str,
|
|
100
|
+
*,
|
|
101
|
+
client: Union[AuthenticatedClient, Client],
|
|
102
|
+
body: TaskMove,
|
|
103
|
+
) -> Optional[Union[Any, WrappedTask]]:
|
|
104
|
+
"""Move a task within its dartboard
|
|
105
|
+
|
|
106
|
+
Move a task to a specific position within results sorted by the order field. Use afterTaskId to
|
|
107
|
+
place the task after a specific task, or beforeTaskId to place it before one.
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
id (str):
|
|
111
|
+
body (TaskMove):
|
|
112
|
+
|
|
113
|
+
Raises:
|
|
114
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
115
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
Union[Any, WrappedTask]
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
return sync_detailed(
|
|
122
|
+
id=id,
|
|
123
|
+
client=client,
|
|
124
|
+
body=body,
|
|
125
|
+
).parsed
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
async def asyncio_detailed(
|
|
129
|
+
id: str,
|
|
130
|
+
*,
|
|
131
|
+
client: Union[AuthenticatedClient, Client],
|
|
132
|
+
body: TaskMove,
|
|
133
|
+
) -> Response[Union[Any, WrappedTask]]:
|
|
134
|
+
"""Move a task within its dartboard
|
|
135
|
+
|
|
136
|
+
Move a task to a specific position within results sorted by the order field. Use afterTaskId to
|
|
137
|
+
place the task after a specific task, or beforeTaskId to place it before one.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
id (str):
|
|
141
|
+
body (TaskMove):
|
|
142
|
+
|
|
143
|
+
Raises:
|
|
144
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
145
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
Response[Union[Any, WrappedTask]]
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
kwargs = _get_kwargs(
|
|
152
|
+
id=id,
|
|
153
|
+
body=body,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
157
|
+
|
|
158
|
+
return _build_response(client=client, response=response)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
async def asyncio(
|
|
162
|
+
id: str,
|
|
163
|
+
*,
|
|
164
|
+
client: Union[AuthenticatedClient, Client],
|
|
165
|
+
body: TaskMove,
|
|
166
|
+
) -> Optional[Union[Any, WrappedTask]]:
|
|
167
|
+
"""Move a task within its dartboard
|
|
168
|
+
|
|
169
|
+
Move a task to a specific position within results sorted by the order field. Use afterTaskId to
|
|
170
|
+
place the task after a specific task, or beforeTaskId to place it before one.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
id (str):
|
|
174
|
+
body (TaskMove):
|
|
175
|
+
|
|
176
|
+
Raises:
|
|
177
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
178
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
179
|
+
|
|
180
|
+
Returns:
|
|
181
|
+
Union[Any, WrappedTask]
|
|
182
|
+
"""
|
|
183
|
+
|
|
184
|
+
return (
|
|
185
|
+
await asyncio_detailed(
|
|
186
|
+
id=id,
|
|
187
|
+
client=client,
|
|
188
|
+
body=body,
|
|
189
|
+
)
|
|
190
|
+
).parsed
|
|
@@ -16,13 +16,27 @@ from .list_comments_o_item import ListCommentsOItem
|
|
|
16
16
|
from .list_docs_o_item import ListDocsOItem
|
|
17
17
|
from .list_tasks_o_item import ListTasksOItem
|
|
18
18
|
from .paginated_comment_list import PaginatedCommentList
|
|
19
|
+
from .paginated_comment_list_meta_type_0 import PaginatedCommentListMetaType0
|
|
20
|
+
from .paginated_comment_list_meta_type_0_applied_default_filters import (
|
|
21
|
+
PaginatedCommentListMetaType0AppliedDefaultFilters,
|
|
22
|
+
)
|
|
19
23
|
from .paginated_concise_doc_list import PaginatedConciseDocList
|
|
24
|
+
from .paginated_concise_doc_list_meta_type_0 import PaginatedConciseDocListMetaType0
|
|
25
|
+
from .paginated_concise_doc_list_meta_type_0_applied_default_filters import (
|
|
26
|
+
PaginatedConciseDocListMetaType0AppliedDefaultFilters,
|
|
27
|
+
)
|
|
20
28
|
from .paginated_concise_task_list import PaginatedConciseTaskList
|
|
29
|
+
from .paginated_concise_task_list_meta_type_0 import PaginatedConciseTaskListMetaType0
|
|
30
|
+
from .paginated_concise_task_list_meta_type_0_applied_default_filters import (
|
|
31
|
+
PaginatedConciseTaskListMetaType0AppliedDefaultFilters,
|
|
32
|
+
)
|
|
21
33
|
from .priority import Priority
|
|
22
34
|
from .skill import Skill
|
|
23
35
|
from .task import Task
|
|
24
36
|
from .task_create import TaskCreate
|
|
37
|
+
from .task_move import TaskMove
|
|
25
38
|
from .task_relationships_type_0 import TaskRelationshipsType0
|
|
39
|
+
from .task_time_tracking_create import TaskTimeTrackingCreate
|
|
26
40
|
from .task_update import TaskUpdate
|
|
27
41
|
from .time_tracking_entry import TimeTrackingEntry
|
|
28
42
|
from .user import User
|
|
@@ -89,13 +103,21 @@ __all__ = (
|
|
|
89
103
|
"ListDocsOItem",
|
|
90
104
|
"ListTasksOItem",
|
|
91
105
|
"PaginatedCommentList",
|
|
106
|
+
"PaginatedCommentListMetaType0",
|
|
107
|
+
"PaginatedCommentListMetaType0AppliedDefaultFilters",
|
|
92
108
|
"PaginatedConciseDocList",
|
|
109
|
+
"PaginatedConciseDocListMetaType0",
|
|
110
|
+
"PaginatedConciseDocListMetaType0AppliedDefaultFilters",
|
|
93
111
|
"PaginatedConciseTaskList",
|
|
112
|
+
"PaginatedConciseTaskListMetaType0",
|
|
113
|
+
"PaginatedConciseTaskListMetaType0AppliedDefaultFilters",
|
|
94
114
|
"Priority",
|
|
95
115
|
"Skill",
|
|
96
116
|
"Task",
|
|
97
117
|
"TaskCreate",
|
|
118
|
+
"TaskMove",
|
|
98
119
|
"TaskRelationshipsType0",
|
|
120
|
+
"TaskTimeTrackingCreate",
|
|
99
121
|
"TaskUpdate",
|
|
100
122
|
"TimeTrackingEntry",
|
|
101
123
|
"User",
|
|
@@ -21,8 +21,8 @@ class CustomProperties:
|
|
|
21
21
|
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
-
additional_properties: dict[str, Union[None, bool, float, list[Union[None, str]], list[str], str]] =
|
|
25
|
-
init=False, factory=dict
|
|
24
|
+
additional_properties: dict[str, Union[None, bool, float, int, list[Union[None, str]], list[str], str]] = (
|
|
25
|
+
_attrs_field(init=False, factory=dict)
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -56,7 +56,7 @@ class CustomProperties:
|
|
|
56
56
|
|
|
57
57
|
def _parse_additional_property(
|
|
58
58
|
data: object,
|
|
59
|
-
) -> Union[None, bool, float, list[Union[None, str]], list[str], str]:
|
|
59
|
+
) -> Union[None, bool, float, int, list[Union[None, str]], list[str], str]:
|
|
60
60
|
if data is None:
|
|
61
61
|
return data
|
|
62
62
|
try:
|
|
@@ -93,13 +93,13 @@ class CustomProperties:
|
|
|
93
93
|
try:
|
|
94
94
|
if not isinstance(data, list):
|
|
95
95
|
raise TypeError()
|
|
96
|
-
|
|
96
|
+
additional_property_type_11 = cast(list[str], data)
|
|
97
97
|
|
|
98
|
-
return
|
|
98
|
+
return additional_property_type_11
|
|
99
99
|
except: # noqa: E722
|
|
100
100
|
pass
|
|
101
101
|
return cast(
|
|
102
|
-
Union[None, bool, float, list[Union[None, str]], list[str], str],
|
|
102
|
+
Union[None, bool, float, int, list[Union[None, str]], list[str], str],
|
|
103
103
|
data,
|
|
104
104
|
)
|
|
105
105
|
|
|
@@ -114,13 +114,13 @@ class CustomProperties:
|
|
|
114
114
|
def additional_keys(self) -> list[str]:
|
|
115
115
|
return list(self.additional_properties.keys())
|
|
116
116
|
|
|
117
|
-
def __getitem__(self, key: str) -> Union[None, bool, float, list[Union[None, str]], list[str], str]:
|
|
117
|
+
def __getitem__(self, key: str) -> Union[None, bool, float, int, list[Union[None, str]], list[str], str]:
|
|
118
118
|
return self.additional_properties[key]
|
|
119
119
|
|
|
120
120
|
def __setitem__(
|
|
121
121
|
self,
|
|
122
122
|
key: str,
|
|
123
|
-
value: Union[None, bool, float, list[Union[None, str]], list[str], str],
|
|
123
|
+
value: Union[None, bool, float, int, list[Union[None, str]], list[str], str],
|
|
124
124
|
) -> None:
|
|
125
125
|
self.additional_properties[key] = value
|
|
126
126
|
|
|
@@ -7,11 +7,11 @@ class ListDocsOItem(str, Enum):
|
|
|
7
7
|
ORDER = "order"
|
|
8
8
|
TITLE = "title"
|
|
9
9
|
UPDATED_AT = "updated_at"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
CREATED_AT_DESC = "-created_at"
|
|
11
|
+
FOLDER_ORDER_DESC = "-folder__order"
|
|
12
|
+
ORDER_DESC = "-order"
|
|
13
|
+
TITLE_DESC = "-title"
|
|
14
|
+
UPDATED_AT_DESC = "-updated_at"
|
|
15
15
|
|
|
16
16
|
def __str__(self) -> str:
|
|
17
17
|
return str(self.value)
|
|
@@ -7,11 +7,11 @@ class ListTasksOItem(str, Enum):
|
|
|
7
7
|
ORDER = "order"
|
|
8
8
|
TITLE = "title"
|
|
9
9
|
UPDATED_AT = "updated_at"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
CREATED_AT_DESC = "-created_at"
|
|
11
|
+
DARTBOARD_ORDER_DESC = "-dartboard__order"
|
|
12
|
+
ORDER_DESC = "-order"
|
|
13
|
+
TITLE_DESC = "-title"
|
|
14
|
+
UPDATED_AT_DESC = "-updated_at"
|
|
15
15
|
|
|
16
16
|
def __str__(self) -> str:
|
|
17
17
|
return str(self.value)
|