universal-mcp 0.1.8rc2__py3-none-any.whl → 0.1.8rc4__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 (53) hide show
  1. universal_mcp/__init__.py +0 -2
  2. universal_mcp/analytics.py +75 -0
  3. universal_mcp/applications/ahrefs/README.md +76 -0
  4. universal_mcp/applications/ahrefs/__init__.py +0 -0
  5. universal_mcp/applications/ahrefs/app.py +2291 -0
  6. universal_mcp/applications/application.py +94 -5
  7. universal_mcp/applications/calendly/app.py +412 -171
  8. universal_mcp/applications/coda/README.md +133 -0
  9. universal_mcp/applications/coda/__init__.py +0 -0
  10. universal_mcp/applications/coda/app.py +3671 -0
  11. universal_mcp/applications/e2b/app.py +8 -35
  12. universal_mcp/applications/figma/README.md +74 -0
  13. universal_mcp/applications/figma/__init__.py +0 -0
  14. universal_mcp/applications/figma/app.py +1261 -0
  15. universal_mcp/applications/firecrawl/app.py +3 -33
  16. universal_mcp/applications/github/app.py +41 -42
  17. universal_mcp/applications/google_calendar/app.py +20 -31
  18. universal_mcp/applications/google_docs/app.py +21 -46
  19. universal_mcp/applications/google_drive/app.py +53 -76
  20. universal_mcp/applications/google_mail/app.py +40 -56
  21. universal_mcp/applications/google_sheet/app.py +43 -68
  22. universal_mcp/applications/markitdown/app.py +4 -4
  23. universal_mcp/applications/notion/app.py +93 -83
  24. universal_mcp/applications/perplexity/app.py +4 -38
  25. universal_mcp/applications/reddit/app.py +32 -32
  26. universal_mcp/applications/resend/app.py +4 -22
  27. universal_mcp/applications/serpapi/app.py +6 -32
  28. universal_mcp/applications/tavily/app.py +4 -24
  29. universal_mcp/applications/wrike/app.py +565 -237
  30. universal_mcp/applications/youtube/app.py +625 -183
  31. universal_mcp/applications/zenquotes/app.py +3 -3
  32. universal_mcp/exceptions.py +1 -0
  33. universal_mcp/integrations/__init__.py +11 -2
  34. universal_mcp/integrations/agentr.py +27 -4
  35. universal_mcp/integrations/integration.py +14 -6
  36. universal_mcp/logger.py +3 -56
  37. universal_mcp/servers/__init__.py +2 -1
  38. universal_mcp/servers/server.py +73 -77
  39. universal_mcp/stores/store.py +5 -3
  40. universal_mcp/tools/__init__.py +1 -1
  41. universal_mcp/tools/adapters.py +4 -1
  42. universal_mcp/tools/func_metadata.py +5 -6
  43. universal_mcp/tools/tools.py +108 -51
  44. universal_mcp/utils/docgen.py +121 -69
  45. universal_mcp/utils/docstring_parser.py +44 -21
  46. universal_mcp/utils/dump_app_tools.py +33 -23
  47. universal_mcp/utils/installation.py +199 -8
  48. universal_mcp/utils/openapi.py +121 -47
  49. {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/METADATA +2 -2
  50. universal_mcp-0.1.8rc4.dist-info/RECORD +81 -0
  51. universal_mcp-0.1.8rc2.dist-info/RECORD +0 -71
  52. {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/WHEEL +0 -0
  53. {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/entry_points.txt +0 -0
@@ -8,44 +8,39 @@ class WrikeApp(APIApplication):
8
8
  def __init__(self, integration: Integration = None, **kwargs) -> None:
9
9
  """
10
10
  Initializes the OfficialWrikeCollectionV21App with a specified integration and additional keyword arguments.
11
-
11
+
12
12
  Args:
13
13
  integration: Integration, optional. The integration instance to associate with this app. Defaults to None.
14
14
  **kwargs: Additional keyword arguments passed to the superclass initializer.
15
-
15
+
16
16
  Returns:
17
17
  None. This constructor initializes the instance in place.
18
18
  """
19
- super().__init__(name='wrike', integration=integration, **kwargs)
19
+ super().__init__(name="wrike", integration=integration, **kwargs)
20
20
  self.base_url = "https://www.wrike.com/api/v4"
21
21
 
22
- def _get_headers(self):
23
- if not self.integration:
24
- raise ValueError("Integration not configured for WrikeApp")
25
- credentials = self.integration.get_credentials()
26
-
27
- if "headers" in credentials:
28
- return credentials["headers"]
29
- return {
30
- "Authorization": f"Bearer {credentials['access_token']}",
31
- "Content-Type": "application/json",
32
- }
33
-
34
-
35
22
  def get_contacts(self, deleted=None, fields=None, metadata=None) -> Any:
36
23
  """
37
24
  Retrieves a list of contacts from the server, with optional filtering and field selection.
38
-
25
+
39
26
  Args:
40
27
  deleted: Optional[bool]. If set, filters contacts by their deleted status. Only contacts matching the specified deleted state are returned.
41
28
  fields: Optional[str]. Comma-separated list of fields to include in the response for each contact. Limits the contact fields returned.
42
29
  metadata: Optional[str]. Comma-separated list of metadata fields to include in the response. Filters which metadata is returned for each contact.
43
-
30
+
44
31
  Returns:
45
32
  The JSON-decoded response from the server containing contact information, as a Python object (such as a list or dictionary) depending on the backend API response structure.
46
33
  """
47
34
  url = f"{self.base_url}/contacts"
48
- query_params = {k: v for k, v in [('deleted', deleted), ('fields', fields), ('metadata', metadata)] if v is not None}
35
+ query_params = {
36
+ k: v
37
+ for k, v in [
38
+ ("deleted", deleted),
39
+ ("fields", fields),
40
+ ("metadata", metadata),
41
+ ]
42
+ if v is not None
43
+ }
49
44
  response = self._get(url, params=query_params)
50
45
  response.raise_for_status()
51
46
  return response.json()
@@ -53,26 +48,35 @@ class WrikeApp(APIApplication):
53
48
  def get_contacts_by_contactid(self, contactId, fields=None) -> Any:
54
49
  """
55
50
  Retrieves contact information for a specific contact ID, optionally returning only specified fields.
56
-
51
+
57
52
  Args:
58
53
  contactId: The unique identifier of the contact to retrieve. Must not be None.
59
54
  fields: Optional; a comma-separated string specifying which fields to include in the response. If None, all fields are returned.
60
-
55
+
61
56
  Returns:
62
57
  A JSON-decoded object containing the contact's details as returned by the API.
63
58
  """
64
59
  if contactId is None:
65
60
  raise ValueError("Missing required parameter 'contactId'")
66
61
  url = f"{self.base_url}/contacts/{contactId}"
67
- query_params = {k: v for k, v in [('fields', fields)] if v is not None}
62
+ query_params = {k: v for k, v in [("fields", fields)] if v is not None}
68
63
  response = self._get(url, params=query_params)
69
64
  response.raise_for_status()
70
65
  return response.json()
71
66
 
72
- def put_contacts_by_contactid(self, contactId, metadata=None, currentBillRate=None, currentCostRate=None, jobRoleId=None, customFields=None, fields=None) -> Any:
67
+ def put_contacts_by_contactid(
68
+ self,
69
+ contactId,
70
+ metadata=None,
71
+ currentBillRate=None,
72
+ currentCostRate=None,
73
+ jobRoleId=None,
74
+ customFields=None,
75
+ fields=None,
76
+ ) -> Any:
73
77
  """
74
78
  Updates an existing contact by contact ID with provided details such as metadata, billing and cost rates, job role, custom fields, or additional fields.
75
-
79
+
76
80
  Args:
77
81
  contactId: The unique identifier of the contact to update. Must not be None.
78
82
  metadata: Optional metadata dictionary for the contact (default is None).
@@ -81,19 +85,19 @@ class WrikeApp(APIApplication):
81
85
  jobRoleId: Optional job role identifier associated with the contact (default is None).
82
86
  customFields: Optional dictionary of custom contact fields (default is None).
83
87
  fields: Optional list of specific fields to include in the response (default is None).
84
-
88
+
85
89
  Returns:
86
90
  The JSON-decoded response containing the updated contact details.
87
91
  """
88
92
  if contactId is None:
89
93
  raise ValueError("Missing required parameter 'contactId'")
90
94
  request_body = {
91
- 'metadata': metadata,
92
- 'currentBillRate': currentBillRate,
93
- 'currentCostRate': currentCostRate,
94
- 'jobRoleId': jobRoleId,
95
- 'customFields': customFields,
96
- 'fields': fields,
95
+ "metadata": metadata,
96
+ "currentBillRate": currentBillRate,
97
+ "currentCostRate": currentCostRate,
98
+ "jobRoleId": jobRoleId,
99
+ "customFields": customFields,
100
+ "fields": fields,
97
101
  }
98
102
  request_body = {k: v for k, v in request_body.items() if v is not None}
99
103
  url = f"{self.base_url}/contacts/{contactId}"
@@ -105,10 +109,10 @@ class WrikeApp(APIApplication):
105
109
  def get_users_by_userid(self, userId) -> Any:
106
110
  """
107
111
  Retrieves user information for a given user ID from the API endpoint.
108
-
112
+
109
113
  Args:
110
114
  userId: The unique identifier of the user whose information is to be retrieved.
111
-
115
+
112
116
  Returns:
113
117
  A JSON-decoded object containing user details as returned by the API.
114
118
  """
@@ -123,18 +127,18 @@ class WrikeApp(APIApplication):
123
127
  def put_users_by_userid(self, userId, profile=None) -> Any:
124
128
  """
125
129
  Updates a user's profile information by user ID using a PUT request.
126
-
130
+
127
131
  Args:
128
132
  userId: str. The unique identifier of the user. Must not be None.
129
133
  profile: dict or None. Optional. The profile information to update for the user. If None, no profile data is sent.
130
-
134
+
131
135
  Returns:
132
136
  Any. The parsed JSON response from the server after updating the user's information.
133
137
  """
134
138
  if userId is None:
135
139
  raise ValueError("Missing required parameter 'userId'")
136
140
  request_body = {
137
- 'profile': profile,
141
+ "profile": profile,
138
142
  }
139
143
  request_body = {k: v for k, v in request_body.items() if v is not None}
140
144
  url = f"{self.base_url}/users/{userId}"
@@ -143,47 +147,60 @@ class WrikeApp(APIApplication):
143
147
  response.raise_for_status()
144
148
  return response.json()
145
149
 
146
- def get_groups(self, metadata=None, pageSize=None, pageToken=None, fields=None) -> Any:
150
+ def get_groups(
151
+ self, metadata=None, pageSize=None, pageToken=None, fields=None
152
+ ) -> Any:
147
153
  """
148
154
  Retrieves a list of groups from the API, applying optional filtering and pagination parameters.
149
-
155
+
150
156
  Args:
151
157
  metadata: Optional. Specifies additional metadata to include or filter by in the group results.
152
158
  pageSize: Optional. The maximum number of groups to return in the response.
153
159
  pageToken: Optional. A token identifying the page of results to return, for pagination.
154
160
  fields: Optional. Selector specifying a subset of fields to include in the response.
155
-
161
+
156
162
  Returns:
157
163
  The API response parsed as a JSON-compatible object, typically a dictionary containing group information.
158
164
  """
159
165
  url = f"{self.base_url}/groups"
160
- query_params = {k: v for k, v in [('metadata', metadata), ('pageSize', pageSize), ('pageToken', pageToken), ('fields', fields)] if v is not None}
166
+ query_params = {
167
+ k: v
168
+ for k, v in [
169
+ ("metadata", metadata),
170
+ ("pageSize", pageSize),
171
+ ("pageToken", pageToken),
172
+ ("fields", fields),
173
+ ]
174
+ if v is not None
175
+ }
161
176
  response = self._get(url, params=query_params)
162
177
  response.raise_for_status()
163
178
  return response.json()
164
179
 
165
- def post_groups(self, title, members=None, parent=None, avatar=None, metadata=None) -> Any:
180
+ def post_groups(
181
+ self, title, members=None, parent=None, avatar=None, metadata=None
182
+ ) -> Any:
166
183
  """
167
184
  Creates a new group with the specified title and optional details, sending a POST request to the groups endpoint.
168
-
185
+
169
186
  Args:
170
187
  title: str. The name of the group to create. This parameter is required.
171
188
  members: Optional[list]. List of member identifiers to include in the group.
172
189
  parent: Optional[str]. Identifier of the parent group, if applicable.
173
190
  avatar: Optional[Any]. Avatar image or data to associate with the group.
174
191
  metadata: Optional[dict]. Additional metadata or custom fields for the group.
175
-
192
+
176
193
  Returns:
177
194
  Any. A dictionary containing the response data representing the created group.
178
195
  """
179
196
  if title is None:
180
197
  raise ValueError("Missing required parameter 'title'")
181
198
  request_body = {
182
- 'title': title,
183
- 'members': members,
184
- 'parent': parent,
185
- 'avatar': avatar,
186
- 'metadata': metadata,
199
+ "title": title,
200
+ "members": members,
201
+ "parent": parent,
202
+ "avatar": avatar,
203
+ "metadata": metadata,
187
204
  }
188
205
  request_body = {k: v for k, v in request_body.items() if v is not None}
189
206
  url = f"{self.base_url}/groups"
@@ -195,26 +212,37 @@ class WrikeApp(APIApplication):
195
212
  def get_groups_by_groupid(self, groupId, fields=None) -> Any:
196
213
  """
197
214
  Retrieves details for a specific group by its group ID, optionally returning only specified fields.
198
-
215
+
199
216
  Args:
200
217
  groupId: str. The unique identifier of the group to retrieve. Must not be None.
201
218
  fields: Optional[str]. A comma-separated list of fields to include in the response. If None, all fields are returned.
202
-
219
+
203
220
  Returns:
204
221
  dict. A dictionary containing the group details as returned by the API.
205
222
  """
206
223
  if groupId is None:
207
224
  raise ValueError("Missing required parameter 'groupId'")
208
225
  url = f"{self.base_url}/groups/{groupId}"
209
- query_params = {k: v for k, v in [('fields', fields)] if v is not None}
226
+ query_params = {k: v for k, v in [("fields", fields)] if v is not None}
210
227
  response = self._get(url, params=query_params)
211
228
  response.raise_for_status()
212
229
  return response.json()
213
230
 
214
- def put_groups_by_groupid(self, groupId, title=None, addMembers=None, removeMembers=None, addInvitations=None, removeInvitations=None, parent=None, avatar=None, metadata=None) -> Any:
231
+ def put_groups_by_groupid(
232
+ self,
233
+ groupId,
234
+ title=None,
235
+ addMembers=None,
236
+ removeMembers=None,
237
+ addInvitations=None,
238
+ removeInvitations=None,
239
+ parent=None,
240
+ avatar=None,
241
+ metadata=None,
242
+ ) -> Any:
215
243
  """
216
244
  Updates an existing group identified by groupId with new properties and membership changes via a PUT request.
217
-
245
+
218
246
  Args:
219
247
  groupId: str. The unique identifier of the group to update. Required.
220
248
  title: str, optional. The new title for the group.
@@ -225,21 +253,21 @@ class WrikeApp(APIApplication):
225
253
  parent: str or None, optional. The new parent group identifier, if setting or changing the hierarchy.
226
254
  avatar: str or None, optional. New avatar for the group, typically a URL or encoded image data.
227
255
  metadata: dict or None, optional. Additional metadata to attach to the group.
228
-
256
+
229
257
  Returns:
230
258
  dict. The JSON response from the server containing the updated group details.
231
259
  """
232
260
  if groupId is None:
233
261
  raise ValueError("Missing required parameter 'groupId'")
234
262
  request_body = {
235
- 'title': title,
236
- 'addMembers': addMembers,
237
- 'removeMembers': removeMembers,
238
- 'addInvitations': addInvitations,
239
- 'removeInvitations': removeInvitations,
240
- 'parent': parent,
241
- 'avatar': avatar,
242
- 'metadata': metadata,
263
+ "title": title,
264
+ "addMembers": addMembers,
265
+ "removeMembers": removeMembers,
266
+ "addInvitations": addInvitations,
267
+ "removeInvitations": removeInvitations,
268
+ "parent": parent,
269
+ "avatar": avatar,
270
+ "metadata": metadata,
243
271
  }
244
272
  request_body = {k: v for k, v in request_body.items() if v is not None}
245
273
  url = f"{self.base_url}/groups/{groupId}"
@@ -251,10 +279,10 @@ class WrikeApp(APIApplication):
251
279
  def delete_groups_by_groupid(self, groupId) -> Any:
252
280
  """
253
281
  Deletes a group resource identified by the provided groupId using an HTTP DELETE request.
254
-
282
+
255
283
  Args:
256
284
  groupId: str. The unique identifier of the group to be deleted. Must not be None.
257
-
285
+
258
286
  Returns:
259
287
  Any. The JSON-decoded response from the API after deleting the group.
260
288
  """
@@ -269,17 +297,17 @@ class WrikeApp(APIApplication):
269
297
  def put_groups_bulk(self, members) -> Any:
270
298
  """
271
299
  Updates multiple group memberships in bulk by sending a PUT request with the given members data.
272
-
300
+
273
301
  Args:
274
302
  members: List or collection of member data to be processed in bulk. Must not be None.
275
-
303
+
276
304
  Returns:
277
305
  Parsed JSON response from the API containing the result of the bulk update operation.
278
306
  """
279
307
  if members is None:
280
308
  raise ValueError("Missing required parameter 'members'")
281
309
  request_body = {
282
- 'members': members,
310
+ "members": members,
283
311
  }
284
312
  request_body = {k: v for k, v in request_body.items() if v is not None}
285
313
  url = f"{self.base_url}/groups_bulk"
@@ -288,13 +316,15 @@ class WrikeApp(APIApplication):
288
316
  response.raise_for_status()
289
317
  return response.json()
290
318
 
291
- def get_invitations(self, ) -> Any:
319
+ def get_invitations(
320
+ self,
321
+ ) -> Any:
292
322
  """
293
323
  Retrieves all invitations from the server using a GET request.
294
-
324
+
295
325
  Args:
296
326
  None: This function takes no arguments
297
-
327
+
298
328
  Returns:
299
329
  The JSON-decoded response containing invitation data from the server.
300
330
  """
@@ -304,10 +334,20 @@ class WrikeApp(APIApplication):
304
334
  response.raise_for_status()
305
335
  return response.json()
306
336
 
307
- def post_invitations(self, email, firstName=None, lastName=None, role=None, external=None, subject=None, message=None, userTypeId=None) -> Any:
337
+ def post_invitations(
338
+ self,
339
+ email,
340
+ firstName=None,
341
+ lastName=None,
342
+ role=None,
343
+ external=None,
344
+ subject=None,
345
+ message=None,
346
+ userTypeId=None,
347
+ ) -> Any:
308
348
  """
309
349
  Sends an invitation email to a user with optional details such as name, role, and custom message.
310
-
350
+
311
351
  Args:
312
352
  email: str. The email address of the user to invite. Required.
313
353
  firstName: str, optional. The first name of the invitee.
@@ -317,21 +357,21 @@ class WrikeApp(APIApplication):
317
357
  subject: str, optional. Custom subject line for the invitation email.
318
358
  message: str, optional. Custom message to include in the invitation.
319
359
  userTypeId: Any, optional. The user type identifier to associate with the invitation.
320
-
360
+
321
361
  Returns:
322
362
  Any. The server's parsed JSON response to the invitation request.
323
363
  """
324
364
  if email is None:
325
365
  raise ValueError("Missing required parameter 'email'")
326
366
  request_body = {
327
- 'email': email,
328
- 'firstName': firstName,
329
- 'lastName': lastName,
330
- 'role': role,
331
- 'external': external,
332
- 'subject': subject,
333
- 'message': message,
334
- 'userTypeId': userTypeId,
367
+ "email": email,
368
+ "firstName": firstName,
369
+ "lastName": lastName,
370
+ "role": role,
371
+ "external": external,
372
+ "subject": subject,
373
+ "message": message,
374
+ "userTypeId": userTypeId,
335
375
  }
336
376
  request_body = {k: v for k, v in request_body.items() if v is not None}
337
377
  url = f"{self.base_url}/invitations"
@@ -340,27 +380,29 @@ class WrikeApp(APIApplication):
340
380
  response.raise_for_status()
341
381
  return response.json()
342
382
 
343
- def put_invitations_by_invitationid(self, invitationId, resend=None, role=None, external=None, userTypeId=None) -> Any:
383
+ def put_invitations_by_invitationid(
384
+ self, invitationId, resend=None, role=None, external=None, userTypeId=None
385
+ ) -> Any:
344
386
  """
345
387
  Updates an existing invitation by invitation ID with optional fields such as resend, role, external, and user type ID.
346
-
388
+
347
389
  Args:
348
390
  invitationId: The unique identifier of the invitation to update. Required.
349
391
  resend: Optional; whether to resend the invitation (boolean or compatible type).
350
392
  role: Optional; the role to assign with the invitation (string or compatible type).
351
393
  external: Optional; indicates if the invitation is for an external recipient (boolean or compatible type).
352
394
  userTypeId: Optional; the user type identifier to associate with the invitation (string, int, or compatible type).
353
-
395
+
354
396
  Returns:
355
397
  A dictionary representing the updated invitation resource as returned by the API.
356
398
  """
357
399
  if invitationId is None:
358
400
  raise ValueError("Missing required parameter 'invitationId'")
359
401
  request_body = {
360
- 'resend': resend,
361
- 'role': role,
362
- 'external': external,
363
- 'userTypeId': userTypeId,
402
+ "resend": resend,
403
+ "role": role,
404
+ "external": external,
405
+ "userTypeId": userTypeId,
364
406
  }
365
407
  request_body = {k: v for k, v in request_body.items() if v is not None}
366
408
  url = f"{self.base_url}/invitations/{invitationId}"
@@ -372,10 +414,10 @@ class WrikeApp(APIApplication):
372
414
  def delete_invitations_by_invitationid(self, invitationId) -> Any:
373
415
  """
374
416
  Deletes an invitation specified by its invitation ID.
375
-
417
+
376
418
  Args:
377
419
  invitationId: The unique identifier of the invitation to delete.
378
-
420
+
379
421
  Returns:
380
422
  A JSON-decoded response from the API after deleting the invitation.
381
423
  """
@@ -390,15 +432,15 @@ class WrikeApp(APIApplication):
390
432
  def get_a_ccount(self, fields=None) -> Any:
391
433
  """
392
434
  Retrieves account information from the API, optionally including only specified fields.
393
-
435
+
394
436
  Args:
395
437
  fields: Optional[str]. A comma-separated string of field names to include in the response. If None, all default fields are returned.
396
-
438
+
397
439
  Returns:
398
440
  Any. The JSON-decoded response from the API containing account details.
399
441
  """
400
442
  url = f"{self.base_url}/account"
401
- query_params = {k: v for k, v in [('fields', fields)] if v is not None}
443
+ query_params = {k: v for k, v in [("fields", fields)] if v is not None}
402
444
  response = self._get(url, params=query_params)
403
445
  response.raise_for_status()
404
446
  return response.json()
@@ -406,15 +448,15 @@ class WrikeApp(APIApplication):
406
448
  def put_a_ccount(self, metadata=None) -> Any:
407
449
  """
408
450
  Sends a PUT request to update or create an account with the provided metadata and returns the server response as a JSON object.
409
-
451
+
410
452
  Args:
411
453
  metadata: Optional metadata to associate with the account. If provided, this will be included in the request body. The format should match the server's expected schema. Defaults to None.
412
-
454
+
413
455
  Returns:
414
456
  A JSON-decoded Python object representing the response from the account API endpoint.
415
457
  """
416
458
  request_body = {
417
- 'metadata': metadata,
459
+ "metadata": metadata,
418
460
  }
419
461
  request_body = {k: v for k, v in request_body.items() if v is not None}
420
462
  url = f"{self.base_url}/account"
@@ -423,13 +465,15 @@ class WrikeApp(APIApplication):
423
465
  response.raise_for_status()
424
466
  return response.json()
425
467
 
426
- def get_workflows(self, ) -> Any:
468
+ def get_workflows(
469
+ self,
470
+ ) -> Any:
427
471
  """
428
472
  Retrieves all workflows from the server using a GET request.
429
-
473
+
430
474
  Args:
431
475
  None: This function takes no arguments
432
-
476
+
433
477
  Returns:
434
478
  The parsed JSON response containing the list of workflows.
435
479
  """
@@ -442,48 +486,54 @@ class WrikeApp(APIApplication):
442
486
  def post_workflows(self, name=None, request_body=None) -> Any:
443
487
  """
444
488
  Creates a new workflow by sending a POST request to the workflows endpoint.
445
-
489
+
446
490
  Args:
447
491
  name: Optional; the name of the workflow to create. Included as a query parameter if provided.
448
492
  request_body: Optional; the request body containing workflow details, provided as the data payload for the POST request.
449
-
493
+
450
494
  Returns:
451
495
  The JSON-decoded response from the server containing details of the created workflow.
452
496
  """
453
497
  url = f"{self.base_url}/workflows"
454
- query_params = {k: v for k, v in [('name', name)] if v is not None}
498
+ query_params = {k: v for k, v in [("name", name)] if v is not None}
455
499
  response = self._post(url, data=request_body, params=query_params)
456
500
  response.raise_for_status()
457
501
  return response.json()
458
502
 
459
- def put_workflows_by_workflowid(self, workflowId, name=None, hidden=None, request_body=None) -> Any:
503
+ def put_workflows_by_workflowid(
504
+ self, workflowId, name=None, hidden=None, request_body=None
505
+ ) -> Any:
460
506
  """
461
507
  Updates an existing workflow by workflow ID with optional name, hidden status, and request body data.
462
-
508
+
463
509
  Args:
464
510
  workflowId: The unique identifier of the workflow to update. Required.
465
511
  name: An optional new name for the workflow. If provided, updates the workflow's name.
466
512
  hidden: An optional boolean indicating whether the workflow should be hidden.
467
513
  request_body: Optional data to include in the request body when updating the workflow.
468
-
514
+
469
515
  Returns:
470
516
  The updated workflow as a JSON-decoded Python object.
471
517
  """
472
518
  if workflowId is None:
473
519
  raise ValueError("Missing required parameter 'workflowId'")
474
520
  url = f"{self.base_url}/workflows/{workflowId}"
475
- query_params = {k: v for k, v in [('name', name), ('hidden', hidden)] if v is not None}
521
+ query_params = {
522
+ k: v for k, v in [("name", name), ("hidden", hidden)] if v is not None
523
+ }
476
524
  response = self._put(url, data=request_body, params=query_params)
477
525
  response.raise_for_status()
478
526
  return response.json()
479
527
 
480
- def get_customfields(self, ) -> Any:
528
+ def get_customfields(
529
+ self,
530
+ ) -> Any:
481
531
  """
482
532
  Retrieves all custom fields from the API and returns them as a parsed JSON object.
483
-
533
+
484
534
  Args:
485
535
  None: This function takes no arguments
486
-
536
+
487
537
  Returns:
488
538
  The JSON-decoded response content containing the list of custom fields, typically as a Python dict or list, depending on the API response structure.
489
539
  """
@@ -493,10 +543,19 @@ class WrikeApp(APIApplication):
493
543
  response.raise_for_status()
494
544
  return response.json()
495
545
 
496
- def post_customfields(self, title, type, spaceId=None, sharing=None, shareds=None, settings=None, request_body=None) -> Any:
546
+ def post_customfields(
547
+ self,
548
+ title,
549
+ type,
550
+ spaceId=None,
551
+ sharing=None,
552
+ shareds=None,
553
+ settings=None,
554
+ request_body=None,
555
+ ) -> Any:
497
556
  """
498
557
  Creates a custom field by sending a POST request with the specified parameters to the customfields endpoint and returns the created field's data.
499
-
558
+
500
559
  Args:
501
560
  title: str. The name of the custom field to be created. Required.
502
561
  type: str. The type of the custom field to be created. Required.
@@ -505,7 +564,7 @@ class WrikeApp(APIApplication):
505
564
  shareds: Optional[str]. Specifies users or groups the custom field is shared with.
506
565
  settings: Optional[str]. Additional settings for the custom field in string or JSON format.
507
566
  request_body: Optional[Any]. The request body payload to include in the POST request.
508
-
567
+
509
568
  Returns:
510
569
  Any. The JSON response data representing the created custom field.
511
570
  """
@@ -514,7 +573,18 @@ class WrikeApp(APIApplication):
514
573
  if type is None:
515
574
  raise ValueError("Missing required parameter 'type'")
516
575
  url = f"{self.base_url}/customfields"
517
- query_params = {k: v for k, v in [('title', title), ('type', type), ('spaceId', spaceId), ('sharing', sharing), ('shareds', shareds), ('settings', settings)] if v is not None}
576
+ query_params = {
577
+ k: v
578
+ for k, v in [
579
+ ("title", title),
580
+ ("type", type),
581
+ ("spaceId", spaceId),
582
+ ("sharing", sharing),
583
+ ("shareds", shareds),
584
+ ("settings", settings),
585
+ ]
586
+ if v is not None
587
+ }
518
588
  response = self._post(url, data=request_body, params=query_params)
519
589
  response.raise_for_status()
520
590
  return response.json()
@@ -522,10 +592,10 @@ class WrikeApp(APIApplication):
522
592
  def get_customfields_by_customfieldid(self, customFieldId) -> Any:
523
593
  """
524
594
  Retrieves details for a custom field by its unique identifier from the API.
525
-
595
+
526
596
  Args:
527
597
  customFieldId: The unique identifier of the custom field to retrieve.
528
-
598
+
529
599
  Returns:
530
600
  A JSON-decoded response containing the custom field details.
531
601
  """
@@ -537,10 +607,23 @@ class WrikeApp(APIApplication):
537
607
  response.raise_for_status()
538
608
  return response.json()
539
609
 
540
- def put_customfields_by_customfieldid(self, customFieldId, title=None, type=None, changeScope=None, spaceId=None, sharing=None, addShareds=None, removeShareds=None, settings=None, addMirrors=None, removeMirrors=None) -> Any:
610
+ def put_customfields_by_customfieldid(
611
+ self,
612
+ customFieldId,
613
+ title=None,
614
+ type=None,
615
+ changeScope=None,
616
+ spaceId=None,
617
+ sharing=None,
618
+ addShareds=None,
619
+ removeShareds=None,
620
+ settings=None,
621
+ addMirrors=None,
622
+ removeMirrors=None,
623
+ ) -> Any:
541
624
  """
542
625
  Updates a custom field specified by its ID with the provided parameters using an HTTP PUT request.
543
-
626
+
544
627
  Args:
545
628
  customFieldId: The unique identifier of the custom field to update.
546
629
  title: Optional new title for the custom field (default is None).
@@ -553,14 +636,29 @@ class WrikeApp(APIApplication):
553
636
  settings: Optional dictionary with additional settings for the custom field (default is None).
554
637
  addMirrors: Optional list of entities to add as mirrors (default is None).
555
638
  removeMirrors: Optional list of entities to remove as mirrors (default is None).
556
-
639
+
557
640
  Returns:
558
641
  The server response as a JSON-decoded object containing the updated custom field data.
559
642
  """
560
643
  if customFieldId is None:
561
644
  raise ValueError("Missing required parameter 'customFieldId'")
562
645
  url = f"{self.base_url}/customfields/{customFieldId}"
563
- query_params = {k: v for k, v in [('title', title), ('type', type), ('changeScope', changeScope), ('spaceId', spaceId), ('sharing', sharing), ('addShareds', addShareds), ('removeShareds', removeShareds), ('settings', settings), ('addMirrors', addMirrors), ('removeMirrors', removeMirrors)] if v is not None}
646
+ query_params = {
647
+ k: v
648
+ for k, v in [
649
+ ("title", title),
650
+ ("type", type),
651
+ ("changeScope", changeScope),
652
+ ("spaceId", spaceId),
653
+ ("sharing", sharing),
654
+ ("addShareds", addShareds),
655
+ ("removeShareds", removeShareds),
656
+ ("settings", settings),
657
+ ("addMirrors", addMirrors),
658
+ ("removeMirrors", removeMirrors),
659
+ ]
660
+ if v is not None
661
+ }
564
662
  response = self._put(url, data={}, params=query_params)
565
663
  response.raise_for_status()
566
664
  return response.json()
@@ -568,10 +666,10 @@ class WrikeApp(APIApplication):
568
666
  def delete_customfields_by_customfieldid(self, customFieldId) -> Any:
569
667
  """
570
668
  Deletes a custom field resource identified by its custom field ID.
571
-
669
+
572
670
  Args:
573
671
  customFieldId: The unique identifier of the custom field to delete.
574
-
672
+
575
673
  Returns:
576
674
  The server response as a deserialized JSON object, typically containing the result of the delete operation.
577
675
  """
@@ -583,10 +681,26 @@ class WrikeApp(APIApplication):
583
681
  response.raise_for_status()
584
682
  return response.json()
585
683
 
586
- def get_folders(self, permalink=None, descendants=None, metadata=None, customFields=None, updatedDate=None, withInvitations=None, project=None, deleted=None, contractTypes=None, plainTextCustomFields=None, customItemTypes=None, pageSize=None, nextPageToken=None, fields=None) -> Any:
684
+ def get_folders(
685
+ self,
686
+ permalink=None,
687
+ descendants=None,
688
+ metadata=None,
689
+ customFields=None,
690
+ updatedDate=None,
691
+ withInvitations=None,
692
+ project=None,
693
+ deleted=None,
694
+ contractTypes=None,
695
+ plainTextCustomFields=None,
696
+ customItemTypes=None,
697
+ pageSize=None,
698
+ nextPageToken=None,
699
+ fields=None,
700
+ ) -> Any:
587
701
  """
588
702
  Retrieves a list of folders from the API, supporting extensive filtering, pagination, and field selection.
589
-
703
+
590
704
  Args:
591
705
  permalink: str or None. Filter results by folder permalink.
592
706
  descendants: bool or None. If True, include descendant folders in the results.
@@ -602,20 +716,55 @@ class WrikeApp(APIApplication):
602
716
  pageSize: int or None. Maximum number of results to return per page.
603
717
  nextPageToken: str or None. Token to retrieve the next page of results.
604
718
  fields: list or None. Specify which fields to include in the response.
605
-
719
+
606
720
  Returns:
607
721
  dict. The JSON-decoded response from the API containing folder data and related metadata.
608
722
  """
609
723
  url = f"{self.base_url}/folders"
610
- query_params = {k: v for k, v in [('permalink', permalink), ('descendants', descendants), ('metadata', metadata), ('customFields', customFields), ('updatedDate', updatedDate), ('withInvitations', withInvitations), ('project', project), ('deleted', deleted), ('contractTypes', contractTypes), ('plainTextCustomFields', plainTextCustomFields), ('customItemTypes', customItemTypes), ('pageSize', pageSize), ('nextPageToken', nextPageToken), ('fields', fields)] if v is not None}
724
+ query_params = {
725
+ k: v
726
+ for k, v in [
727
+ ("permalink", permalink),
728
+ ("descendants", descendants),
729
+ ("metadata", metadata),
730
+ ("customFields", customFields),
731
+ ("updatedDate", updatedDate),
732
+ ("withInvitations", withInvitations),
733
+ ("project", project),
734
+ ("deleted", deleted),
735
+ ("contractTypes", contractTypes),
736
+ ("plainTextCustomFields", plainTextCustomFields),
737
+ ("customItemTypes", customItemTypes),
738
+ ("pageSize", pageSize),
739
+ ("nextPageToken", nextPageToken),
740
+ ("fields", fields),
741
+ ]
742
+ if v is not None
743
+ }
611
744
  response = self._get(url, params=query_params)
612
745
  response.raise_for_status()
613
746
  return response.json()
614
747
 
615
- def get_folders_by_folderid_folders(self, folderId, permalink=None, descendants=None, metadata=None, customFields=None, updatedDate=None, withInvitations=None, project=None, contractTypes=None, plainTextCustomFields=None, customItemTypes=None, pageSize=None, nextPageToken=None, fields=None) -> Any:
748
+ def get_folders_by_folderid_folders(
749
+ self,
750
+ folderId,
751
+ permalink=None,
752
+ descendants=None,
753
+ metadata=None,
754
+ customFields=None,
755
+ updatedDate=None,
756
+ withInvitations=None,
757
+ project=None,
758
+ contractTypes=None,
759
+ plainTextCustomFields=None,
760
+ customItemTypes=None,
761
+ pageSize=None,
762
+ nextPageToken=None,
763
+ fields=None,
764
+ ) -> Any:
616
765
  """
617
766
  Retrieves subfolders of a specified folder, applying optional filters and pagination parameters.
618
-
767
+
619
768
  Args:
620
769
  folderId: str. The unique identifier of the parent folder whose subfolders are to be retrieved. Required.
621
770
  permalink: str, optional. Filter results to subfolders with the specified permalink.
@@ -631,22 +780,55 @@ class WrikeApp(APIApplication):
631
780
  pageSize: int, optional. Maximum number of subfolders to return per request, for pagination.
632
781
  nextPageToken: str, optional. Token for retrieving the next page of results.
633
782
  fields: str or list, optional. Specify fields to include in the response for each folder.
634
-
783
+
635
784
  Returns:
636
785
  dict. A JSON object containing the list of subfolders matching the criteria, along with pagination tokens and any requested metadata.
637
786
  """
638
787
  if folderId is None:
639
788
  raise ValueError("Missing required parameter 'folderId'")
640
789
  url = f"{self.base_url}/folders/{folderId}/folders"
641
- query_params = {k: v for k, v in [('permalink', permalink), ('descendants', descendants), ('metadata', metadata), ('customFields', customFields), ('updatedDate', updatedDate), ('withInvitations', withInvitations), ('project', project), ('contractTypes', contractTypes), ('plainTextCustomFields', plainTextCustomFields), ('customItemTypes', customItemTypes), ('pageSize', pageSize), ('nextPageToken', nextPageToken), ('fields', fields)] if v is not None}
790
+ query_params = {
791
+ k: v
792
+ for k, v in [
793
+ ("permalink", permalink),
794
+ ("descendants", descendants),
795
+ ("metadata", metadata),
796
+ ("customFields", customFields),
797
+ ("updatedDate", updatedDate),
798
+ ("withInvitations", withInvitations),
799
+ ("project", project),
800
+ ("contractTypes", contractTypes),
801
+ ("plainTextCustomFields", plainTextCustomFields),
802
+ ("customItemTypes", customItemTypes),
803
+ ("pageSize", pageSize),
804
+ ("nextPageToken", nextPageToken),
805
+ ("fields", fields),
806
+ ]
807
+ if v is not None
808
+ }
642
809
  response = self._get(url, params=query_params)
643
810
  response.raise_for_status()
644
811
  return response.json()
645
812
 
646
- def post_folders_by_folderid_folders(self, folderId, title, description=None, shareds=None, metadata=None, customFields=None, customColumns=None, project=None, userAccessRoles=None, withInvitations=None, customItemTypeId=None, plainTextCustomFields=None, fields=None) -> Any:
813
+ def post_folders_by_folderid_folders(
814
+ self,
815
+ folderId,
816
+ title,
817
+ description=None,
818
+ shareds=None,
819
+ metadata=None,
820
+ customFields=None,
821
+ customColumns=None,
822
+ project=None,
823
+ userAccessRoles=None,
824
+ withInvitations=None,
825
+ customItemTypeId=None,
826
+ plainTextCustomFields=None,
827
+ fields=None,
828
+ ) -> Any:
647
829
  """
648
830
  Creates a new subfolder within a specified folder by folder ID, with configurable attributes such as title, description, sharing, metadata, and permissions.
649
-
831
+
650
832
  Args:
651
833
  folderId: str. The ID of the parent folder in which to create the new subfolder. Required.
652
834
  title: str. The title of the new subfolder. Required.
@@ -661,7 +843,7 @@ class WrikeApp(APIApplication):
661
843
  customItemTypeId: str or None. Optional custom item type identifier for the subfolder.
662
844
  plainTextCustomFields: dict or None. Optional plain text custom fields to set for the subfolder.
663
845
  fields: list or None. Optional list of specific fields to include in the response.
664
-
846
+
665
847
  Returns:
666
848
  dict. The newly created subfolder object as returned by the API.
667
849
  """
@@ -670,18 +852,18 @@ class WrikeApp(APIApplication):
670
852
  if title is None:
671
853
  raise ValueError("Missing required parameter 'title'")
672
854
  request_body = {
673
- 'title': title,
674
- 'description': description,
675
- 'shareds': shareds,
676
- 'metadata': metadata,
677
- 'customFields': customFields,
678
- 'customColumns': customColumns,
679
- 'project': project,
680
- 'userAccessRoles': userAccessRoles,
681
- 'withInvitations': withInvitations,
682
- 'customItemTypeId': customItemTypeId,
683
- 'plainTextCustomFields': plainTextCustomFields,
684
- 'fields': fields,
855
+ "title": title,
856
+ "description": description,
857
+ "shareds": shareds,
858
+ "metadata": metadata,
859
+ "customFields": customFields,
860
+ "customColumns": customColumns,
861
+ "project": project,
862
+ "userAccessRoles": userAccessRoles,
863
+ "withInvitations": withInvitations,
864
+ "customItemTypeId": customItemTypeId,
865
+ "plainTextCustomFields": plainTextCustomFields,
866
+ "fields": fields,
685
867
  }
686
868
  request_body = {k: v for k, v in request_body.items() if v is not None}
687
869
  url = f"{self.base_url}/folders/{folderId}/folders"
@@ -693,10 +875,10 @@ class WrikeApp(APIApplication):
693
875
  def delete_folders_by_folderid(self, folderId) -> Any:
694
876
  """
695
877
  Deletes a folder resource identified by its folder ID via an HTTP DELETE request.
696
-
878
+
697
879
  Args:
698
880
  folderId: The unique identifier of the folder to delete. Must not be None.
699
-
881
+
700
882
  Returns:
701
883
  The parsed JSON response from the server if the deletion is successful.
702
884
  """
@@ -708,10 +890,31 @@ class WrikeApp(APIApplication):
708
890
  response.raise_for_status()
709
891
  return response.json()
710
892
 
711
- def put_folders_by_folderid(self, folderId, title=None, description=None, addParents=None, removeParents=None, addShareds=None, removeShareds=None, metadata=None, restore=None, customFields=None, customColumns=None, clearCustomColumns=None, project=None, addAccessRoles=None, removeAccessRoles=None, withInvitations=None, convertToCustomItemType=None, plainTextCustomFields=None, fields=None) -> Any:
893
+ def put_folders_by_folderid(
894
+ self,
895
+ folderId,
896
+ title=None,
897
+ description=None,
898
+ addParents=None,
899
+ removeParents=None,
900
+ addShareds=None,
901
+ removeShareds=None,
902
+ metadata=None,
903
+ restore=None,
904
+ customFields=None,
905
+ customColumns=None,
906
+ clearCustomColumns=None,
907
+ project=None,
908
+ addAccessRoles=None,
909
+ removeAccessRoles=None,
910
+ withInvitations=None,
911
+ convertToCustomItemType=None,
912
+ plainTextCustomFields=None,
913
+ fields=None,
914
+ ) -> Any:
712
915
  """
713
916
  Updates a folder's properties and relationships by folder ID using a PUT request.
714
-
917
+
715
918
  Args:
716
919
  folderId: str. The unique identifier of the folder to update. Required.
717
920
  title: str, optional. The new title for the folder.
@@ -732,31 +935,31 @@ class WrikeApp(APIApplication):
732
935
  convertToCustomItemType: str, optional. Converts the folder to a specific custom item type.
733
936
  plainTextCustomFields: dict, optional. Plain text fields to update.
734
937
  fields: str or list, optional. Specific fields to include in the response.
735
-
938
+
736
939
  Returns:
737
940
  dict. The JSON response containing updated folder information from the API.
738
941
  """
739
942
  if folderId is None:
740
943
  raise ValueError("Missing required parameter 'folderId'")
741
944
  request_body = {
742
- 'title': title,
743
- 'description': description,
744
- 'addParents': addParents,
745
- 'removeParents': removeParents,
746
- 'addShareds': addShareds,
747
- 'removeShareds': removeShareds,
748
- 'metadata': metadata,
749
- 'restore': restore,
750
- 'customFields': customFields,
751
- 'customColumns': customColumns,
752
- 'clearCustomColumns': clearCustomColumns,
753
- 'project': project,
754
- 'addAccessRoles': addAccessRoles,
755
- 'removeAccessRoles': removeAccessRoles,
756
- 'withInvitations': withInvitations,
757
- 'convertToCustomItemType': convertToCustomItemType,
758
- 'plainTextCustomFields': plainTextCustomFields,
759
- 'fields': fields,
945
+ "title": title,
946
+ "description": description,
947
+ "addParents": addParents,
948
+ "removeParents": removeParents,
949
+ "addShareds": addShareds,
950
+ "removeShareds": removeShareds,
951
+ "metadata": metadata,
952
+ "restore": restore,
953
+ "customFields": customFields,
954
+ "customColumns": customColumns,
955
+ "clearCustomColumns": clearCustomColumns,
956
+ "project": project,
957
+ "addAccessRoles": addAccessRoles,
958
+ "removeAccessRoles": removeAccessRoles,
959
+ "withInvitations": withInvitations,
960
+ "convertToCustomItemType": convertToCustomItemType,
961
+ "plainTextCustomFields": plainTextCustomFields,
962
+ "fields": fields,
760
963
  }
761
964
  request_body = {k: v for k, v in request_body.items() if v is not None}
762
965
  url = f"{self.base_url}/folders/{folderId}"
@@ -765,10 +968,42 @@ class WrikeApp(APIApplication):
765
968
  response.raise_for_status()
766
969
  return response.json()
767
970
 
768
- def get_tasks(self, descendants=None, title=None, status=None, importance=None, startDate=None, dueDate=None, scheduledDate=None, createdDate=None, updatedDate=None, completedDate=None, authors=None, responsibles=None, responsiblePlaceholders=None, permalink=None, type=None, limit=None, sortField=None, sortOrder=None, subTasks=None, pageSize=None, nextPageToken=None, metadata=None, customField=None, customFields=None, customStatuses=None, withInvitations=None, billingTypes=None, plainTextCustomFields=None, customItemTypes=None, fields=None) -> Any:
971
+ def get_tasks(
972
+ self,
973
+ descendants=None,
974
+ title=None,
975
+ status=None,
976
+ importance=None,
977
+ startDate=None,
978
+ dueDate=None,
979
+ scheduledDate=None,
980
+ createdDate=None,
981
+ updatedDate=None,
982
+ completedDate=None,
983
+ authors=None,
984
+ responsibles=None,
985
+ responsiblePlaceholders=None,
986
+ permalink=None,
987
+ type=None,
988
+ limit=None,
989
+ sortField=None,
990
+ sortOrder=None,
991
+ subTasks=None,
992
+ pageSize=None,
993
+ nextPageToken=None,
994
+ metadata=None,
995
+ customField=None,
996
+ customFields=None,
997
+ customStatuses=None,
998
+ withInvitations=None,
999
+ billingTypes=None,
1000
+ plainTextCustomFields=None,
1001
+ customItemTypes=None,
1002
+ fields=None,
1003
+ ) -> Any:
769
1004
  """
770
1005
  Retrieves tasks from the API with optional filtering, sorting, pagination, and field selection parameters.
771
-
1006
+
772
1007
  Args:
773
1008
  descendants: Optional; filter tasks by descendant items or folders.
774
1009
  title: Optional; filter tasks by title.
@@ -800,12 +1035,47 @@ class WrikeApp(APIApplication):
800
1035
  plainTextCustomFields: Optional; specify if custom fields should be plain text.
801
1036
  customItemTypes: Optional; filter by custom item types.
802
1037
  fields: Optional; select specific fields to include in the result.
803
-
1038
+
804
1039
  Returns:
805
1040
  The JSON-decoded API response containing a list of tasks and related metadata.
806
1041
  """
807
1042
  url = f"{self.base_url}/tasks"
808
- query_params = {k: v for k, v in [('descendants', descendants), ('title', title), ('status', status), ('importance', importance), ('startDate', startDate), ('dueDate', dueDate), ('scheduledDate', scheduledDate), ('createdDate', createdDate), ('updatedDate', updatedDate), ('completedDate', completedDate), ('authors', authors), ('responsibles', responsibles), ('responsiblePlaceholders', responsiblePlaceholders), ('permalink', permalink), ('type', type), ('limit', limit), ('sortField', sortField), ('sortOrder', sortOrder), ('subTasks', subTasks), ('pageSize', pageSize), ('nextPageToken', nextPageToken), ('metadata', metadata), ('customField', customField), ('customFields', customFields), ('customStatuses', customStatuses), ('withInvitations', withInvitations), ('billingTypes', billingTypes), ('plainTextCustomFields', plainTextCustomFields), ('customItemTypes', customItemTypes), ('fields', fields)] if v is not None}
1043
+ query_params = {
1044
+ k: v
1045
+ for k, v in [
1046
+ ("descendants", descendants),
1047
+ ("title", title),
1048
+ ("status", status),
1049
+ ("importance", importance),
1050
+ ("startDate", startDate),
1051
+ ("dueDate", dueDate),
1052
+ ("scheduledDate", scheduledDate),
1053
+ ("createdDate", createdDate),
1054
+ ("updatedDate", updatedDate),
1055
+ ("completedDate", completedDate),
1056
+ ("authors", authors),
1057
+ ("responsibles", responsibles),
1058
+ ("responsiblePlaceholders", responsiblePlaceholders),
1059
+ ("permalink", permalink),
1060
+ ("type", type),
1061
+ ("limit", limit),
1062
+ ("sortField", sortField),
1063
+ ("sortOrder", sortOrder),
1064
+ ("subTasks", subTasks),
1065
+ ("pageSize", pageSize),
1066
+ ("nextPageToken", nextPageToken),
1067
+ ("metadata", metadata),
1068
+ ("customField", customField),
1069
+ ("customFields", customFields),
1070
+ ("customStatuses", customStatuses),
1071
+ ("withInvitations", withInvitations),
1072
+ ("billingTypes", billingTypes),
1073
+ ("plainTextCustomFields", plainTextCustomFields),
1074
+ ("customItemTypes", customItemTypes),
1075
+ ("fields", fields),
1076
+ ]
1077
+ if v is not None
1078
+ }
809
1079
  response = self._get(url, params=query_params)
810
1080
  response.raise_for_status()
811
1081
  return response.json()
@@ -813,26 +1083,58 @@ class WrikeApp(APIApplication):
813
1083
  def get_tasks_by_taskid(self, taskId, fields=None) -> Any:
814
1084
  """
815
1085
  Retrieves a task by its ID from the remote service, optionally returning only specified fields.
816
-
1086
+
817
1087
  Args:
818
1088
  taskId: The unique identifier of the task to retrieve.
819
1089
  fields: Optional. A comma-separated string specifying which fields to include in the response. If None, all available fields are returned.
820
-
1090
+
821
1091
  Returns:
822
1092
  The JSON-decoded response data containing task details, as returned by the remote API.
823
1093
  """
824
1094
  if taskId is None:
825
1095
  raise ValueError("Missing required parameter 'taskId'")
826
1096
  url = f"{self.base_url}/tasks/{taskId}"
827
- query_params = {k: v for k, v in [('fields', fields)] if v is not None}
1097
+ query_params = {k: v for k, v in [("fields", fields)] if v is not None}
828
1098
  response = self._get(url, params=query_params)
829
1099
  response.raise_for_status()
830
1100
  return response.json()
831
1101
 
832
- def put_tasks_by_taskid(self, taskId, title=None, description=None, status=None, importance=None, dates=None, addParents=None, removeParents=None, addShareds=None, removeShareds=None, addResponsibles=None, removeResponsibles=None, addResponsiblePlaceholders=None, removeResponsiblePlaceholders=None, addFollowers=None, follow=None, priorityBefore=None, priorityAfter=None, addSuperTasks=None, removeSuperTasks=None, metadata=None, customFields=None, customStatus=None, restore=None, effortAllocation=None, billingType=None, withInvitations=None, convertToCustomItemType=None, plainTextCustomFields=None, fields=None) -> Any:
1102
+ def put_tasks_by_taskid(
1103
+ self,
1104
+ taskId,
1105
+ title=None,
1106
+ description=None,
1107
+ status=None,
1108
+ importance=None,
1109
+ dates=None,
1110
+ addParents=None,
1111
+ removeParents=None,
1112
+ addShareds=None,
1113
+ removeShareds=None,
1114
+ addResponsibles=None,
1115
+ removeResponsibles=None,
1116
+ addResponsiblePlaceholders=None,
1117
+ removeResponsiblePlaceholders=None,
1118
+ addFollowers=None,
1119
+ follow=None,
1120
+ priorityBefore=None,
1121
+ priorityAfter=None,
1122
+ addSuperTasks=None,
1123
+ removeSuperTasks=None,
1124
+ metadata=None,
1125
+ customFields=None,
1126
+ customStatus=None,
1127
+ restore=None,
1128
+ effortAllocation=None,
1129
+ billingType=None,
1130
+ withInvitations=None,
1131
+ convertToCustomItemType=None,
1132
+ plainTextCustomFields=None,
1133
+ fields=None,
1134
+ ) -> Any:
833
1135
  """
834
1136
  Updates the properties and relationships of a task specified by its ID, applying the given changes and returning the updated task data as a JSON object.
835
-
1137
+
836
1138
  Args:
837
1139
  taskId: str. The unique identifier of the task to update. Must not be None.
838
1140
  title: Optional[str]. The new title for the task.
@@ -864,42 +1166,42 @@ class WrikeApp(APIApplication):
864
1166
  convertToCustomItemType: Optional[str]. Identifier to convert the task to a custom item type.
865
1167
  plainTextCustomFields: Optional[dict]. Plain text values for custom fields.
866
1168
  fields: Optional[list]. List of fields to include in the response.
867
-
1169
+
868
1170
  Returns:
869
1171
  dict. The JSON response containing updated task details as returned by the server.
870
1172
  """
871
1173
  if taskId is None:
872
1174
  raise ValueError("Missing required parameter 'taskId'")
873
1175
  request_body = {
874
- 'title': title,
875
- 'description': description,
876
- 'status': status,
877
- 'importance': importance,
878
- 'dates': dates,
879
- 'addParents': addParents,
880
- 'removeParents': removeParents,
881
- 'addShareds': addShareds,
882
- 'removeShareds': removeShareds,
883
- 'addResponsibles': addResponsibles,
884
- 'removeResponsibles': removeResponsibles,
885
- 'addResponsiblePlaceholders': addResponsiblePlaceholders,
886
- 'removeResponsiblePlaceholders': removeResponsiblePlaceholders,
887
- 'addFollowers': addFollowers,
888
- 'follow': follow,
889
- 'priorityBefore': priorityBefore,
890
- 'priorityAfter': priorityAfter,
891
- 'addSuperTasks': addSuperTasks,
892
- 'removeSuperTasks': removeSuperTasks,
893
- 'metadata': metadata,
894
- 'customFields': customFields,
895
- 'customStatus': customStatus,
896
- 'restore': restore,
897
- 'effortAllocation': effortAllocation,
898
- 'billingType': billingType,
899
- 'withInvitations': withInvitations,
900
- 'convertToCustomItemType': convertToCustomItemType,
901
- 'plainTextCustomFields': plainTextCustomFields,
902
- 'fields': fields,
1176
+ "title": title,
1177
+ "description": description,
1178
+ "status": status,
1179
+ "importance": importance,
1180
+ "dates": dates,
1181
+ "addParents": addParents,
1182
+ "removeParents": removeParents,
1183
+ "addShareds": addShareds,
1184
+ "removeShareds": removeShareds,
1185
+ "addResponsibles": addResponsibles,
1186
+ "removeResponsibles": removeResponsibles,
1187
+ "addResponsiblePlaceholders": addResponsiblePlaceholders,
1188
+ "removeResponsiblePlaceholders": removeResponsiblePlaceholders,
1189
+ "addFollowers": addFollowers,
1190
+ "follow": follow,
1191
+ "priorityBefore": priorityBefore,
1192
+ "priorityAfter": priorityAfter,
1193
+ "addSuperTasks": addSuperTasks,
1194
+ "removeSuperTasks": removeSuperTasks,
1195
+ "metadata": metadata,
1196
+ "customFields": customFields,
1197
+ "customStatus": customStatus,
1198
+ "restore": restore,
1199
+ "effortAllocation": effortAllocation,
1200
+ "billingType": billingType,
1201
+ "withInvitations": withInvitations,
1202
+ "convertToCustomItemType": convertToCustomItemType,
1203
+ "plainTextCustomFields": plainTextCustomFields,
1204
+ "fields": fields,
903
1205
  }
904
1206
  request_body = {k: v for k, v in request_body.items() if v is not None}
905
1207
  url = f"{self.base_url}/tasks/{taskId}"
@@ -911,10 +1213,10 @@ class WrikeApp(APIApplication):
911
1213
  def delete_tasks_by_taskid(self, taskId) -> Any:
912
1214
  """
913
1215
  Deletes a task identified by the given task ID via an HTTP DELETE request and returns the response as a JSON object.
914
-
1216
+
915
1217
  Args:
916
1218
  taskId: The unique identifier of the task to be deleted. Must not be None.
917
-
1219
+
918
1220
  Returns:
919
1221
  A JSON object containing the API response to the delete operation.
920
1222
  """
@@ -926,10 +1228,36 @@ class WrikeApp(APIApplication):
926
1228
  response.raise_for_status()
927
1229
  return response.json()
928
1230
 
929
- def post_folders_by_folderid_tasks(self, folderId, title, description=None, status=None, importance=None, dates=None, shareds=None, parents=None, responsibles=None, responsiblePlaceholders=None, followers=None, follow=None, priorityBefore=None, priorityAfter=None, superTasks=None, metadata=None, customFields=None, customStatus=None, effortAllocation=None, billingType=None, withInvitations=None, customItemTypeId=None, plainTextCustomFields=None, fields=None) -> Any:
1231
+ def post_folders_by_folderid_tasks(
1232
+ self,
1233
+ folderId,
1234
+ title,
1235
+ description=None,
1236
+ status=None,
1237
+ importance=None,
1238
+ dates=None,
1239
+ shareds=None,
1240
+ parents=None,
1241
+ responsibles=None,
1242
+ responsiblePlaceholders=None,
1243
+ followers=None,
1244
+ follow=None,
1245
+ priorityBefore=None,
1246
+ priorityAfter=None,
1247
+ superTasks=None,
1248
+ metadata=None,
1249
+ customFields=None,
1250
+ customStatus=None,
1251
+ effortAllocation=None,
1252
+ billingType=None,
1253
+ withInvitations=None,
1254
+ customItemTypeId=None,
1255
+ plainTextCustomFields=None,
1256
+ fields=None,
1257
+ ) -> Any:
930
1258
  """
931
1259
  Creates a new task within a specified folder by folder ID, with configurable attributes such as title, description, status, importance, dates, assigned users, metadata, custom fields, and other options.
932
-
1260
+
933
1261
  Args:
934
1262
  folderId: str or int. The unique identifier of the folder in which to create the new task. Required.
935
1263
  title: str. The title of the task to be created. Required.
@@ -955,7 +1283,7 @@ class WrikeApp(APIApplication):
955
1283
  customItemTypeId: str or int, optional. Custom item type identifier.
956
1284
  plainTextCustomFields: dict or list, optional. Custom fields in plain text format.
957
1285
  fields: list or str, optional. Specifies which fields should be included in the API response.
958
-
1286
+
959
1287
  Returns:
960
1288
  dict. The JSON response from the server containing details of the newly created task.
961
1289
  """
@@ -964,29 +1292,29 @@ class WrikeApp(APIApplication):
964
1292
  if title is None:
965
1293
  raise ValueError("Missing required parameter 'title'")
966
1294
  request_body = {
967
- 'title': title,
968
- 'description': description,
969
- 'status': status,
970
- 'importance': importance,
971
- 'dates': dates,
972
- 'shareds': shareds,
973
- 'parents': parents,
974
- 'responsibles': responsibles,
975
- 'responsiblePlaceholders': responsiblePlaceholders,
976
- 'followers': followers,
977
- 'follow': follow,
978
- 'priorityBefore': priorityBefore,
979
- 'priorityAfter': priorityAfter,
980
- 'superTasks': superTasks,
981
- 'metadata': metadata,
982
- 'customFields': customFields,
983
- 'customStatus': customStatus,
984
- 'effortAllocation': effortAllocation,
985
- 'billingType': billingType,
986
- 'withInvitations': withInvitations,
987
- 'customItemTypeId': customItemTypeId,
988
- 'plainTextCustomFields': plainTextCustomFields,
989
- 'fields': fields,
1295
+ "title": title,
1296
+ "description": description,
1297
+ "status": status,
1298
+ "importance": importance,
1299
+ "dates": dates,
1300
+ "shareds": shareds,
1301
+ "parents": parents,
1302
+ "responsibles": responsibles,
1303
+ "responsiblePlaceholders": responsiblePlaceholders,
1304
+ "followers": followers,
1305
+ "follow": follow,
1306
+ "priorityBefore": priorityBefore,
1307
+ "priorityAfter": priorityAfter,
1308
+ "superTasks": superTasks,
1309
+ "metadata": metadata,
1310
+ "customFields": customFields,
1311
+ "customStatus": customStatus,
1312
+ "effortAllocation": effortAllocation,
1313
+ "billingType": billingType,
1314
+ "withInvitations": withInvitations,
1315
+ "customItemTypeId": customItemTypeId,
1316
+ "plainTextCustomFields": plainTextCustomFields,
1317
+ "fields": fields,
990
1318
  }
991
1319
  request_body = {k: v for k, v in request_body.items() if v is not None}
992
1320
  url = f"{self.base_url}/folders/{folderId}/tasks"
@@ -998,10 +1326,10 @@ class WrikeApp(APIApplication):
998
1326
  def list_tools(self):
999
1327
  """
1000
1328
  Returns a list of references to tool-related instance methods for managing contacts, users, groups, invitations, accounts, workflows, custom fields, folders, and tasks.
1001
-
1329
+
1002
1330
  Args:
1003
1331
  None: This method does not take any arguments.
1004
-
1332
+
1005
1333
  Returns:
1006
1334
  list: A list of method references corresponding to various instance-level API operations for managing organizational entities such as contacts, users, groups, invitations, accounts, workflows, custom fields, folders, and tasks.
1007
1335
  """
@@ -1040,5 +1368,5 @@ class WrikeApp(APIApplication):
1040
1368
  self.get_tasks_by_taskid,
1041
1369
  self.put_tasks_by_taskid,
1042
1370
  self.delete_tasks_by_taskid,
1043
- self.post_folders_by_folderid_tasks
1371
+ self.post_folders_by_folderid_tasks,
1044
1372
  ]