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