universal-mcp 0.1.8rc4__py3-none-any.whl → 0.1.9rc1__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.
Files changed (38) hide show
  1. universal_mcp/applications/__init__.py +7 -2
  2. universal_mcp/applications/application.py +162 -114
  3. universal_mcp/applications/cal_com_v2/README.md +175 -0
  4. universal_mcp/applications/cal_com_v2/__init__.py +0 -0
  5. universal_mcp/applications/cal_com_v2/app.py +4735 -0
  6. universal_mcp/applications/clickup/README.md +160 -0
  7. universal_mcp/applications/clickup/__init__.py +0 -0
  8. universal_mcp/applications/clickup/app.py +4359 -0
  9. universal_mcp/applications/hashnode/app.py +77 -0
  10. universal_mcp/applications/hashnode/prompt.md +21 -0
  11. universal_mcp/applications/mailchimp/README.md +306 -0
  12. universal_mcp/applications/mailchimp/__init__.py +0 -0
  13. universal_mcp/applications/mailchimp/app.py +8883 -0
  14. universal_mcp/applications/markitdown/app.py +2 -2
  15. universal_mcp/applications/perplexity/app.py +0 -1
  16. universal_mcp/applications/replicate/README.md +53 -0
  17. universal_mcp/applications/replicate/app.py +969 -0
  18. universal_mcp/applications/retell_ai/README.md +46 -0
  19. universal_mcp/applications/retell_ai/__init__.py +0 -0
  20. universal_mcp/applications/retell_ai/app.py +316 -0
  21. universal_mcp/applications/rocketlane/README.md +42 -0
  22. universal_mcp/applications/rocketlane/__init__.py +0 -0
  23. universal_mcp/applications/rocketlane/app.py +180 -0
  24. universal_mcp/applications/spotify/README.md +116 -0
  25. universal_mcp/applications/spotify/__init__.py +0 -0
  26. universal_mcp/applications/spotify/app.py +2231 -0
  27. universal_mcp/applications/supabase/README.md +112 -0
  28. universal_mcp/applications/supabase/__init__.py +0 -0
  29. universal_mcp/applications/supabase/app.py +2644 -0
  30. universal_mcp/integrations/integration.py +1 -1
  31. universal_mcp/servers/server.py +3 -3
  32. universal_mcp/stores/store.py +7 -0
  33. universal_mcp/tools/tools.py +2 -2
  34. universal_mcp/utils/docstring_parser.py +171 -104
  35. {universal_mcp-0.1.8rc4.dist-info → universal_mcp-0.1.9rc1.dist-info}/METADATA +2 -1
  36. {universal_mcp-0.1.8rc4.dist-info → universal_mcp-0.1.9rc1.dist-info}/RECORD +38 -13
  37. {universal_mcp-0.1.8rc4.dist-info → universal_mcp-0.1.9rc1.dist-info}/WHEEL +0 -0
  38. {universal_mcp-0.1.8rc4.dist-info → universal_mcp-0.1.9rc1.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,4359 @@
1
+ from typing import Any
2
+
3
+ from universal_mcp.applications import APIApplication
4
+ from universal_mcp.integrations import Integration
5
+
6
+
7
+ class ClickupApp(APIApplication):
8
+ def __init__(self, integration: Integration = None, **kwargs) -> None:
9
+ super().__init__(name='clickup', integration=integration, **kwargs)
10
+ self.base_url = "https://api.clickup.com/api/v2"
11
+
12
+ def authorization_get_access_token(self, client_id, client_secret, code) -> dict[str, Any]:
13
+ """
14
+ Exchanges an authorization code for an access token using OAuth2 credentials.
15
+
16
+ Args:
17
+ client_id: The client identifier string obtained from the OAuth provider.
18
+ client_secret: The client secret string associated with the client_id.
19
+ code: The authorization code received after user consent.
20
+
21
+ Returns:
22
+ A dictionary containing the access token and related response data from the OAuth provider.
23
+
24
+ Raises:
25
+ ValueError: If 'client_id', 'client_secret', or 'code' is missing or None.
26
+ HTTPError: If the HTTP request to the OAuth token endpoint fails with a non-success status code.
27
+
28
+ Tags:
29
+ authorization, oauth2, get, access-token
30
+ """
31
+ if client_id is None:
32
+ raise ValueError("Missing required parameter 'client_id'")
33
+ if client_secret is None:
34
+ raise ValueError("Missing required parameter 'client_secret'")
35
+ if code is None:
36
+ raise ValueError("Missing required parameter 'code'")
37
+ url = f"{self.base_url}/oauth/token"
38
+ query_params = {k: v for k, v in [('client_id', client_id), ('client_secret', client_secret), ('code', code)] if v is not None}
39
+ response = self._post(url, data={}, params=query_params)
40
+ response.raise_for_status()
41
+ return response.json()
42
+
43
+ def authorization_view_account_details(self, ) -> dict[str, Any]:
44
+ """
45
+ Retrieves the current authenticated user's account details from the authorization service.
46
+
47
+ Args:
48
+ None: This function takes no arguments
49
+
50
+ Returns:
51
+ dict: A dictionary containing the authenticated user's account information as returned by the authorization service.
52
+
53
+ Raises:
54
+ requests.HTTPError: If the GET request to fetch user details returns an unsuccessful HTTP status code.
55
+
56
+ Tags:
57
+ authorization, view, account, details, api
58
+ """
59
+ url = f"{self.base_url}/user"
60
+ query_params = {}
61
+ response = self._get(url, params=query_params)
62
+ response.raise_for_status()
63
+ return response.json()
64
+
65
+ def authorization_get_workspace_list(self, ) -> dict[str, Any]:
66
+ """
67
+ Retrieves a list of workspaces accessible to the authorized user from the authorization service.
68
+
69
+ Args:
70
+ None: This function takes no arguments
71
+
72
+ Returns:
73
+ dict: A dictionary containing workspace information for the user, as returned by the authorization service.
74
+
75
+ Raises:
76
+ requests.HTTPError: If the HTTP request to the authorization service fails or returns a non-success status code.
77
+
78
+ Tags:
79
+ get, list, workspaces, authorization
80
+ """
81
+ url = f"{self.base_url}/team"
82
+ query_params = {}
83
+ response = self._get(url, params=query_params)
84
+ response.raise_for_status()
85
+ return response.json()
86
+
87
+ def task_checklists_create_new_checklist(self, task_id, name, custom_task_ids=None, team_id=None) -> dict[str, Any]:
88
+ """
89
+ Creates a new checklist for a given task and returns the created checklist details as a dictionary.
90
+
91
+ Args:
92
+ task_id: str. The unique identifier of the task for which the checklist will be created.
93
+ name: str. The name of the new checklist.
94
+ custom_task_ids: Optional[list[str]]. A list of custom task IDs to associate with the checklist. Defaults to None.
95
+ team_id: Optional[str]. The ID of the team to associate with the checklist. Defaults to None.
96
+
97
+ Returns:
98
+ dict[str, Any]: A dictionary containing the details of the newly created checklist from the API response.
99
+
100
+ Raises:
101
+ ValueError: If 'task_id' or 'name' is not provided.
102
+ requests.HTTPError: If the API request fails or returns an unsuccessful status code.
103
+
104
+ Tags:
105
+ create, checklist, task-management, api
106
+ """
107
+ if task_id is None:
108
+ raise ValueError("Missing required parameter 'task_id'")
109
+ if name is None:
110
+ raise ValueError("Missing required parameter 'name'")
111
+ request_body = {
112
+ 'name': name,
113
+ }
114
+ request_body = {k: v for k, v in request_body.items() if v is not None}
115
+ url = f"{self.base_url}/task/{task_id}/checklist"
116
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
117
+ response = self._post(url, data=request_body, params=query_params)
118
+ response.raise_for_status()
119
+ return response.json()
120
+
121
+ def task_checklists_update_checklist(self, checklist_id, name=None, position=None) -> dict[str, Any]:
122
+ """
123
+ Updates a checklist's name and/or position by sending a PUT request to the checklist API endpoint.
124
+
125
+ Args:
126
+ checklist_id: str. The unique identifier of the checklist to update. Required.
127
+ name: str or None. The new name for the checklist. Optional.
128
+ position: int or None. The new position of the checklist. Optional.
129
+
130
+ Returns:
131
+ dict[str, Any]: A dictionary containing the updated checklist data returned by the API.
132
+
133
+ Raises:
134
+ ValueError: Raised if the required parameter 'checklist_id' is None.
135
+ HTTPError: Raised if the HTTP response contains an unsuccessful status code.
136
+
137
+ Tags:
138
+ update, checklist, management, api
139
+ """
140
+ if checklist_id is None:
141
+ raise ValueError("Missing required parameter 'checklist_id'")
142
+ request_body = {
143
+ 'name': name,
144
+ 'position': position,
145
+ }
146
+ request_body = {k: v for k, v in request_body.items() if v is not None}
147
+ url = f"{self.base_url}/checklist/{checklist_id}"
148
+ query_params = {}
149
+ response = self._put(url, data=request_body, params=query_params)
150
+ response.raise_for_status()
151
+ return response.json()
152
+
153
+ def task_checklists_remove_checklist(self, checklist_id) -> dict[str, Any]:
154
+ """
155
+ Removes a checklist by its ID using a DELETE request to the API.
156
+
157
+ Args:
158
+ checklist_id: The unique identifier of the checklist to be removed. Must not be None.
159
+
160
+ Returns:
161
+ A dictionary containing the JSON response from the API after the checklist has been removed.
162
+
163
+ Raises:
164
+ ValueError: If 'checklist_id' is None.
165
+ HTTPError: If the HTTP request to delete the checklist fails (non-2xx status code).
166
+
167
+ Tags:
168
+ remove, checklist, delete, management
169
+ """
170
+ if checklist_id is None:
171
+ raise ValueError("Missing required parameter 'checklist_id'")
172
+ url = f"{self.base_url}/checklist/{checklist_id}"
173
+ query_params = {}
174
+ response = self._delete(url, params=query_params)
175
+ response.raise_for_status()
176
+ return response.json()
177
+
178
+ def task_checklists_add_line_item(self, checklist_id, name=None, assignee=None) -> dict[str, Any]:
179
+ """
180
+ Adds a new line item to a specified task checklist.
181
+
182
+ Args:
183
+ checklist_id: str. Unique identifier of the checklist to which the line item will be added.
184
+ name: Optional[str]. Name of the checklist line item to be added.
185
+ assignee: Optional[str]. Identifier of the user to assign the line item to.
186
+
187
+ Returns:
188
+ dict[str, Any]: Dictionary containing the details of the newly created checklist line item as returned by the API.
189
+
190
+ Raises:
191
+ ValueError: Raised if the required parameter 'checklist_id' is not provided.
192
+ requests.HTTPError: Raised if the HTTP request to add the checklist item fails.
193
+
194
+ Tags:
195
+ add, checklist, line-item, management
196
+ """
197
+ if checklist_id is None:
198
+ raise ValueError("Missing required parameter 'checklist_id'")
199
+ request_body = {
200
+ 'name': name,
201
+ 'assignee': assignee,
202
+ }
203
+ request_body = {k: v for k, v in request_body.items() if v is not None}
204
+ url = f"{self.base_url}/checklist/{checklist_id}/checklist_item"
205
+ query_params = {}
206
+ response = self._post(url, data=request_body, params=query_params)
207
+ response.raise_for_status()
208
+ return response.json()
209
+
210
+ def task_checklists_update_checklist_item(self, checklist_id, checklist_item_id, name=None, assignee=None, resolved=None, parent=None) -> dict[str, Any]:
211
+ """
212
+ Updates a checklist item with new details such as name, assignee, resolution status, or parent within a specified checklist.
213
+
214
+ Args:
215
+ checklist_id: str. Unique identifier for the checklist containing the item to update.
216
+ checklist_item_id: str. Unique identifier for the checklist item to be updated.
217
+ name: str, optional. New name for the checklist item. If None, the name remains unchanged.
218
+ assignee: str, optional. Identifier of the user assigned to this checklist item. If None, the assignee remains unchanged.
219
+ resolved: bool, optional. Resolution status to set for the checklist item. If None, the resolved status remains unchanged.
220
+ parent: str, optional. Identifier of the parent checklist item, if setting or updating a parent-child relationship. If None, the parent remains unchanged.
221
+
222
+ Returns:
223
+ dict[str, Any]: The updated checklist item as a dictionary parsed from the server response.
224
+
225
+ Raises:
226
+ ValueError: Raised if either 'checklist_id' or 'checklist_item_id' is None.
227
+ requests.HTTPError: Raised if the API request fails or the server returns an unsuccessful status code.
228
+
229
+ Tags:
230
+ update, checklist, management, item
231
+ """
232
+ if checklist_id is None:
233
+ raise ValueError("Missing required parameter 'checklist_id'")
234
+ if checklist_item_id is None:
235
+ raise ValueError("Missing required parameter 'checklist_item_id'")
236
+ request_body = {
237
+ 'name': name,
238
+ 'assignee': assignee,
239
+ 'resolved': resolved,
240
+ 'parent': parent,
241
+ }
242
+ request_body = {k: v for k, v in request_body.items() if v is not None}
243
+ url = f"{self.base_url}/checklist/{checklist_id}/checklist_item/{checklist_item_id}"
244
+ query_params = {}
245
+ response = self._put(url, data=request_body, params=query_params)
246
+ response.raise_for_status()
247
+ return response.json()
248
+
249
+ def task_checklists_remove_checklist_item(self, checklist_id, checklist_item_id) -> dict[str, Any]:
250
+ """
251
+ Removes a specific checklist item from a checklist by issuing a DELETE request to the appropriate API endpoint.
252
+
253
+ Args:
254
+ checklist_id: The unique identifier of the checklist containing the item to remove.
255
+ checklist_item_id: The unique identifier of the checklist item to be removed.
256
+
257
+ Returns:
258
+ A dictionary containing the API response data after attempting to remove the checklist item.
259
+
260
+ Raises:
261
+ ValueError: Raised if either 'checklist_id' or 'checklist_item_id' is None.
262
+ requests.HTTPError: Raised if the HTTP request to delete the checklist item fails (e.g., due to network issues, authorization problems, or the item not existing).
263
+
264
+ Tags:
265
+ remove, checklist, delete, management
266
+ """
267
+ if checklist_id is None:
268
+ raise ValueError("Missing required parameter 'checklist_id'")
269
+ if checklist_item_id is None:
270
+ raise ValueError("Missing required parameter 'checklist_item_id'")
271
+ url = f"{self.base_url}/checklist/{checklist_id}/checklist_item/{checklist_item_id}"
272
+ query_params = {}
273
+ response = self._delete(url, params=query_params)
274
+ response.raise_for_status()
275
+ return response.json()
276
+
277
+ def comments_get_task_comments(self, task_id, custom_task_ids=None, team_id=None, start=None, start_id=None) -> dict[str, Any]:
278
+ """
279
+ Retrieve all comments associated with a specific task.
280
+
281
+ Args:
282
+ task_id: str. The unique identifier for the task whose comments are to be retrieved. Required.
283
+ custom_task_ids: Optional[str]. An alternative unique identifier for the task, useful when using custom task ID schemes. Defaults to None.
284
+ team_id: Optional[str]. The identifier of the team associated with the task. Used to limit the search to a specific team. Defaults to None.
285
+ start: Optional[int]. The position offset for pagination, specifying where to start retrieving comments. Defaults to None.
286
+ start_id: Optional[str]. The ID of the first comment from which to start retrieving (for pagination). Defaults to None.
287
+
288
+ Returns:
289
+ dict[str, Any]: A dictionary containing the list of comments and associated metadata for the specified task.
290
+
291
+ Raises:
292
+ ValueError: If 'task_id' is not provided.
293
+ requests.HTTPError: If the HTTP request to retrieve comments fails (e.g., due to network errors or server-side issues).
294
+
295
+ Tags:
296
+ list, comments, task, search, management
297
+ """
298
+ if task_id is None:
299
+ raise ValueError("Missing required parameter 'task_id'")
300
+ url = f"{self.base_url}/task/{task_id}/comment"
301
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id), ('start', start), ('start_id', start_id)] if v is not None}
302
+ response = self._get(url, params=query_params)
303
+ response.raise_for_status()
304
+ return response.json()
305
+
306
+ def comments_create_new_task_comment(self, task_id, comment_text, assignee, notify_all, custom_task_ids=None, team_id=None) -> dict[str, Any]:
307
+ """
308
+ Creates a new comment on the specified task, assigning it to a user and controlling notification behavior.
309
+
310
+ Args:
311
+ task_id: str. Unique identifier of the task to comment on.
312
+ comment_text: str. The text content of the comment to be added.
313
+ assignee: str. Identifier of the user to assign the comment or task.
314
+ notify_all: bool. Determines whether all users associated with the task should be notified.
315
+ custom_task_ids: Optional[str]. Custom identifier for the task, if applicable.
316
+ team_id: Optional[str]. Identifier of the team to which the task belongs, if applicable.
317
+
318
+ Returns:
319
+ dict[str, Any]: A dictionary containing the created comment data as returned by the API.
320
+
321
+ Raises:
322
+ ValueError: Raised if any of the required parameters ('task_id', 'comment_text', 'assignee', or 'notify_all') are missing.
323
+ requests.HTTPError: Raised if the HTTP request to create the comment fails or the response status indicates an error.
324
+
325
+ Tags:
326
+ create, comment, task, api, management
327
+ """
328
+ if task_id is None:
329
+ raise ValueError("Missing required parameter 'task_id'")
330
+ if comment_text is None:
331
+ raise ValueError("Missing required parameter 'comment_text'")
332
+ if assignee is None:
333
+ raise ValueError("Missing required parameter 'assignee'")
334
+ if notify_all is None:
335
+ raise ValueError("Missing required parameter 'notify_all'")
336
+ request_body = {
337
+ 'comment_text': comment_text,
338
+ 'assignee': assignee,
339
+ 'notify_all': notify_all,
340
+ }
341
+ request_body = {k: v for k, v in request_body.items() if v is not None}
342
+ url = f"{self.base_url}/task/{task_id}/comment"
343
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
344
+ response = self._post(url, data=request_body, params=query_params)
345
+ response.raise_for_status()
346
+ return response.json()
347
+
348
+ def comments_get_view_comments(self, view_id, start=None, start_id=None) -> dict[str, Any]:
349
+ """
350
+ Retrieve comments for a specific view, supporting optional pagination parameters.
351
+
352
+ Args:
353
+ view_id: The unique identifier of the view to retrieve comments for.
354
+ start: Optional; the zero-based index or offset for pagination (default is None).
355
+ start_id: Optional; the comment ID to start pagination from (default is None).
356
+
357
+ Returns:
358
+ A dictionary containing the list of comments and associated metadata for the specified view.
359
+
360
+ Raises:
361
+ ValueError: Raised if 'view_id' is None.
362
+ requests.HTTPError: Raised if the HTTP request for comments fails (e.g., connection errors, non-2xx response).
363
+
364
+ Tags:
365
+ get, comments, view, api, pagination
366
+ """
367
+ if view_id is None:
368
+ raise ValueError("Missing required parameter 'view_id'")
369
+ url = f"{self.base_url}/view/{view_id}/comment"
370
+ query_params = {k: v for k, v in [('start', start), ('start_id', start_id)] if v is not None}
371
+ response = self._get(url, params=query_params)
372
+ response.raise_for_status()
373
+ return response.json()
374
+
375
+ def comments_create_chat_view_comment(self, view_id, comment_text, notify_all) -> dict[str, Any]:
376
+ """
377
+ Creates a new comment on a chat view and optionally notifies all participants.
378
+
379
+ Args:
380
+ view_id: str. The unique identifier of the chat view to which the comment will be added.
381
+ comment_text: str. The text content of the comment to post.
382
+ notify_all: bool. Whether to notify all participants in the chat about the new comment.
383
+
384
+ Returns:
385
+ dict. The response from the API containing details about the created comment.
386
+
387
+ Raises:
388
+ ValueError: If any of 'view_id', 'comment_text', or 'notify_all' is None.
389
+ requests.HTTPError: If the HTTP request to create the comment fails.
390
+
391
+ Tags:
392
+ comments, create, chat, api
393
+ """
394
+ if view_id is None:
395
+ raise ValueError("Missing required parameter 'view_id'")
396
+ if comment_text is None:
397
+ raise ValueError("Missing required parameter 'comment_text'")
398
+ if notify_all is None:
399
+ raise ValueError("Missing required parameter 'notify_all'")
400
+ request_body = {
401
+ 'comment_text': comment_text,
402
+ 'notify_all': notify_all,
403
+ }
404
+ request_body = {k: v for k, v in request_body.items() if v is not None}
405
+ url = f"{self.base_url}/view/{view_id}/comment"
406
+ query_params = {}
407
+ response = self._post(url, data=request_body, params=query_params)
408
+ response.raise_for_status()
409
+ return response.json()
410
+
411
+ def comments_get_list_comments(self, list_id, start=None, start_id=None) -> dict[str, Any]:
412
+ """
413
+ Retrieve a list of comments associated with a specific list, supporting optional pagination.
414
+
415
+ Args:
416
+ list_id: The unique identifier of the list for which comments are to be retrieved.
417
+ start: Optional; An integer specifying the offset from which to start returning comments.
418
+ start_id: Optional; An identifier to continue retrieving comments from a specific comment onward.
419
+
420
+ Returns:
421
+ A dictionary containing the list of comments and associated metadata as returned by the API.
422
+
423
+ Raises:
424
+ ValueError: If 'list_id' is not provided.
425
+ requests.HTTPError: If the HTTP request to the API fails with an error status code.
426
+
427
+ Tags:
428
+ comments, list, retrieve, api, batch
429
+ """
430
+ if list_id is None:
431
+ raise ValueError("Missing required parameter 'list_id'")
432
+ url = f"{self.base_url}/list/{list_id}/comment"
433
+ query_params = {k: v for k, v in [('start', start), ('start_id', start_id)] if v is not None}
434
+ response = self._get(url, params=query_params)
435
+ response.raise_for_status()
436
+ return response.json()
437
+
438
+ def comments_add_to_list_comment(self, list_id, comment_text, assignee, notify_all) -> dict[str, Any]:
439
+ """
440
+ Adds a comment to a specified list, assigns it to a given user, and optionally notifies all stakeholders.
441
+
442
+ Args:
443
+ list_id: The unique identifier of the list to which the comment will be added.
444
+ comment_text: The text of the comment to be posted.
445
+ assignee: The user assigned to the comment.
446
+ notify_all: Boolean indicating whether all stakeholders should be notified of the new comment.
447
+
448
+ Returns:
449
+ A dictionary containing the response data from the API after adding the comment.
450
+
451
+ Raises:
452
+ ValueError: If any of the required parameters ('list_id', 'comment_text', 'assignee', or 'notify_all') are None.
453
+ requests.HTTPError: If the HTTP request to the API fails or an unsuccessful status code is returned.
454
+
455
+ Tags:
456
+ add, comment, list, assignment, notify, api
457
+ """
458
+ if list_id is None:
459
+ raise ValueError("Missing required parameter 'list_id'")
460
+ if comment_text is None:
461
+ raise ValueError("Missing required parameter 'comment_text'")
462
+ if assignee is None:
463
+ raise ValueError("Missing required parameter 'assignee'")
464
+ if notify_all is None:
465
+ raise ValueError("Missing required parameter 'notify_all'")
466
+ request_body = {
467
+ 'comment_text': comment_text,
468
+ 'assignee': assignee,
469
+ 'notify_all': notify_all,
470
+ }
471
+ request_body = {k: v for k, v in request_body.items() if v is not None}
472
+ url = f"{self.base_url}/list/{list_id}/comment"
473
+ query_params = {}
474
+ response = self._post(url, data=request_body, params=query_params)
475
+ response.raise_for_status()
476
+ return response.json()
477
+
478
+ def comments_update_task_comment(self, comment_id, comment_text, assignee, resolved) -> dict[str, Any]:
479
+ """
480
+ Updates an existing task comment with new text, assignee, and resolution status.
481
+
482
+ Args:
483
+ comment_id: str. The unique identifier of the comment to update.
484
+ comment_text: str. The new text content for the comment.
485
+ assignee: str. The user assigned to the comment.
486
+ resolved: bool. Indicates whether the comment has been marked as resolved.
487
+
488
+ Returns:
489
+ dict[str, Any]: The updated comment details as returned by the server.
490
+
491
+ Raises:
492
+ ValueError: Raised if any of the required parameters ('comment_id', 'comment_text', 'assignee', 'resolved') are None.
493
+ requests.HTTPError: Raised if the HTTP request to update the comment fails.
494
+
495
+ Tags:
496
+ update, comment, task-management, api
497
+ """
498
+ if comment_id is None:
499
+ raise ValueError("Missing required parameter 'comment_id'")
500
+ if comment_text is None:
501
+ raise ValueError("Missing required parameter 'comment_text'")
502
+ if assignee is None:
503
+ raise ValueError("Missing required parameter 'assignee'")
504
+ if resolved is None:
505
+ raise ValueError("Missing required parameter 'resolved'")
506
+ request_body = {
507
+ 'comment_text': comment_text,
508
+ 'assignee': assignee,
509
+ 'resolved': resolved,
510
+ }
511
+ request_body = {k: v for k, v in request_body.items() if v is not None}
512
+ url = f"{self.base_url}/comment/{comment_id}"
513
+ query_params = {}
514
+ response = self._put(url, data=request_body, params=query_params)
515
+ response.raise_for_status()
516
+ return response.json()
517
+
518
+ def comments_delete_task_comment(self, comment_id) -> dict[str, Any]:
519
+ """
520
+ Deletes a task comment by its ID.
521
+
522
+ Args:
523
+ comment_id: The unique identifier of the comment to be deleted.
524
+
525
+ Returns:
526
+ Dictionary containing the response data from the server after deleting the comment.
527
+
528
+ Raises:
529
+ ValueError: When the required parameter 'comment_id' is None.
530
+ HTTPError: When the HTTP request to delete the comment fails.
531
+
532
+ Tags:
533
+ delete, comment, task-management, api
534
+ """
535
+ if comment_id is None:
536
+ raise ValueError("Missing required parameter 'comment_id'")
537
+ url = f"{self.base_url}/comment/{comment_id}"
538
+ query_params = {}
539
+ response = self._delete(url, params=query_params)
540
+ response.raise_for_status()
541
+ return response.json()
542
+
543
+ def custom_fields_get_list_fields(self, list_id) -> dict[str, Any]:
544
+ """
545
+ Retrieves a list of custom fields associated with a specified list by its ID.
546
+
547
+ Args:
548
+ list_id: The unique identifier of the list for which to fetch custom fields. Must not be None.
549
+
550
+ Returns:
551
+ A dictionary containing the custom fields for the specified list, as returned by the API.
552
+
553
+ Raises:
554
+ ValueError: Raised if 'list_id' is None.
555
+ requests.HTTPError: Raised if the HTTP request fails with an error status code.
556
+
557
+ Tags:
558
+ get, list, custom-fields, api
559
+ """
560
+ if list_id is None:
561
+ raise ValueError("Missing required parameter 'list_id'")
562
+ url = f"{self.base_url}/list/{list_id}/field"
563
+ query_params = {}
564
+ response = self._get(url, params=query_params)
565
+ response.raise_for_status()
566
+ return response.json()
567
+
568
+ def custom_fields_remove_field_value(self, task_id, field_id, custom_task_ids=None, team_id=None) -> dict[str, Any]:
569
+ """
570
+ Removes a specific custom field value from a given task.
571
+
572
+ Args:
573
+ task_id: str. The unique identifier of the task from which the field value will be removed.
574
+ field_id: str. The unique identifier of the custom field to remove.
575
+ custom_task_ids: Optional[list or str]. Additional task IDs to include in the operation. Defaults to None.
576
+ team_id: Optional[str]. The ID of the team context for the operation. Defaults to None.
577
+
578
+ Returns:
579
+ dict[str, Any]: The API response as a dictionary containing the result of the remove operation.
580
+
581
+ Raises:
582
+ ValueError: If either 'task_id' or 'field_id' is not provided.
583
+ requests.HTTPError: If the HTTP request to remove the field value fails.
584
+
585
+ Tags:
586
+ custom-fields, remove, task-management, api
587
+ """
588
+ if task_id is None:
589
+ raise ValueError("Missing required parameter 'task_id'")
590
+ if field_id is None:
591
+ raise ValueError("Missing required parameter 'field_id'")
592
+ url = f"{self.base_url}/task/{task_id}/field/{field_id}"
593
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
594
+ response = self._delete(url, params=query_params)
595
+ response.raise_for_status()
596
+ return response.json()
597
+
598
+ def task_relationships_add_dependency(self, task_id, custom_task_ids=None, team_id=None, depends_on=None, depedency_of=None) -> dict[str, Any]:
599
+ """
600
+ Adds a dependency relationship to a specified task, allowing you to define predecessor or dependent tasks within a project management system.
601
+
602
+ Args:
603
+ task_id: str. The ID of the task for which the dependency is being added. Must not be None.
604
+ custom_task_ids: Optional[list[str]]. List of custom task IDs, if applicable, to use for the operation.
605
+ team_id: Optional[str]. Identifier for the team, if restricting the dependency operation to a specific team context.
606
+ depends_on: Optional[list[str]]. List of task IDs that the specified task depends on.
607
+ depedency_of: Optional[list[str]]. List of task IDs that depend on the specified task.
608
+
609
+ Returns:
610
+ dict[str, Any]: The API response as a dictionary containing the updated dependency information for the task.
611
+
612
+ Raises:
613
+ ValueError: Raised if 'task_id' is None.
614
+ requests.HTTPError: Raised if the HTTP request to add the dependency fails or returns an error status.
615
+
616
+ Tags:
617
+ add, task-relationship, dependency, management
618
+ """
619
+ if task_id is None:
620
+ raise ValueError("Missing required parameter 'task_id'")
621
+ request_body = {
622
+ 'depends_on': depends_on,
623
+ 'depedency_of': depedency_of,
624
+ }
625
+ request_body = {k: v for k, v in request_body.items() if v is not None}
626
+ url = f"{self.base_url}/task/{task_id}/dependency"
627
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
628
+ response = self._post(url, data=request_body, params=query_params)
629
+ response.raise_for_status()
630
+ return response.json()
631
+
632
+ def task_relationships_remove_dependency(self, task_id, depends_on, dependency_of, custom_task_ids=None, team_id=None) -> dict[str, Any]:
633
+ """
634
+ Removes a dependency relationship between tasks by calling the API endpoint.
635
+
636
+ Args:
637
+ task_id: The ID of the task from which the dependency is being removed.
638
+ depends_on: The ID of the task that the main task depends on.
639
+ dependency_of: The ID of the task that depends on the main task.
640
+ custom_task_ids: Optional flag to indicate if the provided IDs are custom task IDs.
641
+ team_id: Optional team ID to specify which team the tasks belong to.
642
+
643
+ Returns:
644
+ A dictionary containing the API response after removing the dependency.
645
+
646
+ Raises:
647
+ ValueError: Raised when any of the required parameters (task_id, depends_on, dependency_of) are None.
648
+ HTTPError: Raised when the API request fails based on the call to raise_for_status().
649
+
650
+ Tags:
651
+ remove, dependency, task-management, relationship
652
+ """
653
+ if task_id is None:
654
+ raise ValueError("Missing required parameter 'task_id'")
655
+ if depends_on is None:
656
+ raise ValueError("Missing required parameter 'depends_on'")
657
+ if dependency_of is None:
658
+ raise ValueError("Missing required parameter 'dependency_of'")
659
+ url = f"{self.base_url}/task/{task_id}/dependency"
660
+ query_params = {k: v for k, v in [('depends_on', depends_on), ('dependency_of', dependency_of), ('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
661
+ response = self._delete(url, params=query_params)
662
+ response.raise_for_status()
663
+ return response.json()
664
+
665
+ def task_relationships_link_tasks(self, task_id, links_to, custom_task_ids=None, team_id=None) -> dict[str, Any]:
666
+ """
667
+ Links one task to another by creating a relationship between the source and target task IDs, with optional custom task and team identifiers.
668
+
669
+ Args:
670
+ task_id: str. ID of the source task to be linked. Required.
671
+ links_to: str. ID of the target task to which the source task will be linked. Required.
672
+ custom_task_ids: Optional[list[str]]. List of custom task IDs to use for identification within a broader context. Defaults to None.
673
+ team_id: Optional[str]. ID of the team associated with the tasks. Defaults to None.
674
+
675
+ Returns:
676
+ dict[str, Any]: A dictionary containing the API response data for the task linking operation.
677
+
678
+ Raises:
679
+ ValueError: If 'task_id' or 'links_to' is None.
680
+ HTTPError: If the HTTP request to link tasks fails (non-2xx response).
681
+
682
+ Tags:
683
+ link, task-relationship, api, management
684
+ """
685
+ if task_id is None:
686
+ raise ValueError("Missing required parameter 'task_id'")
687
+ if links_to is None:
688
+ raise ValueError("Missing required parameter 'links_to'")
689
+ url = f"{self.base_url}/task/{task_id}/link/{links_to}"
690
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
691
+ response = self._post(url, data={}, params=query_params)
692
+ response.raise_for_status()
693
+ return response.json()
694
+
695
+ def task_relationships_remove_link_between_tasks(self, task_id, links_to, custom_task_ids=None, team_id=None) -> dict[str, Any]:
696
+ """
697
+ Removes a link between two specified tasks within the task management system.
698
+
699
+ Args:
700
+ task_id: str. The unique identifier of the source task whose link is to be removed.
701
+ links_to: str. The unique identifier of the linked task to be unlinked.
702
+ custom_task_ids: Optional[list[str]]. A list of custom task IDs to be used in the request, if applicable.
703
+ team_id: Optional[str]. The team ID associated with the tasks, if applicable.
704
+
705
+ Returns:
706
+ dict[str, Any]: The JSON response from the API after removing the link, parsed into a dictionary.
707
+
708
+ Raises:
709
+ ValueError: Raised if 'task_id' or 'links_to' is not provided.
710
+ requests.HTTPError: Raised if the HTTP request fails or the API returns an error status code.
711
+
712
+ Tags:
713
+ remove, task-relationships, api, management
714
+ """
715
+ if task_id is None:
716
+ raise ValueError("Missing required parameter 'task_id'")
717
+ if links_to is None:
718
+ raise ValueError("Missing required parameter 'links_to'")
719
+ url = f"{self.base_url}/task/{task_id}/link/{links_to}"
720
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
721
+ response = self._delete(url, params=query_params)
722
+ response.raise_for_status()
723
+ return response.json()
724
+
725
+ def folders_get_contents_of(self, space_id, archived=None) -> dict[str, Any]:
726
+ """
727
+ Retrieves the contents of all folders within a specified space, with optional filtering for archived folders.
728
+
729
+ Args:
730
+ space_id: str. The unique identifier of the space whose folders' contents are to be retrieved.
731
+ archived: Optional[bool]. If set, filters folders by their archived status. If None, retrieves all folders regardless of archived state.
732
+
733
+ Returns:
734
+ dict[str, Any]: A dictionary containing the contents of each folder in the specified space, as returned by the API.
735
+
736
+ Raises:
737
+ ValueError: Raised if 'space_id' is None.
738
+ requests.HTTPError: Raised if the HTTP request to the backend API fails.
739
+
740
+ Tags:
741
+ get, list, folders, contents, management, api
742
+ """
743
+ if space_id is None:
744
+ raise ValueError("Missing required parameter 'space_id'")
745
+ url = f"{self.base_url}/space/{space_id}/folder"
746
+ query_params = {k: v for k, v in [('archived', archived)] if v is not None}
747
+ response = self._get(url, params=query_params)
748
+ response.raise_for_status()
749
+ return response.json()
750
+
751
+ def folders_create_new_folder(self, space_id, name) -> dict[str, Any]:
752
+ """
753
+ Creates a new folder within a specified space.
754
+
755
+ Args:
756
+ space_id: The unique identifier of the space where the folder will be created.
757
+ name: The name to be assigned to the new folder.
758
+
759
+ Returns:
760
+ A dictionary containing information about the newly created folder.
761
+
762
+ Raises:
763
+ ValueError: Raised when either 'space_id' or 'name' parameter is None.
764
+ HTTPError: Raised when the HTTP request to create the folder fails.
765
+
766
+ Tags:
767
+ create, folder, management
768
+ """
769
+ if space_id is None:
770
+ raise ValueError("Missing required parameter 'space_id'")
771
+ if name is None:
772
+ raise ValueError("Missing required parameter 'name'")
773
+ request_body = {
774
+ 'name': name,
775
+ }
776
+ request_body = {k: v for k, v in request_body.items() if v is not None}
777
+ url = f"{self.base_url}/space/{space_id}/folder"
778
+ query_params = {}
779
+ response = self._post(url, data=request_body, params=query_params)
780
+ response.raise_for_status()
781
+ return response.json()
782
+
783
+ def folders_get_folder_content(self, folder_id) -> dict[str, Any]:
784
+ """
785
+ Retrieves the contents of a specified folder by its ID.
786
+
787
+ Args:
788
+ folder_id: str. The unique identifier of the folder whose content is to be retrieved.
789
+
790
+ Returns:
791
+ dict[str, Any]: A dictionary containing the contents of the specified folder as returned by the API.
792
+
793
+ Raises:
794
+ ValueError: Raised if 'folder_id' is None, indicating a required parameter is missing.
795
+ requests.HTTPError: Raised if the HTTP request to retrieve the folder content fails with an unsuccessful status code.
796
+
797
+ Tags:
798
+ get, folder, content, api
799
+ """
800
+ if folder_id is None:
801
+ raise ValueError("Missing required parameter 'folder_id'")
802
+ url = f"{self.base_url}/folder/{folder_id}"
803
+ query_params = {}
804
+ response = self._get(url, params=query_params)
805
+ response.raise_for_status()
806
+ return response.json()
807
+
808
+ def folders_rename_folder(self, folder_id, name) -> dict[str, Any]:
809
+ """
810
+ Renames an existing folder by updating its name using the specified folder ID.
811
+
812
+ Args:
813
+ folder_id: str. The unique identifier of the folder to be renamed.
814
+ name: str. The new name to assign to the folder.
815
+
816
+ Returns:
817
+ dict[str, Any]: The JSON response from the API containing updated folder information.
818
+
819
+ Raises:
820
+ ValueError: If 'folder_id' or 'name' is None.
821
+ requests.HTTPError: If the HTTP request to update the folder fails.
822
+
823
+ Tags:
824
+ rename, folder-management, put, api
825
+ """
826
+ if folder_id is None:
827
+ raise ValueError("Missing required parameter 'folder_id'")
828
+ if name is None:
829
+ raise ValueError("Missing required parameter 'name'")
830
+ request_body = {
831
+ 'name': name,
832
+ }
833
+ request_body = {k: v for k, v in request_body.items() if v is not None}
834
+ url = f"{self.base_url}/folder/{folder_id}"
835
+ query_params = {}
836
+ response = self._put(url, data=request_body, params=query_params)
837
+ response.raise_for_status()
838
+ return response.json()
839
+
840
+ def folders_remove_folder(self, folder_id) -> dict[str, Any]:
841
+ """
842
+ Removes a folder with the specified folder ID by sending a DELETE request to the API.
843
+
844
+ Args:
845
+ folder_id: The unique identifier of the folder to be removed. Must not be None.
846
+
847
+ Returns:
848
+ A dictionary containing the JSON response from the API after the folder is deleted.
849
+
850
+ Raises:
851
+ ValueError: If 'folder_id' is None.
852
+ requests.HTTPError: If the API response contains an HTTP error status code.
853
+
854
+ Tags:
855
+ remove, folder-management, api
856
+ """
857
+ if folder_id is None:
858
+ raise ValueError("Missing required parameter 'folder_id'")
859
+ url = f"{self.base_url}/folder/{folder_id}"
860
+ query_params = {}
861
+ response = self._delete(url, params=query_params)
862
+ response.raise_for_status()
863
+ return response.json()
864
+
865
+ def goals_get_workspace_goals(self, team_id, include_completed=None) -> dict[str, Any]:
866
+ """
867
+ Retrieves all workspace goals for a specified team, optionally including completed goals.
868
+
869
+ Args:
870
+ team_id: str. Unique identifier of the team whose workspace goals are to be retrieved.
871
+ include_completed: Optional[bool]. Whether to include completed goals in the results. If None, only active goals are returned.
872
+
873
+ Returns:
874
+ dict[str, Any]: A dictionary containing the workspace goals data for the specified team.
875
+
876
+ Raises:
877
+ ValueError: Raised when the required parameter 'team_id' is None.
878
+ requests.HTTPError: Raised if the HTTP request to the backend API fails with a non-success status.
879
+
880
+ Tags:
881
+ get, list, goal-management, fetch
882
+ """
883
+ if team_id is None:
884
+ raise ValueError("Missing required parameter 'team_id'")
885
+ url = f"{self.base_url}/team/{team_id}/goal"
886
+ query_params = {k: v for k, v in [('include_completed', include_completed)] if v is not None}
887
+ response = self._get(url, params=query_params)
888
+ response.raise_for_status()
889
+ return response.json()
890
+
891
+ def goals_add_new_goal_to_workspace(self, team_id, description, name, due_date, multiple_owners, owners, color) -> dict[str, Any]:
892
+ """
893
+ Adds a new goal to the specified team workspace.
894
+
895
+ Args:
896
+ team_id: The ID of the team to which the new goal is added.
897
+ description: A brief description of the goal.
898
+ name: The name of the goal.
899
+ due_date: The due date for the goal.
900
+ multiple_owners: Indicates whether the goal can have multiple owners.
901
+ owners: A list of owners for the goal.
902
+ color: The color associated with the goal.
903
+
904
+ Returns:
905
+ A dictionary containing the newly added goal's details.
906
+
907
+ Raises:
908
+ ValueError: Raised when any required parameter ('team_id', 'description', 'name', 'due_date', 'multiple_owners', 'owners', 'color') is missing.
909
+
910
+ Tags:
911
+ manage, goals, create, team-management
912
+ """
913
+ if team_id is None:
914
+ raise ValueError("Missing required parameter 'team_id'")
915
+ if description is None:
916
+ raise ValueError("Missing required parameter 'description'")
917
+ if name is None:
918
+ raise ValueError("Missing required parameter 'name'")
919
+ if due_date is None:
920
+ raise ValueError("Missing required parameter 'due_date'")
921
+ if multiple_owners is None:
922
+ raise ValueError("Missing required parameter 'multiple_owners'")
923
+ if owners is None:
924
+ raise ValueError("Missing required parameter 'owners'")
925
+ if color is None:
926
+ raise ValueError("Missing required parameter 'color'")
927
+ request_body = {
928
+ 'description': description,
929
+ 'name': name,
930
+ 'due_date': due_date,
931
+ 'multiple_owners': multiple_owners,
932
+ 'owners': owners,
933
+ 'color': color,
934
+ }
935
+ request_body = {k: v for k, v in request_body.items() if v is not None}
936
+ url = f"{self.base_url}/team/{team_id}/goal"
937
+ query_params = {}
938
+ response = self._post(url, data=request_body, params=query_params)
939
+ response.raise_for_status()
940
+ return response.json()
941
+
942
+ def goals_get_details(self, goal_id) -> dict[str, Any]:
943
+ """
944
+ Retrieves detailed information about a goal based on the provided goal ID.
945
+
946
+ Args:
947
+ goal_id: ID of the goal to retrieve details for.
948
+
949
+ Returns:
950
+ A dictionary containing detailed information about the goal.
951
+
952
+ Raises:
953
+ ValueError: Raised when the goal_id parameter is missing.
954
+
955
+ Tags:
956
+ get, details, management
957
+ """
958
+ if goal_id is None:
959
+ raise ValueError("Missing required parameter 'goal_id'")
960
+ url = f"{self.base_url}/goal/{goal_id}"
961
+ query_params = {}
962
+ response = self._get(url, params=query_params)
963
+ response.raise_for_status()
964
+ return response.json()
965
+
966
+ def goals_update_goal_details(self, goal_id, description, name, due_date, rem_owners, add_owners, color) -> dict[str, Any]:
967
+ """
968
+ Updates the details of an existing goal with new information, including description, name, due date, owners, and color.
969
+
970
+ Args:
971
+ goal_id: str. The unique identifier of the goal to update.
972
+ description: str. The updated description for the goal.
973
+ name: str. The new name for the goal.
974
+ due_date: str. The new due date for the goal, typically in ISO 8601 format.
975
+ rem_owners: list. List of owner identifiers to remove from the goal.
976
+ add_owners: list. List of owner identifiers to add to the goal.
977
+ color: str. The color code or name representing the goal's new color.
978
+
979
+ Returns:
980
+ dict[str, Any]: A dictionary containing the updated goal details as returned by the server.
981
+
982
+ Raises:
983
+ ValueError: If any of the required parameters ('goal_id', 'description', 'name', 'due_date', 'rem_owners', 'add_owners', 'color') is None.
984
+ requests.HTTPError: If the server returns an unsuccessful status code during the update request.
985
+
986
+ Tags:
987
+ update, goal-management, async_job
988
+ """
989
+ if goal_id is None:
990
+ raise ValueError("Missing required parameter 'goal_id'")
991
+ if description is None:
992
+ raise ValueError("Missing required parameter 'description'")
993
+ if name is None:
994
+ raise ValueError("Missing required parameter 'name'")
995
+ if due_date is None:
996
+ raise ValueError("Missing required parameter 'due_date'")
997
+ if rem_owners is None:
998
+ raise ValueError("Missing required parameter 'rem_owners'")
999
+ if add_owners is None:
1000
+ raise ValueError("Missing required parameter 'add_owners'")
1001
+ if color is None:
1002
+ raise ValueError("Missing required parameter 'color'")
1003
+ request_body = {
1004
+ 'description': description,
1005
+ 'name': name,
1006
+ 'due_date': due_date,
1007
+ 'rem_owners': rem_owners,
1008
+ 'add_owners': add_owners,
1009
+ 'color': color,
1010
+ }
1011
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1012
+ url = f"{self.base_url}/goal/{goal_id}"
1013
+ query_params = {}
1014
+ response = self._put(url, data=request_body, params=query_params)
1015
+ response.raise_for_status()
1016
+ return response.json()
1017
+
1018
+ def goals_remove_goal(self, goal_id) -> dict[str, Any]:
1019
+ """
1020
+ Removes a goal from the system using the specified goal ID.
1021
+
1022
+ Args:
1023
+ goal_id: The unique identifier of the goal to be removed. Cannot be None.
1024
+
1025
+ Returns:
1026
+ A dictionary containing the API response after goal deletion.
1027
+
1028
+ Raises:
1029
+ ValueError: Raised when the required goal_id parameter is None.
1030
+ HTTPError: Raised when the HTTP request to delete the goal fails.
1031
+
1032
+ Tags:
1033
+ remove, delete, goal, management
1034
+ """
1035
+ if goal_id is None:
1036
+ raise ValueError("Missing required parameter 'goal_id'")
1037
+ url = f"{self.base_url}/goal/{goal_id}"
1038
+ query_params = {}
1039
+ response = self._delete(url, params=query_params)
1040
+ response.raise_for_status()
1041
+ return response.json()
1042
+
1043
+ def goals_add_key_result(self, goal_id, name, owners, type, steps_start, steps_end, unit, task_ids, list_ids) -> dict[str, Any]:
1044
+ """
1045
+ Creates and adds a new key result to a specified goal with the provided details and associated tasks/lists.
1046
+
1047
+ Args:
1048
+ goal_id: str. Unique identifier of the goal to which the key result will be added.
1049
+ name: str. Name of the key result.
1050
+ owners: list. List of user identifiers who own the key result.
1051
+ type: str. Type or category of the key result.
1052
+ steps_start: int or float. The starting value or progress metric for the key result.
1053
+ steps_end: int or float. The target value or ending progress metric for the key result.
1054
+ unit: str. Unit of measurement for the key result's progress (e.g., 'percent', 'tasks').
1055
+ task_ids: list. List of task IDs associated with the key result.
1056
+ list_ids: list. List of list IDs to associate with the key result.
1057
+
1058
+ Returns:
1059
+ dict. The JSON response containing details of the newly created key result.
1060
+
1061
+ Raises:
1062
+ ValueError: Raised if any required parameter (goal_id, name, owners, type, steps_start, steps_end, unit, task_ids, list_ids) is None.
1063
+ requests.HTTPError: Raised if the HTTP request fails (non-success response status).
1064
+
1065
+ Tags:
1066
+ add, key-result, goals, management
1067
+ """
1068
+ if goal_id is None:
1069
+ raise ValueError("Missing required parameter 'goal_id'")
1070
+ if name is None:
1071
+ raise ValueError("Missing required parameter 'name'")
1072
+ if owners is None:
1073
+ raise ValueError("Missing required parameter 'owners'")
1074
+ if type is None:
1075
+ raise ValueError("Missing required parameter 'type'")
1076
+ if steps_start is None:
1077
+ raise ValueError("Missing required parameter 'steps_start'")
1078
+ if steps_end is None:
1079
+ raise ValueError("Missing required parameter 'steps_end'")
1080
+ if unit is None:
1081
+ raise ValueError("Missing required parameter 'unit'")
1082
+ if task_ids is None:
1083
+ raise ValueError("Missing required parameter 'task_ids'")
1084
+ if list_ids is None:
1085
+ raise ValueError("Missing required parameter 'list_ids'")
1086
+ request_body = {
1087
+ 'name': name,
1088
+ 'owners': owners,
1089
+ 'type': type,
1090
+ 'steps_start': steps_start,
1091
+ 'steps_end': steps_end,
1092
+ 'unit': unit,
1093
+ 'task_ids': task_ids,
1094
+ 'list_ids': list_ids,
1095
+ }
1096
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1097
+ url = f"{self.base_url}/goal/{goal_id}/key_result"
1098
+ query_params = {}
1099
+ response = self._post(url, data=request_body, params=query_params)
1100
+ response.raise_for_status()
1101
+ return response.json()
1102
+
1103
+ def goals_update_key_result(self, key_result_id, steps_current, note) -> dict[str, Any]:
1104
+ """
1105
+ Updates the current number of steps and note for a specific key result.
1106
+
1107
+ Args:
1108
+ key_result_id: The unique identifier of the key result to update.
1109
+ steps_current: The current number of steps achieved for the key result.
1110
+ note: A note or comment associated with the update.
1111
+
1112
+ Returns:
1113
+ A dictionary containing the updated key result data as returned by the server.
1114
+
1115
+ Raises:
1116
+ ValueError: If any of 'key_result_id', 'steps_current', or 'note' is None.
1117
+ requests.HTTPError: If the HTTP PUT request fails (non-success response from the server).
1118
+
1119
+ Tags:
1120
+ update, goals, management, key-result
1121
+ """
1122
+ if key_result_id is None:
1123
+ raise ValueError("Missing required parameter 'key_result_id'")
1124
+ if steps_current is None:
1125
+ raise ValueError("Missing required parameter 'steps_current'")
1126
+ if note is None:
1127
+ raise ValueError("Missing required parameter 'note'")
1128
+ request_body = {
1129
+ 'steps_current': steps_current,
1130
+ 'note': note,
1131
+ }
1132
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1133
+ url = f"{self.base_url}/key_result/{key_result_id}"
1134
+ query_params = {}
1135
+ response = self._put(url, data=request_body, params=query_params)
1136
+ response.raise_for_status()
1137
+ return response.json()
1138
+
1139
+ def goals_remove_target(self, key_result_id) -> dict[str, Any]:
1140
+ """
1141
+ Removes the target associated with a specified key result by sending a DELETE request to the API.
1142
+
1143
+ Args:
1144
+ key_result_id: The unique identifier of the key result whose target is to be removed.
1145
+
1146
+ Returns:
1147
+ A dictionary representing the JSON response from the API after the target is removed.
1148
+
1149
+ Raises:
1150
+ ValueError: If 'key_result_id' is None.
1151
+ requests.HTTPError: If the DELETE HTTP request fails or returns an error status.
1152
+
1153
+ Tags:
1154
+ remove, management, api
1155
+ """
1156
+ if key_result_id is None:
1157
+ raise ValueError("Missing required parameter 'key_result_id'")
1158
+ url = f"{self.base_url}/key_result/{key_result_id}"
1159
+ query_params = {}
1160
+ response = self._delete(url, params=query_params)
1161
+ response.raise_for_status()
1162
+ return response.json()
1163
+
1164
+ def guests_invite_to_workspace(self, team_id, email, can_edit_tags, can_see_time_spent, can_see_time_estimated, can_create_views, custom_role_id) -> dict[str, Any]:
1165
+ """
1166
+ Invites a guest to a workspace with specific permissions.
1167
+
1168
+ Args:
1169
+ team_id: The unique identifier of the team/workspace.
1170
+ email: Email address of the guest to invite.
1171
+ can_edit_tags: Boolean indicating if the guest can edit tags.
1172
+ can_see_time_spent: Boolean indicating if the guest can see time spent on tasks.
1173
+ can_see_time_estimated: Boolean indicating if the guest can see estimated time for tasks.
1174
+ can_create_views: Boolean indicating if the guest can create views.
1175
+ custom_role_id: The ID of the custom role to assign to the guest.
1176
+
1177
+ Returns:
1178
+ A dictionary containing the response data from the API.
1179
+
1180
+ Raises:
1181
+ ValueError: Raised when any required parameter is None.
1182
+ HTTPError: Raised when the API request fails.
1183
+
1184
+ Tags:
1185
+ invite, guest, workspace, permission, management
1186
+ """
1187
+ if team_id is None:
1188
+ raise ValueError("Missing required parameter 'team_id'")
1189
+ if email is None:
1190
+ raise ValueError("Missing required parameter 'email'")
1191
+ if can_edit_tags is None:
1192
+ raise ValueError("Missing required parameter 'can_edit_tags'")
1193
+ if can_see_time_spent is None:
1194
+ raise ValueError("Missing required parameter 'can_see_time_spent'")
1195
+ if can_see_time_estimated is None:
1196
+ raise ValueError("Missing required parameter 'can_see_time_estimated'")
1197
+ if can_create_views is None:
1198
+ raise ValueError("Missing required parameter 'can_create_views'")
1199
+ if custom_role_id is None:
1200
+ raise ValueError("Missing required parameter 'custom_role_id'")
1201
+ request_body = {
1202
+ 'email': email,
1203
+ 'can_edit_tags': can_edit_tags,
1204
+ 'can_see_time_spent': can_see_time_spent,
1205
+ 'can_see_time_estimated': can_see_time_estimated,
1206
+ 'can_create_views': can_create_views,
1207
+ 'custom_role_id': custom_role_id,
1208
+ }
1209
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1210
+ url = f"{self.base_url}/team/{team_id}/guest"
1211
+ query_params = {}
1212
+ response = self._post(url, data=request_body, params=query_params)
1213
+ response.raise_for_status()
1214
+ return response.json()
1215
+
1216
+ def guests_get_guest_information(self, team_id, guest_id) -> dict[str, Any]:
1217
+ """
1218
+ Fetches guest information for a specific guest in a team.
1219
+
1220
+ Args:
1221
+ team_id: The ID of the team.
1222
+ guest_id: The ID of the guest.
1223
+
1224
+ Returns:
1225
+ A dictionary containing the guest information.
1226
+
1227
+ Raises:
1228
+ ValueError: Raised when either team_id or guest_id is missing.
1229
+
1230
+ Tags:
1231
+ fetch, guest, management
1232
+ """
1233
+ if team_id is None:
1234
+ raise ValueError("Missing required parameter 'team_id'")
1235
+ if guest_id is None:
1236
+ raise ValueError("Missing required parameter 'guest_id'")
1237
+ url = f"{self.base_url}/team/{team_id}/guest/{guest_id}"
1238
+ query_params = {}
1239
+ response = self._get(url, params=query_params)
1240
+ response.raise_for_status()
1241
+ return response.json()
1242
+
1243
+ def guests_edit_guest_on_workspace(self, team_id, guest_id, username, can_edit_tags, can_see_time_spent, can_see_time_estimated, can_create_views, custom_role_id) -> dict[str, Any]:
1244
+ """
1245
+ Edits a guest user's permissions and role within a specified workspace team.
1246
+
1247
+ Args:
1248
+ team_id: str. The unique identifier of the workspace team.
1249
+ guest_id: str. The unique identifier of the guest user to edit.
1250
+ username: str. The guest user's username.
1251
+ can_edit_tags: bool. Whether the guest can edit tags in the workspace.
1252
+ can_see_time_spent: bool. Whether the guest can view time spent information.
1253
+ can_see_time_estimated: bool. Whether the guest can view estimated time information.
1254
+ can_create_views: bool. Whether the guest can create new views in the workspace.
1255
+ custom_role_id: str. Identifier for a custom role to assign to the guest user.
1256
+
1257
+ Returns:
1258
+ dict[str, Any]: A dictionary representing the updated guest user resource as returned by the workspace API.
1259
+
1260
+ Raises:
1261
+ ValueError: If any of the required parameters ('team_id', 'guest_id', 'username', 'can_edit_tags', 'can_see_time_spent', 'can_see_time_estimated', 'can_create_views', 'custom_role_id') are None.
1262
+ requests.HTTPError: If the HTTP request to update the guest fails (e.g., due to network errors or unsuccessful response status).
1263
+
1264
+ Tags:
1265
+ edit, guest-management, workspace, api, permissions
1266
+ """
1267
+ if team_id is None:
1268
+ raise ValueError("Missing required parameter 'team_id'")
1269
+ if guest_id is None:
1270
+ raise ValueError("Missing required parameter 'guest_id'")
1271
+ if username is None:
1272
+ raise ValueError("Missing required parameter 'username'")
1273
+ if can_edit_tags is None:
1274
+ raise ValueError("Missing required parameter 'can_edit_tags'")
1275
+ if can_see_time_spent is None:
1276
+ raise ValueError("Missing required parameter 'can_see_time_spent'")
1277
+ if can_see_time_estimated is None:
1278
+ raise ValueError("Missing required parameter 'can_see_time_estimated'")
1279
+ if can_create_views is None:
1280
+ raise ValueError("Missing required parameter 'can_create_views'")
1281
+ if custom_role_id is None:
1282
+ raise ValueError("Missing required parameter 'custom_role_id'")
1283
+ request_body = {
1284
+ 'username': username,
1285
+ 'can_edit_tags': can_edit_tags,
1286
+ 'can_see_time_spent': can_see_time_spent,
1287
+ 'can_see_time_estimated': can_see_time_estimated,
1288
+ 'can_create_views': can_create_views,
1289
+ 'custom_role_id': custom_role_id,
1290
+ }
1291
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1292
+ url = f"{self.base_url}/team/{team_id}/guest/{guest_id}"
1293
+ query_params = {}
1294
+ response = self._put(url, data=request_body, params=query_params)
1295
+ response.raise_for_status()
1296
+ return response.json()
1297
+
1298
+ def guests_revoke_guest_access_to_workspace(self, team_id, guest_id) -> dict[str, Any]:
1299
+ """
1300
+ Revokes a guest's access to a workspace for a specified team.
1301
+
1302
+ Args:
1303
+ team_id: str. The unique identifier of the team whose workspace the guest will lose access to.
1304
+ guest_id: str. The unique identifier of the guest whose access is being revoked.
1305
+
1306
+ Returns:
1307
+ dict[str, Any]: The response data from the API, typically containing details about the revoked guest access.
1308
+
1309
+ Raises:
1310
+ ValueError: Raised if 'team_id' or 'guest_id' is None.
1311
+ requests.HTTPError: Raised if the HTTP request fails (non-2xx response).
1312
+
1313
+ Tags:
1314
+ revoke, access-control, guest-management, workspace
1315
+ """
1316
+ if team_id is None:
1317
+ raise ValueError("Missing required parameter 'team_id'")
1318
+ if guest_id is None:
1319
+ raise ValueError("Missing required parameter 'guest_id'")
1320
+ url = f"{self.base_url}/team/{team_id}/guest/{guest_id}"
1321
+ query_params = {}
1322
+ response = self._delete(url, params=query_params)
1323
+ response.raise_for_status()
1324
+ return response.json()
1325
+
1326
+ def guests_add_to_task(self, task_id, guest_id, permission_level, include_shared=None, custom_task_ids=None, team_id=None) -> dict[str, Any]:
1327
+ """
1328
+ Adds a guest to a task with specified permission level and optional parameters.
1329
+
1330
+ Args:
1331
+ task_id: The ID of the task to which the guest is being added.
1332
+ guest_id: The ID of the guest to add to the task.
1333
+ permission_level: The permission level granted to the guest.
1334
+ include_shared: Optional parameter to include shared tasks.
1335
+ custom_task_ids: Optional list of custom task IDs.
1336
+ team_id: Optional ID of the team related to the task.
1337
+
1338
+ Returns:
1339
+ A dictionary containing the response from adding a guest to the task.
1340
+
1341
+ Raises:
1342
+ ValueError: Raised when task_id, guest_id, or permission_level is missing.
1343
+
1344
+ Tags:
1345
+ add, manage, task, guest, permission, async_job
1346
+ """
1347
+ if task_id is None:
1348
+ raise ValueError("Missing required parameter 'task_id'")
1349
+ if guest_id is None:
1350
+ raise ValueError("Missing required parameter 'guest_id'")
1351
+ if permission_level is None:
1352
+ raise ValueError("Missing required parameter 'permission_level'")
1353
+ request_body = {
1354
+ 'permission_level': permission_level,
1355
+ }
1356
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1357
+ url = f"{self.base_url}/task/{task_id}/guest/{guest_id}"
1358
+ query_params = {k: v for k, v in [('include_shared', include_shared), ('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
1359
+ response = self._post(url, data=request_body, params=query_params)
1360
+ response.raise_for_status()
1361
+ return response.json()
1362
+
1363
+ def guests_revoke_access_to_task(self, task_id, guest_id, include_shared=None, custom_task_ids=None, team_id=None) -> dict[str, Any]:
1364
+ """
1365
+ Revokes a guest user's access to a specific task, with options to customize the revocation scope.
1366
+
1367
+ Args:
1368
+ task_id: str. The unique identifier of the task from which guest access is being revoked.
1369
+ guest_id: str. The unique identifier of the guest whose access will be revoked.
1370
+ include_shared: Optional[bool]. Whether to include shared tasks in the revocation process.
1371
+ custom_task_ids: Optional[list or str]. Custom task identifiers to further specify which tasks to affect.
1372
+ team_id: Optional[str]. The identifier of the team if the task is associated with a team context.
1373
+
1374
+ Returns:
1375
+ dict[str, Any]: A dictionary containing the API response data after revoking access.
1376
+
1377
+ Raises:
1378
+ ValueError: If either 'task_id' or 'guest_id' is not provided.
1379
+ HTTPError: If the API request to revoke access fails.
1380
+
1381
+ Tags:
1382
+ guests, revoke, access, task, management
1383
+ """
1384
+ if task_id is None:
1385
+ raise ValueError("Missing required parameter 'task_id'")
1386
+ if guest_id is None:
1387
+ raise ValueError("Missing required parameter 'guest_id'")
1388
+ url = f"{self.base_url}/task/{task_id}/guest/{guest_id}"
1389
+ query_params = {k: v for k, v in [('include_shared', include_shared), ('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
1390
+ response = self._delete(url, params=query_params)
1391
+ response.raise_for_status()
1392
+ return response.json()
1393
+
1394
+ def guests_share_list_with(self, list_id, guest_id, permission_level, include_shared=None) -> dict[str, Any]:
1395
+ """
1396
+ Shares a list with a specified guest by assigning a permission level and optionally including shared items.
1397
+
1398
+ Args:
1399
+ list_id: The unique identifier of the list to be shared.
1400
+ guest_id: The unique identifier of the guest with whom the list will be shared.
1401
+ permission_level: The access level to grant the guest (e.g., 'read', 'edit').
1402
+ include_shared: Optional; if provided, specifies whether to include items already shared with the guest.
1403
+
1404
+ Returns:
1405
+ A dictionary containing the response data from the share operation, typically including sharing status and permissions.
1406
+
1407
+ Raises:
1408
+ ValueError: If any of the required parameters ('list_id', 'guest_id', or 'permission_level') are missing.
1409
+ requests.HTTPError: If the HTTP request to share the list fails (e.g., due to network issues or invalid input).
1410
+
1411
+ Tags:
1412
+ share, list, permission-management, guest
1413
+ """
1414
+ if list_id is None:
1415
+ raise ValueError("Missing required parameter 'list_id'")
1416
+ if guest_id is None:
1417
+ raise ValueError("Missing required parameter 'guest_id'")
1418
+ if permission_level is None:
1419
+ raise ValueError("Missing required parameter 'permission_level'")
1420
+ request_body = {
1421
+ 'permission_level': permission_level,
1422
+ }
1423
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1424
+ url = f"{self.base_url}/list/{list_id}/guest/{guest_id}"
1425
+ query_params = {k: v for k, v in [('include_shared', include_shared)] if v is not None}
1426
+ response = self._post(url, data=request_body, params=query_params)
1427
+ response.raise_for_status()
1428
+ return response.json()
1429
+
1430
+ def guests_remove_from_list(self, list_id, guest_id, include_shared=None) -> dict[str, Any]:
1431
+ """
1432
+ Removes a guest from a specified list, optionally including shared guests in the operation.
1433
+
1434
+ Args:
1435
+ list_id: The unique identifier of the list from which the guest will be removed. Must not be None.
1436
+ guest_id: The unique identifier of the guest to remove. Must not be None.
1437
+ include_shared: Optional; if provided, determines whether shared guests should be included in the removal.
1438
+
1439
+ Returns:
1440
+ A dictionary containing the response data from the removal operation.
1441
+
1442
+ Raises:
1443
+ ValueError: Raised if 'list_id' or 'guest_id' is None.
1444
+ requests.HTTPError: Raised if the HTTP request to remove the guest fails.
1445
+
1446
+ Tags:
1447
+ guests, remove, management, list
1448
+ """
1449
+ if list_id is None:
1450
+ raise ValueError("Missing required parameter 'list_id'")
1451
+ if guest_id is None:
1452
+ raise ValueError("Missing required parameter 'guest_id'")
1453
+ url = f"{self.base_url}/list/{list_id}/guest/{guest_id}"
1454
+ query_params = {k: v for k, v in [('include_shared', include_shared)] if v is not None}
1455
+ response = self._delete(url, params=query_params)
1456
+ response.raise_for_status()
1457
+ return response.json()
1458
+
1459
+ def guests_add_guest_to_folder(self, folder_id, guest_id, permission_level, include_shared=None) -> dict[str, Any]:
1460
+ """
1461
+ Adds a guest to a specified folder with a given permission level, optionally including shared folders.
1462
+
1463
+ Args:
1464
+ folder_id: str. The unique identifier of the folder to which the guest will be added.
1465
+ guest_id: str. The unique identifier of the guest user to add to the folder.
1466
+ permission_level: str. The permission level to assign to the guest (e.g., 'read', 'write').
1467
+ include_shared: Optional[bool]. If True, includes shared folders in the operation. Defaults to None.
1468
+
1469
+ Returns:
1470
+ dict[str, Any]: The server response as a dictionary containing the details of the updated folder and guest permissions.
1471
+
1472
+ Raises:
1473
+ ValueError: If 'folder_id', 'guest_id', or 'permission_level' is None.
1474
+ requests.HTTPError: If the HTTP request to the server fails or returns an error status.
1475
+
1476
+ Tags:
1477
+ add, guest-management, folder-permissions, api-call
1478
+ """
1479
+ if folder_id is None:
1480
+ raise ValueError("Missing required parameter 'folder_id'")
1481
+ if guest_id is None:
1482
+ raise ValueError("Missing required parameter 'guest_id'")
1483
+ if permission_level is None:
1484
+ raise ValueError("Missing required parameter 'permission_level'")
1485
+ request_body = {
1486
+ 'permission_level': permission_level,
1487
+ }
1488
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1489
+ url = f"{self.base_url}/folder/{folder_id}/guest/{guest_id}"
1490
+ query_params = {k: v for k, v in [('include_shared', include_shared)] if v is not None}
1491
+ response = self._post(url, data=request_body, params=query_params)
1492
+ response.raise_for_status()
1493
+ return response.json()
1494
+
1495
+ def guests_revoke_access_from_folder(self, folder_id, guest_id, include_shared=None) -> dict[str, Any]:
1496
+ """
1497
+ Revokes a guest's access from a specified folder, with optional inclusion of shared resources.
1498
+
1499
+ Args:
1500
+ folder_id: str. The unique identifier of the folder from which to revoke access.
1501
+ guest_id: str. The unique identifier of the guest whose access will be revoked.
1502
+ include_shared: Optional[bool]. If True, also revokes access from shared resources. Defaults to None.
1503
+
1504
+ Returns:
1505
+ dict[str, Any]: A dictionary containing the API response to the revoke operation.
1506
+
1507
+ Raises:
1508
+ ValueError: Raised if 'folder_id' or 'guest_id' is not provided.
1509
+ requests.HTTPError: Raised if the HTTP request to revoke access fails.
1510
+
1511
+ Tags:
1512
+ guests, revoke, access, folder-management, api
1513
+ """
1514
+ if folder_id is None:
1515
+ raise ValueError("Missing required parameter 'folder_id'")
1516
+ if guest_id is None:
1517
+ raise ValueError("Missing required parameter 'guest_id'")
1518
+ url = f"{self.base_url}/folder/{folder_id}/guest/{guest_id}"
1519
+ query_params = {k: v for k, v in [('include_shared', include_shared)] if v is not None}
1520
+ response = self._delete(url, params=query_params)
1521
+ response.raise_for_status()
1522
+ return response.json()
1523
+
1524
+ def lists_get_folder_lists(self, folder_id, archived=None) -> dict[str, Any]:
1525
+ """
1526
+ Retrieves all lists contained within a specified folder, with optional filtering for archived lists.
1527
+
1528
+ Args:
1529
+ folder_id: The unique identifier of the folder whose lists are to be retrieved.
1530
+ archived: Optional; if provided, filters lists by their archived status (e.g., True for archived, False for active, None for all).
1531
+
1532
+ Returns:
1533
+ A dictionary containing the folder's lists and associated metadata as provided by the API.
1534
+
1535
+ Raises:
1536
+ ValueError: Raised if 'folder_id' is not provided.
1537
+ requests.HTTPError: Raised if the HTTP request to fetch the folder's lists fails (e.g., non-2xx response).
1538
+
1539
+ Tags:
1540
+ list, get, folder, search, api , important
1541
+ """
1542
+ if folder_id is None:
1543
+ raise ValueError("Missing required parameter 'folder_id'")
1544
+ url = f"{self.base_url}/folder/{folder_id}/list"
1545
+ query_params = {k: v for k, v in [('archived', archived)] if v is not None}
1546
+ response = self._get(url, params=query_params)
1547
+ response.raise_for_status()
1548
+ return response.json()
1549
+
1550
+ def lists_add_to_folder(self, folder_id, name, content=None, due_date=None, due_date_time=None, priority=None, assignee=None, status=None) -> dict[str, Any]:
1551
+ """
1552
+ Creates a new list in the specified folder with the given name and optional attributes.
1553
+
1554
+ Args:
1555
+ folder_id: str. Unique identifier of the folder to which the list will be added.
1556
+ name: str. Name of the list to create in the folder.
1557
+ content: Optional[str]. Additional content or description for the list.
1558
+ due_date: Optional[str]. Due date for the list, if applicable.
1559
+ due_date_time: Optional[str]. Due date and time for the list, if applicable.
1560
+ priority: Optional[int]. Priority level assigned to the list.
1561
+ assignee: Optional[str]. User assigned to the list.
1562
+ status: Optional[str]. Status of the list (e.g., 'active', 'completed').
1563
+
1564
+ Returns:
1565
+ dict. The API response containing details of the newly created list.
1566
+
1567
+ Raises:
1568
+ ValueError: If 'folder_id' or 'name' is not provided.
1569
+ HTTPError: If the API request fails or returns an error status code.
1570
+
1571
+ Tags:
1572
+ list, add, folder, management, api
1573
+ """
1574
+ if folder_id is None:
1575
+ raise ValueError("Missing required parameter 'folder_id'")
1576
+ if name is None:
1577
+ raise ValueError("Missing required parameter 'name'")
1578
+ request_body = {
1579
+ 'name': name,
1580
+ 'content': content,
1581
+ 'due_date': due_date,
1582
+ 'due_date_time': due_date_time,
1583
+ 'priority': priority,
1584
+ 'assignee': assignee,
1585
+ 'status': status,
1586
+ }
1587
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1588
+ url = f"{self.base_url}/folder/{folder_id}/list"
1589
+ query_params = {}
1590
+ response = self._post(url, data=request_body, params=query_params)
1591
+ response.raise_for_status()
1592
+ return response.json()
1593
+
1594
+ def lists_get_folderless(self, space_id, archived=None) -> dict[str, Any]:
1595
+ """
1596
+ Retrieves all lists within the specified space that are not associated with a folder.
1597
+
1598
+ Args:
1599
+ space_id: str. The unique identifier for the space from which to fetch folderless lists.
1600
+ archived: Optional[bool]. If provided, filters the results to include only archived or non-archived lists.
1601
+
1602
+ Returns:
1603
+ dict[str, Any]: A dictionary containing the API response with details of folderless lists for the specified space.
1604
+
1605
+ Raises:
1606
+ ValueError: Raised if 'space_id' is None.
1607
+ HTTPError: Raised if the HTTP request to the API fails with a status error.
1608
+
1609
+ Tags:
1610
+ list, fetch, management, api, important
1611
+ """
1612
+ if space_id is None:
1613
+ raise ValueError("Missing required parameter 'space_id'")
1614
+ url = f"{self.base_url}/space/{space_id}/list"
1615
+ query_params = {k: v for k, v in [('archived', archived)] if v is not None}
1616
+ response = self._get(url, params=query_params)
1617
+ response.raise_for_status()
1618
+ return response.json()
1619
+
1620
+ def lists_create_folderless_list(self, space_id, name, content=None, due_date=None, due_date_time=None, priority=None, assignee=None, status=None) -> dict[str, Any]:
1621
+ """
1622
+ Creates a new list within a specified space without associating it with a folder.
1623
+
1624
+ Args:
1625
+ space_id: str. The unique identifier of the space in which to create the list.
1626
+ name: str. The name of the list to be created.
1627
+ content: Optional[str]. Additional description or content for the list.
1628
+ due_date: Optional[str]. The due date for the list, if any (format may vary by system).
1629
+ due_date_time: Optional[str]. The due date and time for the list, if required (format may vary by system).
1630
+ priority: Optional[int]. Numeric priority value for the list, where higher values indicate higher priority.
1631
+ assignee: Optional[str]. Identifier of the user assigned to the list, if any.
1632
+ status: Optional[str]. Status of the list (e.g., 'active', 'completed').
1633
+
1634
+ Returns:
1635
+ dict[str, Any]: The JSON response from the API containing the details of the newly created list.
1636
+
1637
+ Raises:
1638
+ ValueError: If 'space_id' or 'name' is not provided.
1639
+ requests.HTTPError: If the API request fails with an HTTP error status.
1640
+
1641
+ Tags:
1642
+ list, create, management, api
1643
+ """
1644
+ if space_id is None:
1645
+ raise ValueError("Missing required parameter 'space_id'")
1646
+ if name is None:
1647
+ raise ValueError("Missing required parameter 'name'")
1648
+ request_body = {
1649
+ 'name': name,
1650
+ 'content': content,
1651
+ 'due_date': due_date,
1652
+ 'due_date_time': due_date_time,
1653
+ 'priority': priority,
1654
+ 'assignee': assignee,
1655
+ 'status': status,
1656
+ }
1657
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1658
+ url = f"{self.base_url}/space/{space_id}/list"
1659
+ query_params = {}
1660
+ response = self._post(url, data=request_body, params=query_params)
1661
+ response.raise_for_status()
1662
+ return response.json()
1663
+
1664
+ def lists_get_list_details(self, list_id) -> dict[str, Any]:
1665
+ """
1666
+ Retrieves the details of a specific list by its unique identifier.
1667
+
1668
+ Args:
1669
+ list_id: The unique identifier of the list to retrieve details for.
1670
+
1671
+ Returns:
1672
+ A dictionary containing the details of the specified list as returned by the API.
1673
+
1674
+ Raises:
1675
+ ValueError: If 'list_id' is None.
1676
+ requests.HTTPError: If the HTTP request fails or the response contains an unsuccessful status code.
1677
+
1678
+ Tags:
1679
+ get, list, details, api
1680
+ """
1681
+ if list_id is None:
1682
+ raise ValueError("Missing required parameter 'list_id'")
1683
+ url = f"{self.base_url}/list/{list_id}"
1684
+ query_params = {}
1685
+ response = self._get(url, params=query_params)
1686
+ response.raise_for_status()
1687
+ return response.json()
1688
+
1689
+ def lists_update_list_info_due_date_priority_assignee_color(self, list_id, name, content, due_date, due_date_time, priority, assignee, status, unset_status) -> dict[str, Any]:
1690
+ """
1691
+ Updates the information of a list, including name, content, due date, priority, assignee, status, and color attributes.
1692
+
1693
+ Args:
1694
+ list_id: The unique identifier of the list to update.
1695
+ name: The new name of the list.
1696
+ content: The updated content or description of the list.
1697
+ due_date: The due date for the list item (string, typically in ISO format).
1698
+ due_date_time: The due date and time for the list item (string, typically in ISO format).
1699
+ priority: The priority level assigned to the list item.
1700
+ assignee: The user or entity assigned to the list item.
1701
+ status: The status to set for the list item.
1702
+ unset_status: Whether to unset the current status (boolean or flag).
1703
+
1704
+ Returns:
1705
+ A dictionary containing the updated list information as returned by the API.
1706
+
1707
+ Raises:
1708
+ ValueError: If any required parameter is missing.
1709
+ requests.HTTPError: If the HTTP request fails or returns an error status code.
1710
+
1711
+ Tags:
1712
+ update, list-management, async-job, api
1713
+ """
1714
+ if list_id is None:
1715
+ raise ValueError("Missing required parameter 'list_id'")
1716
+ if name is None:
1717
+ raise ValueError("Missing required parameter 'name'")
1718
+ if content is None:
1719
+ raise ValueError("Missing required parameter 'content'")
1720
+ if due_date is None:
1721
+ raise ValueError("Missing required parameter 'due_date'")
1722
+ if due_date_time is None:
1723
+ raise ValueError("Missing required parameter 'due_date_time'")
1724
+ if priority is None:
1725
+ raise ValueError("Missing required parameter 'priority'")
1726
+ if assignee is None:
1727
+ raise ValueError("Missing required parameter 'assignee'")
1728
+ if status is None:
1729
+ raise ValueError("Missing required parameter 'status'")
1730
+ if unset_status is None:
1731
+ raise ValueError("Missing required parameter 'unset_status'")
1732
+ request_body = {
1733
+ 'name': name,
1734
+ 'content': content,
1735
+ 'due_date': due_date,
1736
+ 'due_date_time': due_date_time,
1737
+ 'priority': priority,
1738
+ 'assignee': assignee,
1739
+ 'status': status,
1740
+ 'unset_status': unset_status,
1741
+ }
1742
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1743
+ url = f"{self.base_url}/list/{list_id}"
1744
+ query_params = {}
1745
+ response = self._put(url, data=request_body, params=query_params)
1746
+ response.raise_for_status()
1747
+ return response.json()
1748
+
1749
+ def lists_remove_list(self, list_id) -> dict[str, Any]:
1750
+ """
1751
+ Removes a list with the specified list ID via an HTTP DELETE request and returns the API response as a dictionary.
1752
+
1753
+ Args:
1754
+ list_id: The unique identifier of the list to remove. Must not be None.
1755
+
1756
+ Returns:
1757
+ A dictionary representing the JSON response from the API after deleting the specified list.
1758
+
1759
+ Raises:
1760
+ ValueError: If 'list_id' is None.
1761
+ HTTPError: If the HTTP DELETE request fails with an error status code.
1762
+
1763
+ Tags:
1764
+ remove, list, delete, management, api
1765
+ """
1766
+ if list_id is None:
1767
+ raise ValueError("Missing required parameter 'list_id'")
1768
+ url = f"{self.base_url}/list/{list_id}"
1769
+ query_params = {}
1770
+ response = self._delete(url, params=query_params)
1771
+ response.raise_for_status()
1772
+ return response.json()
1773
+
1774
+ def lists_add_task_to_list(self, list_id, task_id) -> dict[str, Any]:
1775
+ """
1776
+ Adds a task to a specified list.
1777
+
1778
+ Args:
1779
+ list_id: The unique identifier of the list to which the task will be added.
1780
+ task_id: The unique identifier of the task to be added to the list.
1781
+
1782
+ Returns:
1783
+ A dictionary containing the API response data after the task has been added to the list.
1784
+
1785
+ Raises:
1786
+ ValueError: If either list_id or task_id is None.
1787
+ HTTPError: If the HTTP request returns an unsuccessful status code.
1788
+
1789
+ Tags:
1790
+ add, task, list, management
1791
+ """
1792
+ if list_id is None:
1793
+ raise ValueError("Missing required parameter 'list_id'")
1794
+ if task_id is None:
1795
+ raise ValueError("Missing required parameter 'task_id'")
1796
+ url = f"{self.base_url}/list/{list_id}/task/{task_id}"
1797
+ query_params = {}
1798
+ response = self._post(url, data={}, params=query_params)
1799
+ response.raise_for_status()
1800
+ return response.json()
1801
+
1802
+ def lists_remove_task_from_list(self, list_id, task_id) -> dict[str, Any]:
1803
+ """
1804
+ Removes a specific task from a list by sending a DELETE request to the appropriate API endpoint.
1805
+
1806
+ Args:
1807
+ list_id: The unique identifier of the list from which the task will be removed.
1808
+ task_id: The unique identifier of the task to be removed from the list.
1809
+
1810
+ Returns:
1811
+ A dictionary containing the API response data after removing the task.
1812
+
1813
+ Raises:
1814
+ ValueError: Raised if 'list_id' or 'task_id' is None.
1815
+ requests.HTTPError: Raised if the HTTP request to remove the task fails.
1816
+
1817
+ Tags:
1818
+ remove, task, list, api, management
1819
+ """
1820
+ if list_id is None:
1821
+ raise ValueError("Missing required parameter 'list_id'")
1822
+ if task_id is None:
1823
+ raise ValueError("Missing required parameter 'task_id'")
1824
+ url = f"{self.base_url}/list/{list_id}/task/{task_id}"
1825
+ query_params = {}
1826
+ response = self._delete(url, params=query_params)
1827
+ response.raise_for_status()
1828
+ return response.json()
1829
+
1830
+ def members_get_task_access(self, task_id) -> dict[str, Any]:
1831
+ """
1832
+ Retrieves a list of members who have access to the specified task.
1833
+
1834
+ Args:
1835
+ task_id: The unique identifier of the task for which to fetch member access (str or int).
1836
+
1837
+ Returns:
1838
+ A dictionary containing information about the members with access to the specified task.
1839
+
1840
+ Raises:
1841
+ ValueError: Raised if 'task_id' is None.
1842
+ HTTPError: Raised if the HTTP request to retrieve the task members fails.
1843
+
1844
+ Tags:
1845
+ members, get, task, access, fetch
1846
+ """
1847
+ if task_id is None:
1848
+ raise ValueError("Missing required parameter 'task_id'")
1849
+ url = f"{self.base_url}/task/{task_id}/member"
1850
+ query_params = {}
1851
+ response = self._get(url, params=query_params)
1852
+ response.raise_for_status()
1853
+ return response.json()
1854
+
1855
+ def members_get_list_users(self, list_id) -> dict[str, Any]:
1856
+ """
1857
+ Retrieves the list of users who are members of the specified list.
1858
+
1859
+ Args:
1860
+ list_id: The unique identifier of the list for which to retrieve member users.
1861
+
1862
+ Returns:
1863
+ A dictionary containing the response data with user membership details for the specified list.
1864
+
1865
+ Raises:
1866
+ ValueError: If 'list_id' is None.
1867
+ requests.HTTPError: If the HTTP request to fetch the list members fails.
1868
+
1869
+ Tags:
1870
+ get, list, users, management
1871
+ """
1872
+ if list_id is None:
1873
+ raise ValueError("Missing required parameter 'list_id'")
1874
+ url = f"{self.base_url}/list/{list_id}/member"
1875
+ query_params = {}
1876
+ response = self._get(url, params=query_params)
1877
+ response.raise_for_status()
1878
+ return response.json()
1879
+
1880
+ def roles_list_available_custom_roles(self, team_id, include_members=None) -> dict[str, Any]:
1881
+ """
1882
+ Retrieves a list of available custom roles for a specified team, optionally including role members.
1883
+
1884
+ Args:
1885
+ team_id: The ID of the team for which to retrieve custom roles.
1886
+ include_members: Optional flag indicating whether to include role members in the response. Defaults to None.
1887
+
1888
+ Returns:
1889
+ A dictionary containing custom roles with optional member details.
1890
+
1891
+ Raises:
1892
+ ValueError: Raised when the 'team_id' parameter is missing.
1893
+
1894
+ Tags:
1895
+ list, custom-roles, team-management
1896
+ """
1897
+ if team_id is None:
1898
+ raise ValueError("Missing required parameter 'team_id'")
1899
+ url = f"{self.base_url}/team/{team_id}/customroles"
1900
+ query_params = {k: v for k, v in [('include_members', include_members)] if v is not None}
1901
+ response = self._get(url, params=query_params)
1902
+ response.raise_for_status()
1903
+ return response.json()
1904
+
1905
+ def shared_hierarchy_view_tasks_lists_folders(self, team_id) -> dict[str, Any]:
1906
+ """
1907
+ Retrieves the shared hierarchy view including tasks, lists, and folders for a specified team.
1908
+
1909
+ Args:
1910
+ team_id: The unique identifier of the team whose shared hierarchy is being retrieved. Cannot be None.
1911
+
1912
+ Returns:
1913
+ A dictionary containing the shared hierarchy data with tasks, lists, and folders for the specified team.
1914
+
1915
+ Raises:
1916
+ ValueError: Raised when the required team_id parameter is None.
1917
+ HTTPError: Raised when the HTTP request fails (via raise_for_status()).
1918
+
1919
+ Tags:
1920
+ retrieve, view, hierarchy, team, shared
1921
+ """
1922
+ if team_id is None:
1923
+ raise ValueError("Missing required parameter 'team_id'")
1924
+ url = f"{self.base_url}/team/{team_id}/shared"
1925
+ query_params = {}
1926
+ response = self._get(url, params=query_params)
1927
+ response.raise_for_status()
1928
+ return response.json()
1929
+
1930
+ def spaces_get_space_details(self, team_id, archived=None) -> dict[str, Any]:
1931
+ """
1932
+ Retrieves details about spaces within a specified team, optionally filtering by archived status.
1933
+
1934
+ Args:
1935
+ team_id: str. Unique identifier for the team whose space details are to be retrieved.
1936
+ archived: Optional[bool]. If provided, filters the results to include only archived or non-archived spaces.
1937
+
1938
+ Returns:
1939
+ dict[str, Any]: A dictionary containing the space details returned by the API.
1940
+
1941
+ Raises:
1942
+ ValueError: Raised if 'team_id' is None.
1943
+ requests.HTTPError: Raised if the HTTP request to the API endpoint fails.
1944
+
1945
+ Tags:
1946
+ get, spaces, team-management, api-call
1947
+ """
1948
+ if team_id is None:
1949
+ raise ValueError("Missing required parameter 'team_id'")
1950
+ url = f"{self.base_url}/team/{team_id}/space"
1951
+ query_params = {k: v for k, v in [('archived', archived)] if v is not None}
1952
+ response = self._get(url, params=query_params)
1953
+ response.raise_for_status()
1954
+ return response.json()
1955
+
1956
+ def spaces_add_new_space_to_workspace(self, team_id, name, multiple_assignees, features) -> dict[str, Any]:
1957
+ """
1958
+ Creates a new space within a specified workspace team, configuring assignment settings and desired features.
1959
+
1960
+ Args:
1961
+ team_id: str. The unique identifier of the workspace team in which to create the new space.
1962
+ name: str. The name to assign to the new space.
1963
+ multiple_assignees: bool. Indicates whether tasks in the new space can have multiple assignees.
1964
+ features: Any. Features to enable for the new space. The exact type and structure may depend on the underlying API.
1965
+
1966
+ Returns:
1967
+ dict[str, Any]: A dictionary containing the details of the newly created space, as returned by the API.
1968
+
1969
+ Raises:
1970
+ ValueError: Raised if any of the required parameters ('team_id', 'name', 'multiple_assignees', or 'features') is None.
1971
+ requests.HTTPError: Raised if the POST request to the API endpoint fails or returns an unsuccessful status code.
1972
+
1973
+ Tags:
1974
+ add, create, space, workspace, management, api
1975
+ """
1976
+ if team_id is None:
1977
+ raise ValueError("Missing required parameter 'team_id'")
1978
+ if name is None:
1979
+ raise ValueError("Missing required parameter 'name'")
1980
+ if multiple_assignees is None:
1981
+ raise ValueError("Missing required parameter 'multiple_assignees'")
1982
+ if features is None:
1983
+ raise ValueError("Missing required parameter 'features'")
1984
+ request_body = {
1985
+ 'name': name,
1986
+ 'multiple_assignees': multiple_assignees,
1987
+ 'features': features,
1988
+ }
1989
+ request_body = {k: v for k, v in request_body.items() if v is not None}
1990
+ url = f"{self.base_url}/team/{team_id}/space"
1991
+ query_params = {}
1992
+ response = self._post(url, data=request_body, params=query_params)
1993
+ response.raise_for_status()
1994
+ return response.json()
1995
+
1996
+ def spaces_get_details(self, space_id) -> dict[str, Any]:
1997
+ """
1998
+ Retrieves the details of a specified space by its unique identifier.
1999
+
2000
+ Args:
2001
+ space_id: str. The unique identifier of the space to retrieve details for.
2002
+
2003
+ Returns:
2004
+ dict[str, Any]. A dictionary containing the details of the requested space as returned by the API.
2005
+
2006
+ Raises:
2007
+ ValueError: If the 'space_id' parameter is None.
2008
+ requests.HTTPError: If the HTTP request to retrieve the space details fails.
2009
+
2010
+ Tags:
2011
+ get, details, space, api
2012
+ """
2013
+ if space_id is None:
2014
+ raise ValueError("Missing required parameter 'space_id'")
2015
+ url = f"{self.base_url}/space/{space_id}"
2016
+ query_params = {}
2017
+ response = self._get(url, params=query_params)
2018
+ response.raise_for_status()
2019
+ return response.json()
2020
+
2021
+ def spaces_update_details_and_enable_click_apps(self, space_id, name, color, private, admin_can_manage, multiple_assignees, features) -> dict[str, Any]:
2022
+ """
2023
+ Updates the details of a specific space and enables click apps by sending a PUT request with the provided attributes.
2024
+
2025
+ Args:
2026
+ space_id: str. The unique identifier of the space to update.
2027
+ name: str. The new name to assign to the space.
2028
+ color: str. The color code or name for the space.
2029
+ private: bool. Whether the space should be private.
2030
+ admin_can_manage: bool. Specifies if admins can manage the space.
2031
+ multiple_assignees: bool. Allow multiple users to be assigned to tasks in the space.
2032
+ features: Any. Additional features or settings to enable for the space.
2033
+
2034
+ Returns:
2035
+ dict[str, Any]: The updated space details as returned by the server.
2036
+
2037
+ Raises:
2038
+ ValueError: If any required parameter (space_id, name, color, private, admin_can_manage, multiple_assignees, or features) is None.
2039
+ requests.HTTPError: If the server returns an error response status.
2040
+
2041
+ Tags:
2042
+ update, spaces, management, http, api
2043
+ """
2044
+ if space_id is None:
2045
+ raise ValueError("Missing required parameter 'space_id'")
2046
+ if name is None:
2047
+ raise ValueError("Missing required parameter 'name'")
2048
+ if color is None:
2049
+ raise ValueError("Missing required parameter 'color'")
2050
+ if private is None:
2051
+ raise ValueError("Missing required parameter 'private'")
2052
+ if admin_can_manage is None:
2053
+ raise ValueError("Missing required parameter 'admin_can_manage'")
2054
+ if multiple_assignees is None:
2055
+ raise ValueError("Missing required parameter 'multiple_assignees'")
2056
+ if features is None:
2057
+ raise ValueError("Missing required parameter 'features'")
2058
+ request_body = {
2059
+ 'name': name,
2060
+ 'color': color,
2061
+ 'private': private,
2062
+ 'admin_can_manage': admin_can_manage,
2063
+ 'multiple_assignees': multiple_assignees,
2064
+ 'features': features,
2065
+ }
2066
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2067
+ url = f"{self.base_url}/space/{space_id}"
2068
+ query_params = {}
2069
+ response = self._put(url, data=request_body, params=query_params)
2070
+ response.raise_for_status()
2071
+ return response.json()
2072
+
2073
+ def spaces_remove_space(self, space_id) -> dict[str, Any]:
2074
+ """
2075
+ Removes a space identified by the given space_id.
2076
+
2077
+ Args:
2078
+ space_id: The unique identifier of the space to be removed. Cannot be None.
2079
+
2080
+ Returns:
2081
+ A dictionary containing the JSON response from the server after space deletion.
2082
+
2083
+ Raises:
2084
+ ValueError: Raised when space_id is None.
2085
+ HTTPError: Raised when the HTTP request fails or returns an error status code.
2086
+
2087
+ Tags:
2088
+ remove, delete, space, management
2089
+ """
2090
+ if space_id is None:
2091
+ raise ValueError("Missing required parameter 'space_id'")
2092
+ url = f"{self.base_url}/space/{space_id}"
2093
+ query_params = {}
2094
+ response = self._delete(url, params=query_params)
2095
+ response.raise_for_status()
2096
+ return response.json()
2097
+
2098
+ def tags_get_space(self, space_id) -> dict[str, Any]:
2099
+ """
2100
+ Retrieves all tags associated with a specific space by its unique identifier.
2101
+
2102
+ Args:
2103
+ space_id: str. The unique identifier of the space whose tags are to be retrieved.
2104
+
2105
+ Returns:
2106
+ dict[str, Any]: A dictionary containing the tags for the specified space, as parsed from the JSON response.
2107
+
2108
+ Raises:
2109
+ ValueError: If the 'space_id' parameter is None.
2110
+ requests.HTTPError: If the HTTP request to retrieve tags fails (non-2xx response).
2111
+
2112
+ Tags:
2113
+ get, list, space, tags, api
2114
+ """
2115
+ if space_id is None:
2116
+ raise ValueError("Missing required parameter 'space_id'")
2117
+ url = f"{self.base_url}/space/{space_id}/tag"
2118
+ query_params = {}
2119
+ response = self._get(url, params=query_params)
2120
+ response.raise_for_status()
2121
+ return response.json()
2122
+
2123
+ def tags_create_space_tag(self, space_id, tag) -> dict[str, Any]:
2124
+ """
2125
+ Creates a new tag for a specified space by sending a POST request to the space tag API endpoint.
2126
+
2127
+ Args:
2128
+ space_id: The unique identifier of the space to which the tag will be added. Must not be None.
2129
+ tag: The tag to associate with the specified space. Must not be None.
2130
+
2131
+ Returns:
2132
+ A dictionary containing the API response representing the created tag.
2133
+
2134
+ Raises:
2135
+ ValueError: If 'space_id' or 'tag' is None.
2136
+ requests.HTTPError: If the HTTP request to the API endpoint returns an unsuccessful status code.
2137
+
2138
+ Tags:
2139
+ create, tag, space, api
2140
+ """
2141
+ if space_id is None:
2142
+ raise ValueError("Missing required parameter 'space_id'")
2143
+ if tag is None:
2144
+ raise ValueError("Missing required parameter 'tag'")
2145
+ request_body = {
2146
+ 'tag': tag,
2147
+ }
2148
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2149
+ url = f"{self.base_url}/space/{space_id}/tag"
2150
+ query_params = {}
2151
+ response = self._post(url, data=request_body, params=query_params)
2152
+ response.raise_for_status()
2153
+ return response.json()
2154
+
2155
+ def tags_update_space_tag(self, space_id, tag_name, tag) -> dict[str, Any]:
2156
+ """
2157
+ Updates a tag for a specified space by sending a PUT request with the provided tag data.
2158
+
2159
+ Args:
2160
+ space_id: str. The unique identifier of the space whose tag is to be updated.
2161
+ tag_name: str. The name of the tag to update for the specified space.
2162
+ tag: Any. The new value or data for the tag to be updated.
2163
+
2164
+ Returns:
2165
+ dict[str, Any]: The response payload from the API after updating the tag, parsed as a dictionary.
2166
+
2167
+ Raises:
2168
+ ValueError: If 'space_id', 'tag_name', or 'tag' is None.
2169
+ requests.HTTPError: If the HTTP request returns an unsuccessful status code.
2170
+
2171
+ Tags:
2172
+ update, tag, api, space-management
2173
+ """
2174
+ if space_id is None:
2175
+ raise ValueError("Missing required parameter 'space_id'")
2176
+ if tag_name is None:
2177
+ raise ValueError("Missing required parameter 'tag_name'")
2178
+ if tag is None:
2179
+ raise ValueError("Missing required parameter 'tag'")
2180
+ request_body = {
2181
+ 'tag': tag,
2182
+ }
2183
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2184
+ url = f"{self.base_url}/space/{space_id}/tag/{tag_name}"
2185
+ query_params = {}
2186
+ response = self._put(url, data=request_body, params=query_params)
2187
+ response.raise_for_status()
2188
+ return response.json()
2189
+
2190
+ def tags_remove_space_tag(self, space_id, tag_name, tag) -> dict[str, Any]:
2191
+ """
2192
+ Removes a specified tag from a given space by tag name.
2193
+
2194
+ Args:
2195
+ space_id: The unique identifier of the space from which the tag will be removed.
2196
+ tag_name: The name of the tag group or category under which the tag exists.
2197
+ tag: The tag to be removed from the specified space.
2198
+
2199
+ Returns:
2200
+ A dictionary containing the response data from the API after removing the tag.
2201
+
2202
+ Raises:
2203
+ ValueError: Raised if 'space_id', 'tag_name', or 'tag' is None.
2204
+ requests.HTTPError: Raised if the HTTP request to remove the tag fails (non-2xx response).
2205
+
2206
+ Tags:
2207
+ tag-remove, space-management, api
2208
+ """
2209
+ if space_id is None:
2210
+ raise ValueError("Missing required parameter 'space_id'")
2211
+ if tag_name is None:
2212
+ raise ValueError("Missing required parameter 'tag_name'")
2213
+ if tag is None:
2214
+ raise ValueError("Missing required parameter 'tag'")
2215
+ request_body = {
2216
+ 'tag': tag,
2217
+ }
2218
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2219
+ url = f"{self.base_url}/space/{space_id}/tag/{tag_name}"
2220
+ query_params = {}
2221
+ response = self._delete(url, params=query_params)
2222
+ response.raise_for_status()
2223
+ return response.json()
2224
+
2225
+ def tags_add_to_task(self, task_id, tag_name, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2226
+ """
2227
+ Adds a tag to a specific task.
2228
+
2229
+ Args:
2230
+ task_id: The unique identifier of the task to which the tag will be added.
2231
+ tag_name: The name of the tag to add to the task.
2232
+ custom_task_ids: Optional flag to indicate if task_id is a custom identifier rather than a system-generated ID.
2233
+ team_id: Optional identifier for a specific team context.
2234
+
2235
+ Returns:
2236
+ A dictionary containing the response data from the API about the tag operation.
2237
+
2238
+ Raises:
2239
+ ValueError: Raised when required parameters 'task_id' or 'tag_name' are None.
2240
+ HTTPError: Raised when the API request fails.
2241
+
2242
+ Tags:
2243
+ add, tag, task, management
2244
+ """
2245
+ if task_id is None:
2246
+ raise ValueError("Missing required parameter 'task_id'")
2247
+ if tag_name is None:
2248
+ raise ValueError("Missing required parameter 'tag_name'")
2249
+ url = f"{self.base_url}/task/{task_id}/tag/{tag_name}"
2250
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2251
+ response = self._post(url, data={}, params=query_params)
2252
+ response.raise_for_status()
2253
+ return response.json()
2254
+
2255
+ def tags_remove_from_task(self, task_id, tag_name, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2256
+ """
2257
+ Removes a specific tag from a task by ID, with optional filtering by custom task IDs and team ID.
2258
+
2259
+ Args:
2260
+ task_id: The ID of the task from which the tag is to be removed.
2261
+ tag_name: The name of the tag to be removed.
2262
+ custom_task_ids: Optional; a list of custom task IDs to filter by.
2263
+ team_id: Optional; the ID of the team to which the task belongs.
2264
+
2265
+ Returns:
2266
+ A dictionary containing the response after removing the tag from the task.
2267
+
2268
+ Raises:
2269
+ ValueError: Raised when either 'task_id' or 'tag_name' is missing.
2270
+
2271
+ Tags:
2272
+ remove, task, management, tag
2273
+ """
2274
+ if task_id is None:
2275
+ raise ValueError("Missing required parameter 'task_id'")
2276
+ if tag_name is None:
2277
+ raise ValueError("Missing required parameter 'tag_name'")
2278
+ url = f"{self.base_url}/task/{task_id}/tag/{tag_name}"
2279
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2280
+ response = self._delete(url, params=query_params)
2281
+ response.raise_for_status()
2282
+ return response.json()
2283
+
2284
+ def tasks_get_list_tasks(self, list_id, archived=None, include_markdown_description=None, page=None, order_by=None, reverse=None, subtasks=None, statuses=None, include_closed=None, assignees=None, tags=None, due_date_gt=None, due_date_lt=None, date_created_gt=None, date_created_lt=None, date_updated_gt=None, date_updated_lt=None, date_done_gt=None, date_done_lt=None, custom_fields=None, custom_items=None) -> dict[str, Any]:
2285
+ """
2286
+ Retrieves a list of tasks from a specified list with optional filters such as archived status, pagination, sorting, subtask inclusion, status, assignees, tags, date ranges, and custom fields.
2287
+
2288
+ Args:
2289
+ list_id: str. The unique identifier of the list from which to retrieve tasks. Required.
2290
+ archived: Optional[bool]. If set, filter tasks by archived status.
2291
+ include_markdown_description: Optional[bool]. If True, include the markdown description in the response.
2292
+ page: Optional[int]. The page number for paginated results.
2293
+ order_by: Optional[str]. Field to order the results by.
2294
+ reverse: Optional[bool]. If True, reverse the ordering of the results.
2295
+ subtasks: Optional[bool]. If True, include subtasks in the response.
2296
+ statuses: Optional[list[str]]. Filter tasks by their statuses.
2297
+ include_closed: Optional[bool]. If True, include closed tasks in the results.
2298
+ assignees: Optional[list[str]]. Filter tasks by assignee(s).
2299
+ tags: Optional[list[str]]. Filter tasks by associated tags.
2300
+ due_date_gt: Optional[str]. Include tasks with a due date greater than this value (ISO 8601 format).
2301
+ due_date_lt: Optional[str]. Include tasks with a due date less than this value (ISO 8601 format).
2302
+ date_created_gt: Optional[str]. Include tasks created after this date (ISO 8601 format).
2303
+ date_created_lt: Optional[str]. Include tasks created before this date (ISO 8601 format).
2304
+ date_updated_gt: Optional[str]. Include tasks updated after this date (ISO 8601 format).
2305
+ date_updated_lt: Optional[str]. Include tasks updated before this date (ISO 8601 format).
2306
+ date_done_gt: Optional[str]. Include tasks completed after this date (ISO 8601 format).
2307
+ date_done_lt: Optional[str]. Include tasks completed before this date (ISO 8601 format).
2308
+ custom_fields: Optional[dict[str, Any]]. Filter tasks by specified custom fields.
2309
+ custom_items: Optional[list[str]]. Filter tasks by custom items.
2310
+
2311
+ Returns:
2312
+ dict[str, Any]: A dictionary containing the list of tasks matching the filters and additional metadata as provided by the API response.
2313
+
2314
+ Raises:
2315
+ ValueError: If 'list_id' is not provided.
2316
+ requests.HTTPError: If the HTTP request fails or the API responds with an error status code.
2317
+
2318
+ Tags:
2319
+ list, tasks, fetch, filter, api, management, important
2320
+ """
2321
+ if list_id is None:
2322
+ raise ValueError("Missing required parameter 'list_id'")
2323
+ url = f"{self.base_url}/list/{list_id}/task"
2324
+ query_params = {k: v for k, v in [('archived', archived), ('include_markdown_description', include_markdown_description), ('page', page), ('order_by', order_by), ('reverse', reverse), ('subtasks', subtasks), ('statuses', statuses), ('include_closed', include_closed), ('assignees', assignees), ('tags', tags), ('due_date_gt', due_date_gt), ('due_date_lt', due_date_lt), ('date_created_gt', date_created_gt), ('date_created_lt', date_created_lt), ('date_updated_gt', date_updated_gt), ('date_updated_lt', date_updated_lt), ('date_done_gt', date_done_gt), ('date_done_lt', date_done_lt), ('custom_fields', custom_fields), ('custom_items', custom_items)] if v is not None}
2325
+ response = self._get(url, params=query_params)
2326
+ response.raise_for_status()
2327
+ return response.json()
2328
+
2329
+ def tasks_create_new_task(self, list_id, name, custom_task_ids=None, team_id=None, tags=None, description=None, assignees=None, status=None, priority=None, due_date=None, due_date_time=None, time_estimate=None, start_date=None, start_date_time=None, notify_all=None, parent=None, links_to=None, check_required_custom_fields=None, custom_fields=None, custom_item_id=None) -> dict[str, Any]:
2330
+ """
2331
+ Creates a new task in the specified list with optional attributes including tags, assignees, status, priority, dates, and custom fields.
2332
+
2333
+ Args:
2334
+ list_id: str. The unique identifier of the list where the task will be created. Required.
2335
+ name: str. The name or title of the new task. Required.
2336
+ custom_task_ids: Optional[str]. Custom task identifiers for the request, if applicable.
2337
+ team_id: Optional[str]. Identifier of the team associated with the task.
2338
+ tags: Optional[list[str]]. List of tag identifiers to associate with the task.
2339
+ description: Optional[str]. Description text for the task.
2340
+ assignees: Optional[list[str]]. List of user identifiers to assign to the task.
2341
+ status: Optional[str]. Status of the task (e.g., 'to do', 'in progress').
2342
+ priority: Optional[int]. Priority level of the task.
2343
+ due_date: Optional[str]. Due date for the task, typically as an ISO date string.
2344
+ due_date_time: Optional[str]. Due date and time for the task, as an ISO datetime string.
2345
+ time_estimate: Optional[int]. Estimated time to complete the task, in minutes.
2346
+ start_date: Optional[str]. Start date for the task, as an ISO date string.
2347
+ start_date_time: Optional[str]. Start date and time for the task, as an ISO datetime string.
2348
+ notify_all: Optional[bool]. If True, notifies all assignees when the task is created.
2349
+ parent: Optional[str]. Identifier of the parent task, if this task is a subtask.
2350
+ links_to: Optional[list[str]]. List of task IDs that this task links to.
2351
+ check_required_custom_fields: Optional[bool]. If True, validates that all required custom fields are set.
2352
+ custom_fields: Optional[dict]. Dictionary of custom field values for the task.
2353
+ custom_item_id: Optional[str]. Identifier for a custom item type.
2354
+
2355
+ Returns:
2356
+ dict[str, Any]: The JSON response representing the created task.
2357
+
2358
+ Raises:
2359
+ ValueError: Raised if 'list_id' or 'name' is None.
2360
+ requests.HTTPError: Raised if the HTTP request to create the task fails.
2361
+
2362
+ Tags:
2363
+ create, task, management, api, important
2364
+ """
2365
+ if list_id is None:
2366
+ raise ValueError("Missing required parameter 'list_id'")
2367
+ if name is None:
2368
+ raise ValueError("Missing required parameter 'name'")
2369
+ request_body = {
2370
+ 'tags': tags,
2371
+ 'description': description,
2372
+ 'name': name,
2373
+ 'assignees': assignees,
2374
+ 'status': status,
2375
+ 'priority': priority,
2376
+ 'due_date': due_date,
2377
+ 'due_date_time': due_date_time,
2378
+ 'time_estimate': time_estimate,
2379
+ 'start_date': start_date,
2380
+ 'start_date_time': start_date_time,
2381
+ 'notify_all': notify_all,
2382
+ 'parent': parent,
2383
+ 'links_to': links_to,
2384
+ 'check_required_custom_fields': check_required_custom_fields,
2385
+ 'custom_fields': custom_fields,
2386
+ 'custom_item_id': custom_item_id,
2387
+ }
2388
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2389
+ url = f"{self.base_url}/list/{list_id}/task"
2390
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2391
+ response = self._post(url, data=request_body, params=query_params)
2392
+ response.raise_for_status()
2393
+ return response.json()
2394
+
2395
+ def tasks_get_task_details(self, task_id, custom_task_ids=None, team_id=None, include_subtasks=None, include_markdown_description=None) -> dict[str, Any]:
2396
+ """
2397
+ Retrieves detailed information about a specific task, with options to include subtasks, use custom task IDs, filter by team, and specify description formatting.
2398
+
2399
+ Args:
2400
+ task_id: The unique identifier of the task to retrieve. Required.
2401
+ custom_task_ids: Optional; a list or string of custom task IDs to use for lookup instead of standard IDs.
2402
+ team_id: Optional; the ID of the team to filter task lookup by team context.
2403
+ include_subtasks: Optional; if True, include details of subtasks in the response.
2404
+ include_markdown_description: Optional; if True, return the task description in Markdown format.
2405
+
2406
+ Returns:
2407
+ A dictionary containing the details of the requested task, including optional subtasks and formatted description if requested.
2408
+
2409
+ Raises:
2410
+ ValueError: Raised if 'task_id' is not provided.
2411
+ requests.HTTPError: Raised if the HTTP request for task details fails due to a client or server error.
2412
+
2413
+ Tags:
2414
+ get, task, details, status, management
2415
+ """
2416
+ if task_id is None:
2417
+ raise ValueError("Missing required parameter 'task_id'")
2418
+ url = f"{self.base_url}/task/{task_id}"
2419
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id), ('include_subtasks', include_subtasks), ('include_markdown_description', include_markdown_description)] if v is not None}
2420
+ response = self._get(url, params=query_params)
2421
+ response.raise_for_status()
2422
+ return response.json()
2423
+
2424
+ def tasks_update_task_fields(self, task_id, custom_task_ids=None, team_id=None, description=None, custom_item_id=None, name=None, status=None, priority=None, due_date=None, due_date_time=None, parent=None, time_estimate=None, start_date=None, start_date_time=None, assignees=None, archived=None) -> dict[str, Any]:
2425
+ """
2426
+ Updates specified fields of an existing task with provided values.
2427
+
2428
+ Args:
2429
+ task_id: str. The unique identifier of the task to update. Required.
2430
+ custom_task_ids: Optional[str]. Specifies whether custom task IDs are used. Defaults to None.
2431
+ team_id: Optional[str]. The ID of the team the task belongs to. Defaults to None.
2432
+ description: Optional[str]. The updated description for the task. Defaults to None.
2433
+ custom_item_id: Optional[str]. The custom item ID to associate with the task. Defaults to None.
2434
+ name: Optional[str]. The new name for the task. Defaults to None.
2435
+ status: Optional[str]. The new status of the task. Defaults to None.
2436
+ priority: Optional[int]. The priority level of the task. Defaults to None.
2437
+ due_date: Optional[str]. The due date for the task in 'YYYY-MM-DD' format. Defaults to None.
2438
+ due_date_time: Optional[str]. The due date and time in ISO 8601 format. Defaults to None.
2439
+ parent: Optional[str]. The parent task ID if this task is a subtask. Defaults to None.
2440
+ time_estimate: Optional[int]. The estimated time to complete the task in seconds. Defaults to None.
2441
+ start_date: Optional[str]. The start date for the task in 'YYYY-MM-DD' format. Defaults to None.
2442
+ start_date_time: Optional[str]. The start date and time in ISO 8601 format. Defaults to None.
2443
+ assignees: Optional[list[str]]. A list of user IDs to assign to the task. Defaults to None.
2444
+ archived: Optional[bool]. Whether the task should be archived. Defaults to None.
2445
+
2446
+ Returns:
2447
+ dict[str, Any]: A dictionary containing the updated task details as returned by the API.
2448
+
2449
+ Raises:
2450
+ ValueError: If the 'task_id' parameter is not provided or is None.
2451
+ requests.HTTPError: If the HTTP request to update the task fails.
2452
+
2453
+ Tags:
2454
+ update, task, management, api
2455
+ """
2456
+ if task_id is None:
2457
+ raise ValueError("Missing required parameter 'task_id'")
2458
+ request_body = {
2459
+ 'description': description,
2460
+ 'custom_item_id': custom_item_id,
2461
+ 'name': name,
2462
+ 'status': status,
2463
+ 'priority': priority,
2464
+ 'due_date': due_date,
2465
+ 'due_date_time': due_date_time,
2466
+ 'parent': parent,
2467
+ 'time_estimate': time_estimate,
2468
+ 'start_date': start_date,
2469
+ 'start_date_time': start_date_time,
2470
+ 'assignees': assignees,
2471
+ 'archived': archived,
2472
+ }
2473
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2474
+ url = f"{self.base_url}/task/{task_id}"
2475
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2476
+ response = self._put(url, data=request_body, params=query_params)
2477
+ response.raise_for_status()
2478
+ return response.json()
2479
+
2480
+ def tasks_remove_task_by_id(self, task_id, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2481
+ """
2482
+ Removes a specific task by its unique task ID, optionally filtering by custom task IDs and team ID.
2483
+
2484
+ Args:
2485
+ task_id: str. The unique identifier of the task to remove. Required.
2486
+ custom_task_ids: Optional[List[str]]. A list of custom task IDs to further specify which tasks to remove. Defaults to None.
2487
+ team_id: Optional[str]. The team identifier to specify the context for task removal. Defaults to None.
2488
+
2489
+ Returns:
2490
+ dict[str, Any]: A dictionary containing the JSON response from the API after task removal.
2491
+
2492
+ Raises:
2493
+ ValueError: If 'task_id' is not provided.
2494
+ requests.HTTPError: If the HTTP request to remove the task fails (non-success response status).
2495
+
2496
+ Tags:
2497
+ remove, task, management, api
2498
+ """
2499
+ if task_id is None:
2500
+ raise ValueError("Missing required parameter 'task_id'")
2501
+ url = f"{self.base_url}/task/{task_id}"
2502
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2503
+ response = self._delete(url, params=query_params)
2504
+ response.raise_for_status()
2505
+ return response.json()
2506
+
2507
+ def tasks_filter_team_tasks(self, team_Id, page=None, order_by=None, reverse=None, subtasks=None, space_ids=None, project_ids=None, list_ids=None, statuses=None, include_closed=None, assignees=None, tags=None, due_date_gt=None, due_date_lt=None, date_created_gt=None, date_created_lt=None, date_updated_gt=None, date_updated_lt=None, date_done_gt=None, date_done_lt=None, custom_fields=None, custom_task_ids=None, team_id=None, parent=None, include_markdown_description=None, custom_items=None) -> dict[str, Any]:
2508
+ """
2509
+ Retrieves a filtered list of tasks assigned to a specific team, supporting various filtering options such as assignees, statuses, lists, projects, tags, due dates, custom fields, and more.
2510
+
2511
+ Args:
2512
+ team_Id: str. The unique identifier of the team for which to filter tasks. Required.
2513
+ page: Optional[int]. The page number for paginated results.
2514
+ order_by: Optional[str]. Field used to order the result set.
2515
+ reverse: Optional[bool]. Whether to reverse the sort order.
2516
+ subtasks: Optional[bool]. Whether to include subtasks in the results.
2517
+ space_ids: Optional[list[str]]. List of space IDs to filter tasks by.
2518
+ project_ids: Optional[list[str]]. List of project IDs to filter tasks by.
2519
+ list_ids: Optional[list[str]]. List of list IDs to filter tasks by.
2520
+ statuses: Optional[list[str]]. List of task statuses to filter by.
2521
+ include_closed: Optional[bool]. Whether to include closed tasks.
2522
+ assignees: Optional[list[str]]. List of assignee user IDs to filter tasks by.
2523
+ tags: Optional[list[str]]. List of tag IDs to filter tasks by.
2524
+ due_date_gt: Optional[str]. ISO formatted string; filters tasks with due date greater than this value.
2525
+ due_date_lt: Optional[str]. ISO formatted string; filters tasks with due date less than this value.
2526
+ date_created_gt: Optional[str]. ISO formatted string; filters tasks created after this date.
2527
+ date_created_lt: Optional[str]. ISO formatted string; filters tasks created before this date.
2528
+ date_updated_gt: Optional[str]. ISO formatted string; filters tasks updated after this date.
2529
+ date_updated_lt: Optional[str]. ISO formatted string; filters tasks updated before this date.
2530
+ date_done_gt: Optional[str]. ISO formatted string; filters tasks completed after this date.
2531
+ date_done_lt: Optional[str]. ISO formatted string; filters tasks completed before this date.
2532
+ custom_fields: Optional[dict]. Dictionary of custom field filters.
2533
+ custom_task_ids: Optional[bool]. Whether to use custom task IDs in the results.
2534
+ team_id: Optional[str]. Deprecated. Use 'team_Id' instead.
2535
+ parent: Optional[str]. Filter tasks by a parent task ID.
2536
+ include_markdown_description: Optional[bool]. Whether to include the markdown-formatted description in tasks.
2537
+ custom_items: Optional[bool]. Whether to include custom items in the response.
2538
+
2539
+ Returns:
2540
+ dict[str, Any]: The parsed JSON response from the API containing filtered team tasks.
2541
+
2542
+ Raises:
2543
+ ValueError: If the required 'team_Id' parameter is not provided.
2544
+ HTTPError: If the HTTP request fails or the API returns an unsuccessful status code.
2545
+
2546
+ Tags:
2547
+ filter, tasks, list, team, management, api
2548
+ """
2549
+ if team_Id is None:
2550
+ raise ValueError("Missing required parameter 'team_Id'")
2551
+ url = f"{self.base_url}/team/{team_Id}/task"
2552
+ query_params = {k: v for k, v in [('page', page), ('order_by', order_by), ('reverse', reverse), ('subtasks', subtasks), ('space_ids', space_ids), ('project_ids', project_ids), ('list_ids', list_ids), ('statuses', statuses), ('include_closed', include_closed), ('assignees', assignees), ('tags', tags), ('due_date_gt', due_date_gt), ('due_date_lt', due_date_lt), ('date_created_gt', date_created_gt), ('date_created_lt', date_created_lt), ('date_updated_gt', date_updated_gt), ('date_updated_lt', date_updated_lt), ('date_done_gt', date_done_gt), ('date_done_lt', date_done_lt), ('custom_fields', custom_fields), ('custom_task_ids', custom_task_ids), ('team_id', team_id), ('parent', parent), ('include_markdown_description', include_markdown_description), ('custom_items', custom_items)] if v is not None}
2553
+ response = self._get(url, params=query_params)
2554
+ response.raise_for_status()
2555
+ return response.json()
2556
+
2557
+ def tasks_get_time_in_status(self, task_id, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2558
+ """
2559
+ Retrieves the amount of time a specified task has spent in each status, with optional filters for custom task IDs and team ID.
2560
+
2561
+ Args:
2562
+ task_id: str. The unique identifier of the task whose time in status is to be retrieved.
2563
+ custom_task_ids: Optional[str]. Custom identifiers for filtering tasks; if provided, limits results to these IDs.
2564
+ team_id: Optional[str]. The unique identifier of the team; if provided, filters results to this team.
2565
+
2566
+ Returns:
2567
+ dict[str, Any]: A dictionary containing the time spent by the specified task in each status.
2568
+
2569
+ Raises:
2570
+ ValueError: If 'task_id' is not provided.
2571
+ requests.HTTPError: If the HTTP request to the server fails or returns an unsuccessful status code.
2572
+
2573
+ Tags:
2574
+ get, task, status, management
2575
+ """
2576
+ if task_id is None:
2577
+ raise ValueError("Missing required parameter 'task_id'")
2578
+ url = f"{self.base_url}/task/{task_id}/time_in_status"
2579
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2580
+ response = self._get(url, params=query_params)
2581
+ response.raise_for_status()
2582
+ return response.json()
2583
+
2584
+ def tasks_get_time_in_status_bulk(self, task_ids, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2585
+ """
2586
+ Retrieves the time each specified task has spent in various statuses, in bulk, based on provided task identifiers.
2587
+
2588
+ Args:
2589
+ task_ids: list or str. A list of task IDs or a comma-separated string of task IDs to query. Required.
2590
+ custom_task_ids: list or str, optional. A list or comma-separated string of custom task identifiers to filter the tasks.
2591
+ team_id: str, optional. The team ID to scope the task status retrieval.
2592
+
2593
+ Returns:
2594
+ dict. A dictionary mapping each requested task ID to a breakdown of time spent in each status.
2595
+
2596
+ Raises:
2597
+ ValueError: Raised if 'task_ids' is None.
2598
+ HTTPError: Raised if the HTTP request to the API fails (e.g., non-2xx response code).
2599
+
2600
+ Tags:
2601
+ get, task-management, status, bulk
2602
+ """
2603
+ if task_ids is None:
2604
+ raise ValueError("Missing required parameter 'task_ids'")
2605
+ url = f"{self.base_url}/task/bulk_time_in_status/task_ids"
2606
+ query_params = {k: v for k, v in [('task_ids', task_ids), ('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2607
+ response = self._get(url, params=query_params)
2608
+ response.raise_for_status()
2609
+ return response.json()
2610
+
2611
+ def task_templates_get_templates(self, team_id, page) -> dict[str, Any]:
2612
+ """
2613
+ Retrieves a paginated list of task templates for a given team.
2614
+
2615
+ Args:
2616
+ team_id: str. The unique identifier of the team for which to fetch task templates.
2617
+ page: int. The page number of task templates to retrieve.
2618
+
2619
+ Returns:
2620
+ dict[str, Any]: A dictionary containing the paginated task template data for the specified team.
2621
+
2622
+ Raises:
2623
+ ValueError: Raised if 'team_id' or 'page' is None.
2624
+ requests.HTTPError: Raised if the HTTP request returns an unsuccessful status code.
2625
+
2626
+ Tags:
2627
+ get, list, task-templates, team
2628
+ """
2629
+ if team_id is None:
2630
+ raise ValueError("Missing required parameter 'team_id'")
2631
+ if page is None:
2632
+ raise ValueError("Missing required parameter 'page'")
2633
+ url = f"{self.base_url}/team/{team_id}/taskTemplate"
2634
+ query_params = {k: v for k, v in [('page', page)] if v is not None}
2635
+ response = self._get(url, params=query_params)
2636
+ response.raise_for_status()
2637
+ return response.json()
2638
+
2639
+ def task_templates_create_from_template(self, list_id, template_id, name) -> dict[str, Any]:
2640
+ """
2641
+ Creates a new task template instance in a specific list by cloning from an existing task template.
2642
+
2643
+ Args:
2644
+ list_id: The unique identifier of the list in which to create the new task template (str).
2645
+ template_id: The unique identifier of the task template to clone from (str).
2646
+ name: The name to assign to the newly created task template (str).
2647
+
2648
+ Returns:
2649
+ dict[str, Any]: A dictionary containing the details of the newly created task template as returned by the API.
2650
+
2651
+ Raises:
2652
+ ValueError: Raised if any of the required parameters ('list_id', 'template_id', or 'name') are None.
2653
+ requests.HTTPError: Raised if the HTTP request to create the task template fails.
2654
+
2655
+ Tags:
2656
+ create, task-template, list, api
2657
+ """
2658
+ if list_id is None:
2659
+ raise ValueError("Missing required parameter 'list_id'")
2660
+ if template_id is None:
2661
+ raise ValueError("Missing required parameter 'template_id'")
2662
+ if name is None:
2663
+ raise ValueError("Missing required parameter 'name'")
2664
+ request_body = {
2665
+ 'name': name,
2666
+ }
2667
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2668
+ url = f"{self.base_url}/list/{list_id}/taskTemplate/{template_id}"
2669
+ query_params = {}
2670
+ response = self._post(url, data=request_body, params=query_params)
2671
+ response.raise_for_status()
2672
+ return response.json()
2673
+
2674
+ def teams_workspaces_get_workspace_seats(self, team_id) -> dict[str, Any]:
2675
+ """
2676
+ Retrieves detailed seat allocation information for a specific workspace team.
2677
+
2678
+ Args:
2679
+ team_id: The unique identifier of the team whose workspace seats are to be fetched.
2680
+
2681
+ Returns:
2682
+ A dictionary containing seat allocation details for the specified team.
2683
+
2684
+ Raises:
2685
+ ValueError: If 'team_id' is None.
2686
+ requests.HTTPError: If the HTTP request to fetch seat information fails.
2687
+
2688
+ Tags:
2689
+ get, workspace, seats, team, api, management
2690
+ """
2691
+ if team_id is None:
2692
+ raise ValueError("Missing required parameter 'team_id'")
2693
+ url = f"{self.base_url}/team/{team_id}/seats"
2694
+ query_params = {}
2695
+ response = self._get(url, params=query_params)
2696
+ response.raise_for_status()
2697
+ return response.json()
2698
+
2699
+ def teams_workspaces_get_workspace_plan(self, team_id) -> dict[str, Any]:
2700
+ """
2701
+ Retrieves the plan details for a workspace associated with the specified team.
2702
+
2703
+ Args:
2704
+ team_id: The unique identifier of the team whose workspace plan is to be retrieved.
2705
+
2706
+ Returns:
2707
+ A dictionary containing the workspace plan details for the given team.
2708
+
2709
+ Raises:
2710
+ ValueError: Raised if the team_id parameter is None.
2711
+ requests.HTTPError: Raised if the HTTP request to retrieve the plan details fails.
2712
+
2713
+ Tags:
2714
+ get, workspace-plan, team-management
2715
+ """
2716
+ if team_id is None:
2717
+ raise ValueError("Missing required parameter 'team_id'")
2718
+ url = f"{self.base_url}/team/{team_id}/plan"
2719
+ query_params = {}
2720
+ response = self._get(url, params=query_params)
2721
+ response.raise_for_status()
2722
+ return response.json()
2723
+
2724
+ def teams_user_groups_create_team(self, team_id, name, members) -> dict[str, Any]:
2725
+ """
2726
+ Creates a new team user group with the specified name and members under the given team.
2727
+
2728
+ Args:
2729
+ team_id: str. The unique identifier of the team under which the group will be created.
2730
+ name: str. The name of the new user group.
2731
+ members: list. The list of members to be added to the group.
2732
+
2733
+ Returns:
2734
+ dict[str, Any]: The response data containing details of the newly created team user group.
2735
+
2736
+ Raises:
2737
+ ValueError: Raised if any of the required parameters ('team_id', 'name', or 'members') are missing.
2738
+ requests.HTTPError: Raised if the HTTP request to create the group fails.
2739
+
2740
+ Tags:
2741
+ create, team-user-group, management, api
2742
+ """
2743
+ if team_id is None:
2744
+ raise ValueError("Missing required parameter 'team_id'")
2745
+ if name is None:
2746
+ raise ValueError("Missing required parameter 'name'")
2747
+ if members is None:
2748
+ raise ValueError("Missing required parameter 'members'")
2749
+ request_body = {
2750
+ 'name': name,
2751
+ 'members': members,
2752
+ }
2753
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2754
+ url = f"{self.base_url}/team/{team_id}/group"
2755
+ query_params = {}
2756
+ response = self._post(url, data=request_body, params=query_params)
2757
+ response.raise_for_status()
2758
+ return response.json()
2759
+
2760
+ def custom_task_types_get_available_task_types(self, team_id) -> dict[str, Any]:
2761
+ """
2762
+ Retrieves the available custom task types for a specified team.
2763
+
2764
+ Args:
2765
+ team_id: The unique identifier of the team for which to fetch available custom task types.
2766
+
2767
+ Returns:
2768
+ A dictionary containing the available custom task types for the specified team.
2769
+
2770
+ Raises:
2771
+ ValueError: If 'team_id' is None.
2772
+ requests.HTTPError: If the HTTP request to the server fails or returns a non-successful status code.
2773
+
2774
+ Tags:
2775
+ get, custom-task-types, list, api, management
2776
+ """
2777
+ if team_id is None:
2778
+ raise ValueError("Missing required parameter 'team_id'")
2779
+ url = f"{self.base_url}/team/{team_id}/custom_item"
2780
+ query_params = {}
2781
+ response = self._get(url, params=query_params)
2782
+ response.raise_for_status()
2783
+ return response.json()
2784
+
2785
+ def teams_user_groups_update_user_group(self, group_id, name=None, handle=None, members=None) -> dict[str, Any]:
2786
+ """
2787
+ Updates the attributes of a user group in the Teams system.
2788
+
2789
+ Args:
2790
+ group_id: The unique identifier of the user group to update.
2791
+ name: Optional; The new name for the user group.
2792
+ handle: Optional; The new handle (identifier) for the user group.
2793
+ members: Optional; A list of user identifiers to set as members of the group.
2794
+
2795
+ Returns:
2796
+ A dictionary containing the updated user group details as returned by the API.
2797
+
2798
+ Raises:
2799
+ ValueError: If 'group_id' is None.
2800
+ requests.HTTPError: If the HTTP request to update the group fails.
2801
+
2802
+ Tags:
2803
+ update, group-management, teams, user-groups, api
2804
+ """
2805
+ if group_id is None:
2806
+ raise ValueError("Missing required parameter 'group_id'")
2807
+ request_body = {
2808
+ 'name': name,
2809
+ 'handle': handle,
2810
+ 'members': members,
2811
+ }
2812
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2813
+ url = f"{self.base_url}/group/{group_id}"
2814
+ query_params = {}
2815
+ response = self._put(url, data=request_body, params=query_params)
2816
+ response.raise_for_status()
2817
+ return response.json()
2818
+
2819
+ def teams_user_groups_remove_group(self, group_id) -> dict[str, Any]:
2820
+ """
2821
+ Removes a user group from the Teams service by group ID.
2822
+
2823
+ Args:
2824
+ group_id: str. The unique identifier of the group to be removed.
2825
+
2826
+ Returns:
2827
+ dict[str, Any]: The JSON response from the server after the group deletion.
2828
+
2829
+ Raises:
2830
+ ValueError: If the 'group_id' parameter is None.
2831
+ requests.HTTPError: If the HTTP request to delete the group fails with an error status code.
2832
+
2833
+ Tags:
2834
+ remove, group-management, teams, http-delete
2835
+ """
2836
+ if group_id is None:
2837
+ raise ValueError("Missing required parameter 'group_id'")
2838
+ url = f"{self.base_url}/group/{group_id}"
2839
+ query_params = {}
2840
+ response = self._delete(url, params=query_params)
2841
+ response.raise_for_status()
2842
+ return response.json()
2843
+
2844
+ def teams_user_groups_get_user_groups(self, team_id=None, group_ids=None) -> dict[str, Any]:
2845
+ """
2846
+ Retrieves user group information for a specified team and/or group IDs from the remote service.
2847
+
2848
+ Args:
2849
+ team_id: Optional; the identifier of the team to filter user groups (str or None).
2850
+ group_ids: Optional; a list of group IDs to filter the results (iterable or None).
2851
+
2852
+ Returns:
2853
+ A dictionary containing the JSON response with user group details from the remote service.
2854
+
2855
+ Raises:
2856
+ requests.HTTPError: If the HTTP request fails or the response status indicates an error.
2857
+
2858
+ Tags:
2859
+ get, user-groups, team-management, api
2860
+ """
2861
+ url = f"{self.base_url}/group"
2862
+ query_params = {k: v for k, v in [('team_id', team_id), ('group_ids', group_ids)] if v is not None}
2863
+ response = self._get(url, params=query_params)
2864
+ response.raise_for_status()
2865
+ return response.json()
2866
+
2867
+ def time_tracking_legacy_get_tracked_time(self, task_id, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2868
+ """
2869
+ Retrieves time tracking data for a specific task.
2870
+
2871
+ Args:
2872
+ task_id: The unique identifier of the task for which time tracking data is requested. Required.
2873
+ custom_task_ids: Optional flag to include custom task identifiers in the response.
2874
+ team_id: Optional team identifier to filter the time tracking data by team.
2875
+
2876
+ Returns:
2877
+ A dictionary containing time tracking information for the specified task.
2878
+
2879
+ Raises:
2880
+ ValueError: Raised when the required 'task_id' parameter is None.
2881
+ HTTPError: Raised when the API request fails (via raise_for_status()).
2882
+
2883
+ Tags:
2884
+ get, retrieve, time-tracking, task, legacy
2885
+ """
2886
+ if task_id is None:
2887
+ raise ValueError("Missing required parameter 'task_id'")
2888
+ url = f"{self.base_url}/task/{task_id}/time"
2889
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2890
+ response = self._get(url, params=query_params)
2891
+ response.raise_for_status()
2892
+ return response.json()
2893
+
2894
+ def time_tracking_legacy_record_time_for_task(self, task_id, start, end, time, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2895
+ """
2896
+ Records time for a task in the legacy system.
2897
+
2898
+ Args:
2899
+ task_id: The ID of the task to record time for.
2900
+ start: The start time of the time entry.
2901
+ end: The end time of the time entry.
2902
+ time: The duration of the time entry.
2903
+ custom_task_ids: Optional list of custom task IDs.
2904
+ team_id: Optional team ID.
2905
+
2906
+ Returns:
2907
+ A dictionary containing the response from the server.
2908
+
2909
+ Raises:
2910
+ ValueError: Raised if any of the required parameters (task_id, start, end, time) are missing.
2911
+
2912
+ Tags:
2913
+ record, time-tracking, legacy
2914
+ """
2915
+ if task_id is None:
2916
+ raise ValueError("Missing required parameter 'task_id'")
2917
+ if start is None:
2918
+ raise ValueError("Missing required parameter 'start'")
2919
+ if end is None:
2920
+ raise ValueError("Missing required parameter 'end'")
2921
+ if time is None:
2922
+ raise ValueError("Missing required parameter 'time'")
2923
+ request_body = {
2924
+ 'start': start,
2925
+ 'end': end,
2926
+ 'time': time,
2927
+ }
2928
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2929
+ url = f"{self.base_url}/task/{task_id}/time"
2930
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2931
+ response = self._post(url, data=request_body, params=query_params)
2932
+ response.raise_for_status()
2933
+ return response.json()
2934
+
2935
+ def time_tracking_legacy_edit_time_tracked(self, task_id, interval_id, start, end, time, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2936
+ """
2937
+ Edits a tracked time interval for a specific task using legacy time tracking, updating start, end, and time values.
2938
+
2939
+ Args:
2940
+ task_id: str. Unique identifier of the task whose time interval is being edited.
2941
+ interval_id: str. Identifier of the specific time interval to edit.
2942
+ start: str. The new start time for the time interval (in ISO 8601 format or equivalent).
2943
+ end: str. The new end time for the time interval (in ISO 8601 format or equivalent).
2944
+ time: int. The updated duration for the time interval, typically in seconds.
2945
+ custom_task_ids: Optional[str]. Custom task identifier(s), if applicable. Defaults to None.
2946
+ team_id: Optional[str]. Team identifier, if relevant to the time tracking operation. Defaults to None.
2947
+
2948
+ Returns:
2949
+ dict[str, Any]: The response from the server as a dictionary containing the updated interval information.
2950
+
2951
+ Raises:
2952
+ ValueError: If any of the required parameters (task_id, interval_id, start, end, time) are missing.
2953
+ requests.HTTPError: If the HTTP request fails or the server responds with an error status code.
2954
+
2955
+ Tags:
2956
+ edit, time-tracking, task-management, api, update
2957
+ """
2958
+ if task_id is None:
2959
+ raise ValueError("Missing required parameter 'task_id'")
2960
+ if interval_id is None:
2961
+ raise ValueError("Missing required parameter 'interval_id'")
2962
+ if start is None:
2963
+ raise ValueError("Missing required parameter 'start'")
2964
+ if end is None:
2965
+ raise ValueError("Missing required parameter 'end'")
2966
+ if time is None:
2967
+ raise ValueError("Missing required parameter 'time'")
2968
+ request_body = {
2969
+ 'start': start,
2970
+ 'end': end,
2971
+ 'time': time,
2972
+ }
2973
+ request_body = {k: v for k, v in request_body.items() if v is not None}
2974
+ url = f"{self.base_url}/task/{task_id}/time/{interval_id}"
2975
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
2976
+ response = self._put(url, data=request_body, params=query_params)
2977
+ response.raise_for_status()
2978
+ return response.json()
2979
+
2980
+ def time_tracking_legacy_remove_tracked_time(self, task_id, interval_id, custom_task_ids=None, team_id=None) -> dict[str, Any]:
2981
+ """
2982
+ Removes tracked time from a time-tracking interval associated with a specific task.
2983
+
2984
+ Args:
2985
+ task_id: The ID of the task from which tracked time will be removed.
2986
+ interval_id: The ID of the time interval to remove tracked time from.
2987
+ custom_task_ids: Optional list of custom task IDs for filtering.
2988
+ team_id: Optional team ID for filtering.
2989
+
2990
+ Returns:
2991
+ A dictionary containing the result of removing tracked time.
2992
+
2993
+ Raises:
2994
+ ValueError: Raised if either 'task_id' or 'interval_id' is missing.
2995
+
2996
+ Tags:
2997
+ remove, time-tracking, task-management, async_job
2998
+ """
2999
+ if task_id is None:
3000
+ raise ValueError("Missing required parameter 'task_id'")
3001
+ if interval_id is None:
3002
+ raise ValueError("Missing required parameter 'interval_id'")
3003
+ url = f"{self.base_url}/task/{task_id}/time/{interval_id}"
3004
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
3005
+ response = self._delete(url, params=query_params)
3006
+ response.raise_for_status()
3007
+ return response.json()
3008
+
3009
+ def time_tracking_get_time_entries_within_date_range(self, team_Id, start_date=None, end_date=None, assignee=None, include_task_tags=None, include_location_names=None, space_id=None, folder_id=None, list_id=None, task_id=None, custom_task_ids=None, team_id=None) -> dict[str, Any]:
3010
+ """
3011
+ Retrieves time entries for a specified team within an optional date range and optional filters such as assignee, tags, locations, spaces, folders, lists, or tasks.
3012
+
3013
+ Args:
3014
+ team_Id: str. The unique identifier of the team whose time entries are to be retrieved. Required.
3015
+ start_date: str or None. The start date for filtering time entries (ISO 8601 format). Optional.
3016
+ end_date: str or None. The end date for filtering time entries (ISO 8601 format). Optional.
3017
+ assignee: str or None. Filter time entries by the assignee's user ID. Optional.
3018
+ include_task_tags: str or None. Include associated task tags in the results if set. Optional.
3019
+ include_location_names: str or None. Include location names in the results if set. Optional.
3020
+ space_id: str or None. Filter time entries by a specific space ID. Optional.
3021
+ folder_id: str or None. Filter time entries by a specific folder ID. Optional.
3022
+ list_id: str or None. Filter time entries by a specific list ID. Optional.
3023
+ task_id: str or None. Filter time entries by a specific task ID. Optional.
3024
+ custom_task_ids: str or None. Filter time entries using custom task IDs. Optional.
3025
+ team_id: str or None. Filter time entries by an alternative team ID (if distinct from team_Id). Optional.
3026
+
3027
+ Returns:
3028
+ dict[str, Any]: A dictionary containing the queried time entry data for the specified team and filters.
3029
+
3030
+ Raises:
3031
+ ValueError: Raised if the required parameter 'team_Id' is not provided.
3032
+ requests.HTTPError: Raised if the HTTP request to the API fails (e.g., due to network issues or API errors).
3033
+
3034
+ Tags:
3035
+ get, list, time-tracking, management, filter, api
3036
+ """
3037
+ if team_Id is None:
3038
+ raise ValueError("Missing required parameter 'team_Id'")
3039
+ url = f"{self.base_url}/team/{team_Id}/time_entries"
3040
+ query_params = {k: v for k, v in [('start_date', start_date), ('end_date', end_date), ('assignee', assignee), ('include_task_tags', include_task_tags), ('include_location_names', include_location_names), ('space_id', space_id), ('folder_id', folder_id), ('list_id', list_id), ('task_id', task_id), ('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
3041
+ response = self._get(url, params=query_params)
3042
+ response.raise_for_status()
3043
+ return response.json()
3044
+
3045
+ def time_tracking_create_time_entry(self, team_Id, start, duration, custom_task_ids=None, team_id=None, tags=None, description=None, stop=None, end=None, billable=None, assignee=None, tid=None) -> dict[str, Any]:
3046
+ """
3047
+ Creates a time tracking entry for a specified team.
3048
+
3049
+ Args:
3050
+ team_Id: Required. The unique identifier of the team for which the time entry is being created.
3051
+ start: Required. The start time of the time entry.
3052
+ duration: Required. The duration of the time entry.
3053
+ custom_task_ids: Optional. Custom task identifiers associated with the time entry.
3054
+ team_id: Optional. An alternative team identifier parameter (note: redundant with team_Id).
3055
+ tags: Optional. List of tags associated with the time entry.
3056
+ description: Optional. Description of the time entry.
3057
+ stop: Optional. The stop time of the time entry.
3058
+ end: Optional. The end time of the time entry.
3059
+ billable: Optional. Boolean indicating if the time entry is billable.
3060
+ assignee: Optional. The user to whom the time entry is assigned.
3061
+ tid: Optional. Task identifier associated with the time entry.
3062
+
3063
+ Returns:
3064
+ Dictionary containing the created time entry data from the API response.
3065
+
3066
+ Raises:
3067
+ ValueError: Raised when required parameters (team_Id, start, or duration) are missing.
3068
+ HTTPError: Raised when the API request fails.
3069
+
3070
+ Tags:
3071
+ create, time-entry, tracking, api-interaction, team
3072
+ """
3073
+ if team_Id is None:
3074
+ raise ValueError("Missing required parameter 'team_Id'")
3075
+ if start is None:
3076
+ raise ValueError("Missing required parameter 'start'")
3077
+ if duration is None:
3078
+ raise ValueError("Missing required parameter 'duration'")
3079
+ request_body = {
3080
+ 'tags': tags,
3081
+ 'description': description,
3082
+ 'start': start,
3083
+ 'stop': stop,
3084
+ 'end': end,
3085
+ 'billable': billable,
3086
+ 'duration': duration,
3087
+ 'assignee': assignee,
3088
+ 'tid': tid,
3089
+ }
3090
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3091
+ url = f"{self.base_url}/team/{team_Id}/time_entries"
3092
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
3093
+ response = self._post(url, data=request_body, params=query_params)
3094
+ response.raise_for_status()
3095
+ return response.json()
3096
+
3097
+ def time_tracking_get_single_time_entry(self, team_id, timer_id, include_task_=None, include_location_names=None) -> dict[str, Any]:
3098
+ """
3099
+ Retrieves a single time entry by team and timer ID.
3100
+
3101
+ Args:
3102
+ team_id: The ID of the team for which to retrieve the time entry.
3103
+ timer_id: The ID of the timer for which to retrieve the time entry.
3104
+ include_task_: Optional flag to include task details in the response.
3105
+ include_location_names: Optional flag to include location names in the response.
3106
+
3107
+ Returns:
3108
+ A dictionary containing the time entry details.
3109
+
3110
+ Raises:
3111
+ ValueError: Raised if 'team_id' or 'timer_id' is None.
3112
+
3113
+ Tags:
3114
+ time-tracking, get, async-job, management
3115
+ """
3116
+ if team_id is None:
3117
+ raise ValueError("Missing required parameter 'team_id'")
3118
+ if timer_id is None:
3119
+ raise ValueError("Missing required parameter 'timer_id'")
3120
+ url = f"{self.base_url}/team/{team_id}/time_entries/{timer_id}"
3121
+ query_params = {k: v for k, v in [('include_task_', include_task_), ('include_location_names', include_location_names)] if v is not None}
3122
+ response = self._get(url, params=query_params)
3123
+ response.raise_for_status()
3124
+ return response.json()
3125
+
3126
+ def time_tracking_remove_entry(self, team_id, timer_id) -> dict[str, Any]:
3127
+ """
3128
+ Removes a specific time tracking entry for a team by deleting the corresponding timer record.
3129
+
3130
+ Args:
3131
+ team_id: The unique identifier of the team from which the time entry will be removed.
3132
+ timer_id: The unique identifier of the time entry (timer) to be deleted.
3133
+
3134
+ Returns:
3135
+ A dictionary containing the JSON response from the API after successful removal of the time entry.
3136
+
3137
+ Raises:
3138
+ ValueError: Raised if either 'team_id' or 'timer_id' is None.
3139
+ requests.HTTPError: Raised if the API request to delete the time entry fails.
3140
+
3141
+ Tags:
3142
+ remove, time-tracking, management, api
3143
+ """
3144
+ if team_id is None:
3145
+ raise ValueError("Missing required parameter 'team_id'")
3146
+ if timer_id is None:
3147
+ raise ValueError("Missing required parameter 'timer_id'")
3148
+ url = f"{self.base_url}/team/{team_id}/time_entries/{timer_id}"
3149
+ query_params = {}
3150
+ response = self._delete(url, params=query_params)
3151
+ response.raise_for_status()
3152
+ return response.json()
3153
+
3154
+ def time_tracking_update_time_entry_details(self, team_id, timer_id, tags, custom_task_ids=None, description=None, tag_action=None, start=None, end=None, tid=None, billable=None, duration=None) -> dict[str, Any]:
3155
+ """
3156
+ Updates time entry details by sending a PUT request to the server.
3157
+
3158
+ Args:
3159
+ team_id: ID of the team for which the time entry is being updated
3160
+ timer_id: ID of the time entry to update
3161
+ tags: Tags to apply to the time entry
3162
+ custom_task_ids: Optional custom task IDs associated with the time entry
3163
+ description: Optional description of the time entry
3164
+ tag_action: Optional action to perform on the tags
3165
+ start: Optional start time of the time entry
3166
+ end: Optional end time of the time entry
3167
+ tid: Optional TID associated with the time entry
3168
+ billable: Optional billability status of the time entry
3169
+ duration: Optional duration of the time entry
3170
+
3171
+ Returns:
3172
+ Dictionary containing the updated time entry details
3173
+
3174
+ Raises:
3175
+ ValueError: Raised when required parameters (team_id, timer_id, tags) are missing
3176
+
3177
+ Tags:
3178
+ update, time-entry, management
3179
+ """
3180
+ if team_id is None:
3181
+ raise ValueError("Missing required parameter 'team_id'")
3182
+ if timer_id is None:
3183
+ raise ValueError("Missing required parameter 'timer_id'")
3184
+ if tags is None:
3185
+ raise ValueError("Missing required parameter 'tags'")
3186
+ request_body = {
3187
+ 'tags': tags,
3188
+ 'description': description,
3189
+ 'tag_action': tag_action,
3190
+ 'start': start,
3191
+ 'end': end,
3192
+ 'tid': tid,
3193
+ 'billable': billable,
3194
+ 'duration': duration,
3195
+ }
3196
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3197
+ url = f"{self.base_url}/team/{team_id}/time_entries/{timer_id}"
3198
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
3199
+ response = self._put(url, data=request_body, params=query_params)
3200
+ response.raise_for_status()
3201
+ return response.json()
3202
+
3203
+ def time_tracking_get_time_entry_history(self, team_id, timer_id) -> dict[str, Any]:
3204
+ """
3205
+ Retrieves the history of a specific time entry for a given team from the time tracking service.
3206
+
3207
+ Args:
3208
+ team_id: The unique identifier of the team whose time entry history is to be retrieved.
3209
+ timer_id: The unique identifier of the time entry (timer) for which the history is requested.
3210
+
3211
+ Returns:
3212
+ A dictionary containing the historical records of the specified time entry.
3213
+
3214
+ Raises:
3215
+ ValueError: Raised if 'team_id' or 'timer_id' is None.
3216
+ requests.HTTPError: Raised if the HTTP request to the time tracking service fails with an error status.
3217
+
3218
+ Tags:
3219
+ get, time-tracking, history, api
3220
+ """
3221
+ if team_id is None:
3222
+ raise ValueError("Missing required parameter 'team_id'")
3223
+ if timer_id is None:
3224
+ raise ValueError("Missing required parameter 'timer_id'")
3225
+ url = f"{self.base_url}/team/{team_id}/time_entries/{timer_id}/history"
3226
+ query_params = {}
3227
+ response = self._get(url, params=query_params)
3228
+ response.raise_for_status()
3229
+ return response.json()
3230
+
3231
+ def time_tracking_get_current_time_entry(self, team_id, assignee=None) -> dict[str, Any]:
3232
+ """
3233
+ Retrieves the current time entry for a specified team, optionally filtered by assignee.
3234
+
3235
+ Args:
3236
+ team_id: The unique identifier of the team to fetch the current time entry for.
3237
+ assignee: Optional; the identifier of the assignee to filter the current time entry.
3238
+
3239
+ Returns:
3240
+ A dictionary containing the current time entry details for the specified team and, if provided, assignee.
3241
+
3242
+ Raises:
3243
+ ValueError: If 'team_id' is None.
3244
+ requests.HTTPError: If the HTTP request to the API fails with an unsuccessful status code.
3245
+
3246
+ Tags:
3247
+ get, time-tracking, current-status, api, management
3248
+ """
3249
+ if team_id is None:
3250
+ raise ValueError("Missing required parameter 'team_id'")
3251
+ url = f"{self.base_url}/team/{team_id}/time_entries/current"
3252
+ query_params = {k: v for k, v in [('assignee', assignee)] if v is not None}
3253
+ response = self._get(url, params=query_params)
3254
+ response.raise_for_status()
3255
+ return response.json()
3256
+
3257
+ def time_tracking_remove_tags_from_time_entries(self, team_id, tags, time_entry_ids) -> dict[str, Any]:
3258
+ """
3259
+ Removes specified tags from multiple time entries for a given team.
3260
+
3261
+ Args:
3262
+ team_id: str. Unique identifier of the team whose time entries will be updated.
3263
+ tags: list[str]. List of tag names to remove from the specified time entries.
3264
+ time_entry_ids: list[str]. List of time entry IDs from which the tags will be removed.
3265
+
3266
+ Returns:
3267
+ dict[str, Any]: The API response as a dictionary containing the result of the tag removal operation.
3268
+
3269
+ Raises:
3270
+ ValueError: Raised if 'team_id', 'tags', or 'time_entry_ids' are None.
3271
+ requests.HTTPError: Raised if the API request fails or returns an unsuccessful HTTP status.
3272
+
3273
+ Tags:
3274
+ remove, tags, time-entries, management, batch
3275
+ """
3276
+ if team_id is None:
3277
+ raise ValueError("Missing required parameter 'team_id'")
3278
+ if tags is None:
3279
+ raise ValueError("Missing required parameter 'tags'")
3280
+ if time_entry_ids is None:
3281
+ raise ValueError("Missing required parameter 'time_entry_ids'")
3282
+ request_body = {
3283
+ 'tags': tags,
3284
+ 'time_entry_ids': time_entry_ids,
3285
+ }
3286
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3287
+ url = f"{self.base_url}/team/{team_id}/time_entries/tags"
3288
+ query_params = {}
3289
+ response = self._delete(url, params=query_params)
3290
+ response.raise_for_status()
3291
+ return response.json()
3292
+
3293
+ def time_tracking_get_all_tags_from_time_entries(self, team_id) -> dict[str, Any]:
3294
+ """
3295
+ Retrieves all tags associated with time entries for a specified team.
3296
+
3297
+ Args:
3298
+ team_id: str. The unique identifier of the team whose time entry tags are to be retrieved.
3299
+
3300
+ Returns:
3301
+ dict[str, Any]: A dictionary containing the tags extracted from the team's time entries.
3302
+
3303
+ Raises:
3304
+ ValueError: If 'team_id' is None.
3305
+ requests.HTTPError: If the HTTP request to the server fails or returns an unsuccessful status code.
3306
+
3307
+ Tags:
3308
+ get, list, tags, time-tracking, management
3309
+ """
3310
+ if team_id is None:
3311
+ raise ValueError("Missing required parameter 'team_id'")
3312
+ url = f"{self.base_url}/team/{team_id}/time_entries/tags"
3313
+ query_params = {}
3314
+ response = self._get(url, params=query_params)
3315
+ response.raise_for_status()
3316
+ return response.json()
3317
+
3318
+ def time_tracking_add_tags_from_time_entries(self, team_id, tags, time_entry_ids) -> dict[str, Any]:
3319
+ """
3320
+ Adds tags to specified time entries for a team.
3321
+
3322
+ Args:
3323
+ team_id: The unique identifier of the team.
3324
+ tags: List of tags to be added to the time entries.
3325
+ time_entry_ids: List of time entry identifiers to which tags will be added.
3326
+
3327
+ Returns:
3328
+ Dictionary containing the API response after adding tags to time entries.
3329
+
3330
+ Raises:
3331
+ ValueError: Raised when any of the required parameters (team_id, tags, or time_entry_ids) is None.
3332
+ HTTPError: Raised when the API request fails.
3333
+
3334
+ Tags:
3335
+ add, tags, time-entries, management
3336
+ """
3337
+ if team_id is None:
3338
+ raise ValueError("Missing required parameter 'team_id'")
3339
+ if tags is None:
3340
+ raise ValueError("Missing required parameter 'tags'")
3341
+ if time_entry_ids is None:
3342
+ raise ValueError("Missing required parameter 'time_entry_ids'")
3343
+ request_body = {
3344
+ 'tags': tags,
3345
+ 'time_entry_ids': time_entry_ids,
3346
+ }
3347
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3348
+ url = f"{self.base_url}/team/{team_id}/time_entries/tags"
3349
+ query_params = {}
3350
+ response = self._post(url, data=request_body, params=query_params)
3351
+ response.raise_for_status()
3352
+ return response.json()
3353
+
3354
+ def time_tracking_change_tag_names(self, team_id, name, new_name, tag_bg, tag_fg) -> dict[str, Any]:
3355
+ """
3356
+ Updates the name and visual properties of a time tracking tag for a specified team.
3357
+
3358
+ Args:
3359
+ team_id: str. The unique identifier of the team whose tag is to be updated.
3360
+ name: str. The current name of the tag to be changed.
3361
+ new_name: str. The new name to assign to the tag.
3362
+ tag_bg: str. The new background color for the tag, typically in hexadecimal format.
3363
+ tag_fg: str. The new foreground (text) color for the tag, typically in hexadecimal format.
3364
+
3365
+ Returns:
3366
+ dict. The server response containing the updated tag details.
3367
+
3368
+ Raises:
3369
+ ValueError: If any required parameter ('team_id', 'name', 'new_name', 'tag_bg', or 'tag_fg') is None.
3370
+ requests.HTTPError: If the HTTP request to update the tag fails.
3371
+
3372
+ Tags:
3373
+ update, tag-management, time-tracking, team, api
3374
+ """
3375
+ if team_id is None:
3376
+ raise ValueError("Missing required parameter 'team_id'")
3377
+ if name is None:
3378
+ raise ValueError("Missing required parameter 'name'")
3379
+ if new_name is None:
3380
+ raise ValueError("Missing required parameter 'new_name'")
3381
+ if tag_bg is None:
3382
+ raise ValueError("Missing required parameter 'tag_bg'")
3383
+ if tag_fg is None:
3384
+ raise ValueError("Missing required parameter 'tag_fg'")
3385
+ request_body = {
3386
+ 'name': name,
3387
+ 'new_name': new_name,
3388
+ 'tag_bg': tag_bg,
3389
+ 'tag_fg': tag_fg,
3390
+ }
3391
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3392
+ url = f"{self.base_url}/team/{team_id}/time_entries/tags"
3393
+ query_params = {}
3394
+ response = self._put(url, data=request_body, params=query_params)
3395
+ response.raise_for_status()
3396
+ return response.json()
3397
+
3398
+ def time_tracking_start_timer(self, team_Id, custom_task_ids=None, team_id=None, tags=None, description=None, tid=None, billable=None) -> dict[str, Any]:
3399
+ """
3400
+ Starts a new time tracking timer for a specified team and task with optional metadata such as tags, description, and billable status.
3401
+
3402
+ Args:
3403
+ team_Id: str. The unique identifier of the team for which to start the timer. This parameter is required.
3404
+ custom_task_ids: Optional[list[str]]. A list of custom task IDs to associate with the timer entry.
3405
+ team_id: Optional[str]. An additional team identifier used as a query parameter, if different from 'team_Id'.
3406
+ tags: Optional[list[str]]. A list of tags to attach to the time entry for categorization or filtering.
3407
+ description: Optional[str]. A text description for the time entry providing further details.
3408
+ tid: Optional[str]. The task identifier to be tracked.
3409
+ billable: Optional[bool]. Indicates whether the time entry should be marked as billable.
3410
+
3411
+ Returns:
3412
+ dict[str, Any]: A dictionary containing the response data of the newly started time entry from the API.
3413
+
3414
+ Raises:
3415
+ ValueError: Raised if the required parameter 'team_Id' is not provided.
3416
+ requests.HTTPError: Raised if the API request fails or returns a non-success status code.
3417
+
3418
+ Tags:
3419
+ start, timer, time-tracking, async-job, team-management
3420
+ """
3421
+ if team_Id is None:
3422
+ raise ValueError("Missing required parameter 'team_Id'")
3423
+ request_body = {
3424
+ 'tags': tags,
3425
+ 'description': description,
3426
+ 'tid': tid,
3427
+ 'billable': billable,
3428
+ }
3429
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3430
+ url = f"{self.base_url}/team/{team_Id}/time_entries/start"
3431
+ query_params = {k: v for k, v in [('custom_task_ids', custom_task_ids), ('team_id', team_id)] if v is not None}
3432
+ response = self._post(url, data=request_body, params=query_params)
3433
+ response.raise_for_status()
3434
+ return response.json()
3435
+
3436
+ def time_tracking_stop_time_entry(self, team_id) -> dict[str, Any]:
3437
+ """
3438
+ Stops the currently active time entry for the specified team.
3439
+
3440
+ Args:
3441
+ team_id: The unique identifier of the team whose active time entry should be stopped.
3442
+
3443
+ Returns:
3444
+ A dictionary containing the response data from the stop time entry request.
3445
+
3446
+ Raises:
3447
+ ValueError: Raised if 'team_id' is None.
3448
+ requests.HTTPError: Raised if the HTTP request to stop the time entry fails.
3449
+
3450
+ Tags:
3451
+ time-tracking, stop, management
3452
+ """
3453
+ if team_id is None:
3454
+ raise ValueError("Missing required parameter 'team_id'")
3455
+ url = f"{self.base_url}/team/{team_id}/time_entries/stop"
3456
+ query_params = {}
3457
+ response = self._post(url, data={}, params=query_params)
3458
+ response.raise_for_status()
3459
+ return response.json()
3460
+
3461
+ def users_invite_user_to_workspace(self, team_id, email, admin, custom_role_id=None) -> dict[str, Any]:
3462
+ """
3463
+ Invites a user to a workspace by sending an invitation to their email address.
3464
+
3465
+ Args:
3466
+ team_id: The unique identifier of the workspace/team to invite the user to.
3467
+ email: The email address of the user being invited to the workspace.
3468
+ admin: Boolean flag indicating whether the user should have admin privileges.
3469
+ custom_role_id: Optional. The ID of a custom role to assign to the invited user.
3470
+
3471
+ Returns:
3472
+ A dictionary containing the API response with details of the created invitation.
3473
+
3474
+ Raises:
3475
+ ValueError: Raised when any of the required parameters (team_id, email, admin) are None.
3476
+ HTTPError: Raised when the API request fails or returns an error status code.
3477
+
3478
+ Tags:
3479
+ invite, user, workspace, team, management
3480
+ """
3481
+ if team_id is None:
3482
+ raise ValueError("Missing required parameter 'team_id'")
3483
+ if email is None:
3484
+ raise ValueError("Missing required parameter 'email'")
3485
+ if admin is None:
3486
+ raise ValueError("Missing required parameter 'admin'")
3487
+ request_body = {
3488
+ 'email': email,
3489
+ 'admin': admin,
3490
+ 'custom_role_id': custom_role_id,
3491
+ }
3492
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3493
+ url = f"{self.base_url}/team/{team_id}/user"
3494
+ query_params = {}
3495
+ response = self._post(url, data=request_body, params=query_params)
3496
+ response.raise_for_status()
3497
+ return response.json()
3498
+
3499
+ def users_get_user_details(self, team_id, user_id) -> dict[str, Any]:
3500
+ """
3501
+ Retrieves detailed information about a specific user within a given team.
3502
+
3503
+ Args:
3504
+ team_id: The unique identifier of the team to which the user belongs. Must not be None.
3505
+ user_id: The unique identifier of the user whose details are to be retrieved. Must not be None.
3506
+
3507
+ Returns:
3508
+ A dictionary containing the user's details as returned by the API.
3509
+
3510
+ Raises:
3511
+ ValueError: Raised if either 'team_id' or 'user_id' is None.
3512
+ requests.HTTPError: Raised if the HTTP request to the API endpoint fails with a response error status.
3513
+
3514
+ Tags:
3515
+ get, user-details, api, management, important
3516
+ """
3517
+ if team_id is None:
3518
+ raise ValueError("Missing required parameter 'team_id'")
3519
+ if user_id is None:
3520
+ raise ValueError("Missing required parameter 'user_id'")
3521
+ url = f"{self.base_url}/team/{team_id}/user/{user_id}"
3522
+ query_params = {}
3523
+ response = self._get(url, params=query_params)
3524
+ response.raise_for_status()
3525
+ return response.json()
3526
+
3527
+ def users_update_user_details(self, team_id, user_id, username, admin, custom_role_id) -> dict[str, Any]:
3528
+ """
3529
+ Updates the details of a user in a specified team.
3530
+
3531
+ Args:
3532
+ team_id: str. The unique identifier of the team containing the user to update.
3533
+ user_id: str. The unique identifier of the user whose details will be updated.
3534
+ username: str. The new username to assign to the user.
3535
+ admin: bool. Whether the user should have admin privileges.
3536
+ custom_role_id: str. The identifier of a custom role to assign to the user.
3537
+
3538
+ Returns:
3539
+ dict[str, Any]: A dictionary containing the updated user details as returned by the server.
3540
+
3541
+ Raises:
3542
+ ValueError: If any of the required parameters ('team_id', 'user_id', 'username', 'admin', or 'custom_role_id') are None.
3543
+ requests.HTTPError: If the HTTP request to update the user fails.
3544
+
3545
+ Tags:
3546
+ update, user-management, api
3547
+ """
3548
+ if team_id is None:
3549
+ raise ValueError("Missing required parameter 'team_id'")
3550
+ if user_id is None:
3551
+ raise ValueError("Missing required parameter 'user_id'")
3552
+ if username is None:
3553
+ raise ValueError("Missing required parameter 'username'")
3554
+ if admin is None:
3555
+ raise ValueError("Missing required parameter 'admin'")
3556
+ if custom_role_id is None:
3557
+ raise ValueError("Missing required parameter 'custom_role_id'")
3558
+ request_body = {
3559
+ 'username': username,
3560
+ 'admin': admin,
3561
+ 'custom_role_id': custom_role_id,
3562
+ }
3563
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3564
+ url = f"{self.base_url}/team/{team_id}/user/{user_id}"
3565
+ query_params = {}
3566
+ response = self._put(url, data=request_body, params=query_params)
3567
+ response.raise_for_status()
3568
+ return response.json()
3569
+
3570
+ def users_deactivate_from_workspace(self, team_id, user_id) -> dict[str, Any]:
3571
+ """
3572
+ Deactivates a user from the specified workspace (team) by sending a DELETE request to the API.
3573
+
3574
+ Args:
3575
+ team_id: The unique identifier of the team (workspace) from which the user will be deactivated.
3576
+ user_id: The unique identifier of the user to deactivate from the workspace.
3577
+
3578
+ Returns:
3579
+ A dictionary containing the response data from the API after the user has been deactivated.
3580
+
3581
+ Raises:
3582
+ ValueError: Raised if either 'team_id' or 'user_id' is None.
3583
+ HTTPError: Raised if the API request fails (non-2xx status code).
3584
+
3585
+ Tags:
3586
+ deactivate, user-management, api
3587
+ """
3588
+ if team_id is None:
3589
+ raise ValueError("Missing required parameter 'team_id'")
3590
+ if user_id is None:
3591
+ raise ValueError("Missing required parameter 'user_id'")
3592
+ url = f"{self.base_url}/team/{team_id}/user/{user_id}"
3593
+ query_params = {}
3594
+ response = self._delete(url, params=query_params)
3595
+ response.raise_for_status()
3596
+ return response.json()
3597
+
3598
+ def views_get_everything_level(self, team_id) -> dict[str, Any]:
3599
+ """
3600
+ Retrieves all view-level data for a specified team.
3601
+
3602
+ Args:
3603
+ team_id: The unique identifier of the team for which to fetch all view data.
3604
+
3605
+ Returns:
3606
+ A dictionary containing all data at the 'view' level for the specified team.
3607
+
3608
+ Raises:
3609
+ ValueError: If 'team_id' is None.
3610
+ requests.HTTPError: If the HTTP request to fetch the data fails.
3611
+
3612
+ Tags:
3613
+ get, views, team, api
3614
+ """
3615
+ if team_id is None:
3616
+ raise ValueError("Missing required parameter 'team_id'")
3617
+ url = f"{self.base_url}/team/{team_id}/view"
3618
+ query_params = {}
3619
+ response = self._get(url, params=query_params)
3620
+ response.raise_for_status()
3621
+ return response.json()
3622
+
3623
+ def views_create_workspace_view_everything_level(self, team_id, name, type, grouping, divide, sorting, filters, columns, team_sidebar, settings) -> dict[str, Any]:
3624
+ """
3625
+ Creates a new 'everything-level' view within a specified workspace team with custom configuration options.
3626
+
3627
+ Args:
3628
+ team_id: str. Unique identifier of the team where the view will be created.
3629
+ name: str. Name of the new workspace view.
3630
+ type: str. Type of the view to create.
3631
+ grouping: Any. Defines how items in the view are grouped.
3632
+ divide: Any. Specifies division or partitioning within the view.
3633
+ sorting: Any. Sorting rules for items in the view.
3634
+ filters: Any. Filters to apply to items in the view.
3635
+ columns: Any. Specifies which columns will be included in the view.
3636
+ team_sidebar: Any. Configuration for the team sidebar appearance or content.
3637
+ settings: Any. Additional settings for the workspace view.
3638
+
3639
+ Returns:
3640
+ dict[str, Any]: A dictionary representing the API response containing details of the newly created workspace view.
3641
+
3642
+ Raises:
3643
+ ValueError: Raised if any required parameter is None.
3644
+ requests.HTTPError: Raised if the HTTP request to the backend fails (e.g., non-2xx response code).
3645
+
3646
+ Tags:
3647
+ create, workspace-view, management, api
3648
+ """
3649
+ if team_id is None:
3650
+ raise ValueError("Missing required parameter 'team_id'")
3651
+ if name is None:
3652
+ raise ValueError("Missing required parameter 'name'")
3653
+ if type is None:
3654
+ raise ValueError("Missing required parameter 'type'")
3655
+ if grouping is None:
3656
+ raise ValueError("Missing required parameter 'grouping'")
3657
+ if divide is None:
3658
+ raise ValueError("Missing required parameter 'divide'")
3659
+ if sorting is None:
3660
+ raise ValueError("Missing required parameter 'sorting'")
3661
+ if filters is None:
3662
+ raise ValueError("Missing required parameter 'filters'")
3663
+ if columns is None:
3664
+ raise ValueError("Missing required parameter 'columns'")
3665
+ if team_sidebar is None:
3666
+ raise ValueError("Missing required parameter 'team_sidebar'")
3667
+ if settings is None:
3668
+ raise ValueError("Missing required parameter 'settings'")
3669
+ request_body = {
3670
+ 'name': name,
3671
+ 'type': type,
3672
+ 'grouping': grouping,
3673
+ 'divide': divide,
3674
+ 'sorting': sorting,
3675
+ 'filters': filters,
3676
+ 'columns': columns,
3677
+ 'team_sidebar': team_sidebar,
3678
+ 'settings': settings,
3679
+ }
3680
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3681
+ url = f"{self.base_url}/team/{team_id}/view"
3682
+ query_params = {}
3683
+ response = self._post(url, data=request_body, params=query_params)
3684
+ response.raise_for_status()
3685
+ return response.json()
3686
+
3687
+ def views_space_views_get(self, space_id) -> dict[str, Any]:
3688
+ """
3689
+ Retrieves the view details for a specified space by its ID.
3690
+
3691
+ Args:
3692
+ space_id: str. The unique identifier of the space whose view information is to be fetched.
3693
+
3694
+ Returns:
3695
+ dict[str, Any]: A dictionary containing the space view information returned by the API.
3696
+
3697
+ Raises:
3698
+ ValueError: If 'space_id' is None.
3699
+ requests.HTTPError: If the HTTP request to the API endpoint fails or returns an unsuccessful status code.
3700
+
3701
+ Tags:
3702
+ get, view, space, management, api
3703
+ """
3704
+ if space_id is None:
3705
+ raise ValueError("Missing required parameter 'space_id'")
3706
+ url = f"{self.base_url}/space/{space_id}/view"
3707
+ query_params = {}
3708
+ response = self._get(url, params=query_params)
3709
+ response.raise_for_status()
3710
+ return response.json()
3711
+
3712
+ def views_add_view_to_space(self, space_id, name, type, grouping, divide, sorting, filters, columns, team_sidebar, settings) -> dict[str, Any]:
3713
+ """
3714
+ Creates a new view in the specified space with the given configuration parameters.
3715
+
3716
+ Args:
3717
+ space_id: str. The unique identifier of the space where the view will be added.
3718
+ name: str. The name of the new view.
3719
+ type: str. The type of the view to be created.
3720
+ grouping: Any. Grouping configuration for the view (structure depends on implementation).
3721
+ divide: Any. Division configuration for the view (structure depends on implementation).
3722
+ sorting: Any. Sorting configuration for the view (structure depends on implementation).
3723
+ filters: Any. Filter criteria for the view (structure depends on implementation).
3724
+ columns: Any. Column configuration for the view (structure depends on implementation).
3725
+ team_sidebar: Any. Team sidebar configuration for the view (structure depends on implementation).
3726
+ settings: Any. Additional settings for the view (structure depends on implementation).
3727
+
3728
+ Returns:
3729
+ dict[str, Any]: The JSON response from the server containing details of the newly created view.
3730
+
3731
+ Raises:
3732
+ ValueError: If any required parameter is missing (i.e., any of the arguments is None).
3733
+ requests.HTTPError: If the HTTP request to create the view fails (non-2xx response).
3734
+
3735
+ Tags:
3736
+ add, view, space, management, api
3737
+ """
3738
+ if space_id is None:
3739
+ raise ValueError("Missing required parameter 'space_id'")
3740
+ if name is None:
3741
+ raise ValueError("Missing required parameter 'name'")
3742
+ if type is None:
3743
+ raise ValueError("Missing required parameter 'type'")
3744
+ if grouping is None:
3745
+ raise ValueError("Missing required parameter 'grouping'")
3746
+ if divide is None:
3747
+ raise ValueError("Missing required parameter 'divide'")
3748
+ if sorting is None:
3749
+ raise ValueError("Missing required parameter 'sorting'")
3750
+ if filters is None:
3751
+ raise ValueError("Missing required parameter 'filters'")
3752
+ if columns is None:
3753
+ raise ValueError("Missing required parameter 'columns'")
3754
+ if team_sidebar is None:
3755
+ raise ValueError("Missing required parameter 'team_sidebar'")
3756
+ if settings is None:
3757
+ raise ValueError("Missing required parameter 'settings'")
3758
+ request_body = {
3759
+ 'name': name,
3760
+ 'type': type,
3761
+ 'grouping': grouping,
3762
+ 'divide': divide,
3763
+ 'sorting': sorting,
3764
+ 'filters': filters,
3765
+ 'columns': columns,
3766
+ 'team_sidebar': team_sidebar,
3767
+ 'settings': settings,
3768
+ }
3769
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3770
+ url = f"{self.base_url}/space/{space_id}/view"
3771
+ query_params = {}
3772
+ response = self._post(url, data=request_body, params=query_params)
3773
+ response.raise_for_status()
3774
+ return response.json()
3775
+
3776
+ def views_folder_views_get(self, folder_id) -> dict[str, Any]:
3777
+ """
3778
+ Retrieves the views associated with a specified folder by its folder ID.
3779
+
3780
+ Args:
3781
+ folder_id: The unique identifier of the folder to retrieve views for.
3782
+
3783
+ Returns:
3784
+ A dictionary containing the JSON response with the folder's views data.
3785
+
3786
+ Raises:
3787
+ ValueError: Raised if the required parameter 'folder_id' is None.
3788
+ requests.HTTPError: Raised if the HTTP request to retrieve the folder views fails.
3789
+
3790
+ Tags:
3791
+ get, views, folder, api
3792
+ """
3793
+ if folder_id is None:
3794
+ raise ValueError("Missing required parameter 'folder_id'")
3795
+ url = f"{self.base_url}/folder/{folder_id}/view"
3796
+ query_params = {}
3797
+ response = self._get(url, params=query_params)
3798
+ response.raise_for_status()
3799
+ return response.json()
3800
+
3801
+ def views_add_view_to_folder(self, folder_id, name, type, grouping, divide, sorting, filters, columns, team_sidebar, settings) -> dict[str, Any]:
3802
+ """
3803
+ Adds a new view to a specified folder with the provided configuration details.
3804
+
3805
+ Args:
3806
+ folder_id: The unique identifier of the folder to which the view will be added.
3807
+ name: The name of the view to create.
3808
+ type: The type of the view (e.g., list, board, etc.).
3809
+ grouping: Configuration for how items are grouped in the view.
3810
+ divide: Configuration for dividing items within the view.
3811
+ sorting: Sorting specifications for items in the view.
3812
+ filters: Filters to apply to items in the view.
3813
+ columns: Column definitions to display in the view.
3814
+ team_sidebar: Sidebar configuration for team access and visibility.
3815
+ settings: Additional view settings and preferences.
3816
+
3817
+ Returns:
3818
+ dict[str, Any]: A dictionary containing the details of the newly created view as returned by the API.
3819
+
3820
+ Raises:
3821
+ ValueError: Raised if any required parameter is missing (i.e., has the value None).
3822
+ requests.HTTPError: Raised if the HTTP request to the API fails.
3823
+
3824
+ Tags:
3825
+ add, view, management, api
3826
+ """
3827
+ if folder_id is None:
3828
+ raise ValueError("Missing required parameter 'folder_id'")
3829
+ if name is None:
3830
+ raise ValueError("Missing required parameter 'name'")
3831
+ if type is None:
3832
+ raise ValueError("Missing required parameter 'type'")
3833
+ if grouping is None:
3834
+ raise ValueError("Missing required parameter 'grouping'")
3835
+ if divide is None:
3836
+ raise ValueError("Missing required parameter 'divide'")
3837
+ if sorting is None:
3838
+ raise ValueError("Missing required parameter 'sorting'")
3839
+ if filters is None:
3840
+ raise ValueError("Missing required parameter 'filters'")
3841
+ if columns is None:
3842
+ raise ValueError("Missing required parameter 'columns'")
3843
+ if team_sidebar is None:
3844
+ raise ValueError("Missing required parameter 'team_sidebar'")
3845
+ if settings is None:
3846
+ raise ValueError("Missing required parameter 'settings'")
3847
+ request_body = {
3848
+ 'name': name,
3849
+ 'type': type,
3850
+ 'grouping': grouping,
3851
+ 'divide': divide,
3852
+ 'sorting': sorting,
3853
+ 'filters': filters,
3854
+ 'columns': columns,
3855
+ 'team_sidebar': team_sidebar,
3856
+ 'settings': settings,
3857
+ }
3858
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3859
+ url = f"{self.base_url}/folder/{folder_id}/view"
3860
+ query_params = {}
3861
+ response = self._post(url, data=request_body, params=query_params)
3862
+ response.raise_for_status()
3863
+ return response.json()
3864
+
3865
+ def views_get_list_views(self, list_id) -> dict[str, Any]:
3866
+ """
3867
+ Retrieves all views associated with the specified list.
3868
+
3869
+ Args:
3870
+ list_id: The unique identifier of the list whose views are to be fetched.
3871
+
3872
+ Returns:
3873
+ A dictionary containing data for all views related to the given list.
3874
+
3875
+ Raises:
3876
+ ValueError: Raised when 'list_id' is None.
3877
+ requests.HTTPError: Raised if the HTTP request to fetch views fails.
3878
+
3879
+ Tags:
3880
+ list, views, fetch, api
3881
+ """
3882
+ if list_id is None:
3883
+ raise ValueError("Missing required parameter 'list_id'")
3884
+ url = f"{self.base_url}/list/{list_id}/view"
3885
+ query_params = {}
3886
+ response = self._get(url, params=query_params)
3887
+ response.raise_for_status()
3888
+ return response.json()
3889
+
3890
+ def views_add_view_to_list(self, list_id, name, type, grouping, divide, sorting, filters, columns, team_sidebar, settings) -> dict[str, Any]:
3891
+ """
3892
+ Creates a new view for a specified list with the provided configuration and returns the resulting view data.
3893
+
3894
+ Args:
3895
+ list_id: The unique identifier of the list to which the new view will be added.
3896
+ name: The name of the new view.
3897
+ type: The type/category of the view to be created.
3898
+ grouping: Grouping settings for organizing items in the view.
3899
+ divide: Division options determining how content is split in the view.
3900
+ sorting: Sorting configuration for ordering items in the view.
3901
+ filters: Filters to be applied for displaying relevant items in the view.
3902
+ columns: Columns to be displayed in the view.
3903
+ team_sidebar: Configuration determining if or how the view appears in the team sidebar.
3904
+ settings: Additional settings and options for the new view.
3905
+
3906
+ Returns:
3907
+ A dictionary containing the details of the newly created view as returned by the API.
3908
+
3909
+ Raises:
3910
+ ValueError: Raised if any required parameter is missing (i.e., if one of the parameters is None).
3911
+ requests.HTTPError: Raised if the HTTP request to create the view fails (e.g., due to a network error or invalid response).
3912
+
3913
+ Tags:
3914
+ add, view, list, api, management
3915
+ """
3916
+ if list_id is None:
3917
+ raise ValueError("Missing required parameter 'list_id'")
3918
+ if name is None:
3919
+ raise ValueError("Missing required parameter 'name'")
3920
+ if type is None:
3921
+ raise ValueError("Missing required parameter 'type'")
3922
+ if grouping is None:
3923
+ raise ValueError("Missing required parameter 'grouping'")
3924
+ if divide is None:
3925
+ raise ValueError("Missing required parameter 'divide'")
3926
+ if sorting is None:
3927
+ raise ValueError("Missing required parameter 'sorting'")
3928
+ if filters is None:
3929
+ raise ValueError("Missing required parameter 'filters'")
3930
+ if columns is None:
3931
+ raise ValueError("Missing required parameter 'columns'")
3932
+ if team_sidebar is None:
3933
+ raise ValueError("Missing required parameter 'team_sidebar'")
3934
+ if settings is None:
3935
+ raise ValueError("Missing required parameter 'settings'")
3936
+ request_body = {
3937
+ 'name': name,
3938
+ 'type': type,
3939
+ 'grouping': grouping,
3940
+ 'divide': divide,
3941
+ 'sorting': sorting,
3942
+ 'filters': filters,
3943
+ 'columns': columns,
3944
+ 'team_sidebar': team_sidebar,
3945
+ 'settings': settings,
3946
+ }
3947
+ request_body = {k: v for k, v in request_body.items() if v is not None}
3948
+ url = f"{self.base_url}/list/{list_id}/view"
3949
+ query_params = {}
3950
+ response = self._post(url, data=request_body, params=query_params)
3951
+ response.raise_for_status()
3952
+ return response.json()
3953
+
3954
+ def views_get_view_info(self, view_id) -> dict[str, Any]:
3955
+ """
3956
+ Retrieves detailed information about a specific view by its identifier.
3957
+
3958
+ Args:
3959
+ view_id: str. The unique identifier of the view to retrieve information for.
3960
+
3961
+ Returns:
3962
+ dict[str, Any]: A dictionary containing the view's information as returned by the API.
3963
+
3964
+ Raises:
3965
+ ValueError: Raised if 'view_id' is None.
3966
+ requests.HTTPError: Raised if the HTTP request to fetch the view information fails with a non-success status code.
3967
+
3968
+ Tags:
3969
+ get, view-info, api
3970
+ """
3971
+ if view_id is None:
3972
+ raise ValueError("Missing required parameter 'view_id'")
3973
+ url = f"{self.base_url}/view/{view_id}"
3974
+ query_params = {}
3975
+ response = self._get(url, params=query_params)
3976
+ response.raise_for_status()
3977
+ return response.json()
3978
+
3979
+ def views_update_view_details(self, view_id, name, type, parent, grouping, divide, sorting, filters, columns, team_sidebar, settings) -> dict[str, Any]:
3980
+ """
3981
+ Updates the details of an existing view with the specified parameters.
3982
+
3983
+ Args:
3984
+ view_id: str. The unique identifier of the view to update.
3985
+ name: str. The new name for the view.
3986
+ type: str. The type of the view.
3987
+ parent: str. The parent identifier or reference for the view.
3988
+ grouping: Any. The grouping configuration for the view.
3989
+ divide: Any. The divide configuration for the view.
3990
+ sorting: Any. The sorting configuration for the view.
3991
+ filters: Any. The filter settings applied to the view.
3992
+ columns: Any. The column configurations for the view.
3993
+ team_sidebar: Any. The sidebar settings for team visibility in the view.
3994
+ settings: Any. Additional settings or metadata for the view.
3995
+
3996
+ Returns:
3997
+ dict[str, Any]: The updated view details as returned by the API.
3998
+
3999
+ Raises:
4000
+ ValueError: If any required parameter is None.
4001
+ HTTPError: If the API request fails and returns a non-success status code.
4002
+
4003
+ Tags:
4004
+ update, view-management, api
4005
+ """
4006
+ if view_id is None:
4007
+ raise ValueError("Missing required parameter 'view_id'")
4008
+ if name is None:
4009
+ raise ValueError("Missing required parameter 'name'")
4010
+ if type is None:
4011
+ raise ValueError("Missing required parameter 'type'")
4012
+ if parent is None:
4013
+ raise ValueError("Missing required parameter 'parent'")
4014
+ if grouping is None:
4015
+ raise ValueError("Missing required parameter 'grouping'")
4016
+ if divide is None:
4017
+ raise ValueError("Missing required parameter 'divide'")
4018
+ if sorting is None:
4019
+ raise ValueError("Missing required parameter 'sorting'")
4020
+ if filters is None:
4021
+ raise ValueError("Missing required parameter 'filters'")
4022
+ if columns is None:
4023
+ raise ValueError("Missing required parameter 'columns'")
4024
+ if team_sidebar is None:
4025
+ raise ValueError("Missing required parameter 'team_sidebar'")
4026
+ if settings is None:
4027
+ raise ValueError("Missing required parameter 'settings'")
4028
+ request_body = {
4029
+ 'name': name,
4030
+ 'type': type,
4031
+ 'parent': parent,
4032
+ 'grouping': grouping,
4033
+ 'divide': divide,
4034
+ 'sorting': sorting,
4035
+ 'filters': filters,
4036
+ 'columns': columns,
4037
+ 'team_sidebar': team_sidebar,
4038
+ 'settings': settings,
4039
+ }
4040
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4041
+ url = f"{self.base_url}/view/{view_id}"
4042
+ query_params = {}
4043
+ response = self._put(url, data=request_body, params=query_params)
4044
+ response.raise_for_status()
4045
+ return response.json()
4046
+
4047
+ def views_delete_view_by_id(self, view_id) -> dict[str, Any]:
4048
+ """
4049
+ Deletes a view by its ID.
4050
+
4051
+ Args:
4052
+ view_id: The unique identifier of the view to be deleted.
4053
+
4054
+ Returns:
4055
+ A dictionary containing the API response data from the deletion operation.
4056
+
4057
+ Raises:
4058
+ ValueError: Raised when the required parameter 'view_id' is None.
4059
+ HTTPError: Raised when the API request fails or returns an error status code.
4060
+
4061
+ Tags:
4062
+ delete, view, management
4063
+ """
4064
+ if view_id is None:
4065
+ raise ValueError("Missing required parameter 'view_id'")
4066
+ url = f"{self.base_url}/view/{view_id}"
4067
+ query_params = {}
4068
+ response = self._delete(url, params=query_params)
4069
+ response.raise_for_status()
4070
+ return response.json()
4071
+
4072
+ def views_get_tasks_in_view(self, view_id, page) -> dict[str, Any]:
4073
+ """
4074
+ Retrieves a paginated list of tasks associated with a specific view.
4075
+
4076
+ Args:
4077
+ view_id: The unique identifier of the view to retrieve tasks for. Must not be None.
4078
+ page: The page number of tasks to retrieve. Must not be None.
4079
+
4080
+ Ret
4081
+ A dictionary containing the JSON response with the tasks for the specified view and page.
4082
+
4083
+ Raises:
4084
+ ValueError: Raised if either 'view_id' or 'page' is None.
4085
+ HTTPError: Raised if the HTTP request to retrieve tasks fails.
4086
+
4087
+ Tags:
4088
+ get, list, tasks, view, pagination
4089
+ """
4090
+ if view_id is None:
4091
+ raise ValueError("Missing required parameter 'view_id'")
4092
+ if page is None:
4093
+ raise ValueError("Missing required parameter 'page'")
4094
+ url = f"{self.base_url}/view/{view_id}/task"
4095
+ query_params = {k: v for k, v in [('page', page)] if v is not None}
4096
+ response = self._get(url, params=query_params)
4097
+ response.raise_for_status()
4098
+ return response.json()
4099
+
4100
+ def webhooks_workspace_get(self, team_id) -> dict[str, Any]:
4101
+ """
4102
+ Retrieves webhook configurations for a specified workspace team.
4103
+
4104
+ Args:
4105
+ team_id: str. The unique identifier of the workspace team whose webhooks are to be retrieved.
4106
+
4107
+ Returns:
4108
+ dict[str, Any]: A dictionary containing the webhook configuration data associated with the given team.
4109
+
4110
+ Raises:
4111
+ ValueError: Raised if 'team_id' is None.
4112
+ requests.HTTPError: Raised if the HTTP request to the server fails or an error response is received.
4113
+
4114
+ Tags:
4115
+ get, webhooks, workspace, management
4116
+ """
4117
+ if team_id is None:
4118
+ raise ValueError("Missing required parameter 'team_id'")
4119
+ url = f"{self.base_url}/team/{team_id}/webhook"
4120
+ query_params = {}
4121
+ response = self._get(url, params=query_params)
4122
+ response.raise_for_status()
4123
+ return response.json()
4124
+
4125
+ def webhooks_create_webhook(self, team_id, endpoint, events, space_id=None, folder_id=None, list_id=None, task_id=None) -> dict[str, Any]:
4126
+ """
4127
+ Creates a webhook for a team by sending a POST request to the specified endpoint.
4128
+
4129
+ Args:
4130
+ team_id: The ID of the team for which the webhook is being created.
4131
+ endpoint: The URL where events will be posted.
4132
+ events: The events that will be sent to the webhook endpoint.
4133
+ space_id: Optional space ID to which the webhook is associated.
4134
+ folder_id: Optional folder ID to which the webhook is associated.
4135
+ list_id: Optional list ID to which the webhook is associated.
4136
+ task_id: Optional task ID to which the webhook is associated.
4137
+
4138
+ Returns:
4139
+ A dictionary containing the created webhook details.
4140
+
4141
+ Raises:
4142
+ ValueError: Raised when required parameters 'team_id', 'endpoint', or 'events' are missing.
4143
+
4144
+ Tags:
4145
+ webhook, create, api-call
4146
+ """
4147
+ if team_id is None:
4148
+ raise ValueError("Missing required parameter 'team_id'")
4149
+ if endpoint is None:
4150
+ raise ValueError("Missing required parameter 'endpoint'")
4151
+ if events is None:
4152
+ raise ValueError("Missing required parameter 'events'")
4153
+ request_body = {
4154
+ 'endpoint': endpoint,
4155
+ 'events': events,
4156
+ 'space_id': space_id,
4157
+ 'folder_id': folder_id,
4158
+ 'list_id': list_id,
4159
+ 'task_id': task_id,
4160
+ }
4161
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4162
+ url = f"{self.base_url}/team/{team_id}/webhook"
4163
+ query_params = {}
4164
+ response = self._post(url, data=request_body, params=query_params)
4165
+ response.raise_for_status()
4166
+ return response.json()
4167
+
4168
+ def webhooks_update_events_to_monitor(self, webhook_id, endpoint, events, status) -> dict[str, Any]:
4169
+ """
4170
+ Updates the monitored events, endpoint, and status for a specified webhook.
4171
+
4172
+ Args:
4173
+ webhook_id: str. Unique identifier of the webhook to update.
4174
+ endpoint: str. The URL endpoint where webhook notifications will be sent.
4175
+ events: list or str. Events to monitor for this webhook.
4176
+ status: str. The desired status for the webhook (e.g., 'active', 'inactive').
4177
+
4178
+ Returns:
4179
+ dict. Parsed JSON response from the server after updating the webhook.
4180
+
4181
+ Raises:
4182
+ ValueError: Raised if any of 'webhook_id', 'endpoint', 'events', or 'status' is None.
4183
+ requests.HTTPError: Raised if the HTTP request to update the webhook fails (non-2xx status code).
4184
+
4185
+ Tags:
4186
+ update, webhook, management
4187
+ """
4188
+ if webhook_id is None:
4189
+ raise ValueError("Missing required parameter 'webhook_id'")
4190
+ if endpoint is None:
4191
+ raise ValueError("Missing required parameter 'endpoint'")
4192
+ if events is None:
4193
+ raise ValueError("Missing required parameter 'events'")
4194
+ if status is None:
4195
+ raise ValueError("Missing required parameter 'status'")
4196
+ request_body = {
4197
+ 'endpoint': endpoint,
4198
+ 'events': events,
4199
+ 'status': status,
4200
+ }
4201
+ request_body = {k: v for k, v in request_body.items() if v is not None}
4202
+ url = f"{self.base_url}/webhook/{webhook_id}"
4203
+ query_params = {}
4204
+ response = self._put(url, data=request_body, params=query_params)
4205
+ response.raise_for_status()
4206
+ return response.json()
4207
+
4208
+ def webhooks_remove_webhook_by_id(self, webhook_id) -> dict[str, Any]:
4209
+ """
4210
+ Removes a webhook by ID.
4211
+
4212
+ Args:
4213
+ webhook_id: The unique identifier of the webhook to be removed.
4214
+
4215
+ Returns:
4216
+ A dictionary containing the API response after webhook deletion.
4217
+
4218
+ Raises:
4219
+ ValueError: If webhook_id is None or not provided.
4220
+ HTTPError: If the API request fails or returns an error status code.
4221
+
4222
+ Tags:
4223
+ remove, delete, webhook, management
4224
+ """
4225
+ if webhook_id is None:
4226
+ raise ValueError("Missing required parameter 'webhook_id'")
4227
+ url = f"{self.base_url}/webhook/{webhook_id}"
4228
+ query_params = {}
4229
+ response = self._delete(url, params=query_params)
4230
+ response.raise_for_status()
4231
+ return response.json()
4232
+
4233
+ def list_tools(self):
4234
+ return [
4235
+ self.authorization_get_access_token,
4236
+ self.authorization_view_account_details,
4237
+ self.authorization_get_workspace_list,
4238
+ self.task_checklists_create_new_checklist,
4239
+ self.task_checklists_update_checklist,
4240
+ self.task_checklists_remove_checklist,
4241
+ self.task_checklists_add_line_item,
4242
+ self.task_checklists_update_checklist_item,
4243
+ self.task_checklists_remove_checklist_item,
4244
+ self.comments_get_task_comments,
4245
+ self.comments_create_new_task_comment,
4246
+ self.comments_get_view_comments,
4247
+ self.comments_create_chat_view_comment,
4248
+ self.comments_get_list_comments,
4249
+ self.comments_add_to_list_comment,
4250
+ self.comments_update_task_comment,
4251
+ self.comments_delete_task_comment,
4252
+ self.custom_fields_get_list_fields,
4253
+ self.custom_fields_remove_field_value,
4254
+ self.task_relationships_add_dependency,
4255
+ self.task_relationships_remove_dependency,
4256
+ self.task_relationships_link_tasks,
4257
+ self.task_relationships_remove_link_between_tasks,
4258
+ self.folders_get_contents_of,
4259
+ self.folders_create_new_folder,
4260
+ self.folders_get_folder_content,
4261
+ self.folders_rename_folder,
4262
+ self.folders_remove_folder,
4263
+ self.goals_get_workspace_goals,
4264
+ self.goals_add_new_goal_to_workspace,
4265
+ self.goals_get_details,
4266
+ self.goals_update_goal_details,
4267
+ self.goals_remove_goal,
4268
+ self.goals_add_key_result,
4269
+ self.goals_update_key_result,
4270
+ self.goals_remove_target,
4271
+ self.guests_invite_to_workspace,
4272
+ self.guests_get_guest_information,
4273
+ self.guests_edit_guest_on_workspace,
4274
+ self.guests_revoke_guest_access_to_workspace,
4275
+ self.guests_add_to_task,
4276
+ self.guests_revoke_access_to_task,
4277
+ self.guests_share_list_with,
4278
+ self.guests_remove_from_list,
4279
+ self.guests_add_guest_to_folder,
4280
+ self.guests_revoke_access_from_folder,
4281
+ self.lists_get_folder_lists,
4282
+ self.lists_add_to_folder,
4283
+ self.lists_get_folderless,
4284
+ self.lists_create_folderless_list,
4285
+ self.lists_get_list_details,
4286
+ self.lists_update_list_info_due_date_priority_assignee_color,
4287
+ self.lists_remove_list,
4288
+ self.lists_add_task_to_list,
4289
+ self.lists_remove_task_from_list,
4290
+ self.members_get_task_access,
4291
+ self.members_get_list_users,
4292
+ self.roles_list_available_custom_roles,
4293
+ self.shared_hierarchy_view_tasks_lists_folders,
4294
+ self.spaces_get_space_details,
4295
+ self.spaces_add_new_space_to_workspace,
4296
+ self.spaces_get_details,
4297
+ self.spaces_update_details_and_enable_click_apps,
4298
+ self.spaces_remove_space,
4299
+ self.tags_get_space,
4300
+ self.tags_create_space_tag,
4301
+ self.tags_update_space_tag,
4302
+ self.tags_remove_space_tag,
4303
+ self.tags_add_to_task,
4304
+ self.tags_remove_from_task,
4305
+ self.tasks_get_list_tasks,
4306
+ self.tasks_create_new_task,
4307
+ self.tasks_get_task_details,
4308
+ self.tasks_update_task_fields,
4309
+ self.tasks_remove_task_by_id,
4310
+ self.tasks_filter_team_tasks,
4311
+ self.tasks_get_time_in_status,
4312
+ self.tasks_get_time_in_status_bulk,
4313
+ self.task_templates_get_templates,
4314
+ self.task_templates_create_from_template,
4315
+ self.teams_workspaces_get_workspace_seats,
4316
+ self.teams_workspaces_get_workspace_plan,
4317
+ self.teams_user_groups_create_team,
4318
+ self.custom_task_types_get_available_task_types,
4319
+ self.teams_user_groups_update_user_group,
4320
+ self.teams_user_groups_remove_group,
4321
+ self.teams_user_groups_get_user_groups,
4322
+ self.time_tracking_legacy_get_tracked_time,
4323
+ self.time_tracking_legacy_record_time_for_task,
4324
+ self.time_tracking_legacy_edit_time_tracked,
4325
+ self.time_tracking_legacy_remove_tracked_time,
4326
+ self.time_tracking_get_time_entries_within_date_range,
4327
+ self.time_tracking_create_time_entry,
4328
+ self.time_tracking_get_single_time_entry,
4329
+ self.time_tracking_remove_entry,
4330
+ self.time_tracking_update_time_entry_details,
4331
+ self.time_tracking_get_time_entry_history,
4332
+ self.time_tracking_get_current_time_entry,
4333
+ self.time_tracking_remove_tags_from_time_entries,
4334
+ self.time_tracking_get_all_tags_from_time_entries,
4335
+ self.time_tracking_add_tags_from_time_entries,
4336
+ self.time_tracking_change_tag_names,
4337
+ self.time_tracking_start_timer,
4338
+ self.time_tracking_stop_time_entry,
4339
+ self.users_invite_user_to_workspace,
4340
+ self.users_get_user_details,
4341
+ self.users_update_user_details,
4342
+ self.users_deactivate_from_workspace,
4343
+ self.views_get_everything_level,
4344
+ self.views_create_workspace_view_everything_level,
4345
+ self.views_space_views_get,
4346
+ self.views_add_view_to_space,
4347
+ self.views_folder_views_get,
4348
+ self.views_add_view_to_folder,
4349
+ self.views_get_list_views,
4350
+ self.views_add_view_to_list,
4351
+ self.views_get_view_info,
4352
+ self.views_update_view_details,
4353
+ self.views_delete_view_by_id,
4354
+ self.views_get_tasks_in_view,
4355
+ self.webhooks_workspace_get,
4356
+ self.webhooks_create_webhook,
4357
+ self.webhooks_update_events_to_monitor,
4358
+ self.webhooks_remove_webhook_by_id
4359
+ ]