universal-mcp-applications 0.1.30rc2__py3-none-any.whl → 0.1.36rc2__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 (105) hide show
  1. universal_mcp/applications/ahrefs/app.py +52 -198
  2. universal_mcp/applications/airtable/app.py +23 -122
  3. universal_mcp/applications/apollo/app.py +111 -464
  4. universal_mcp/applications/asana/app.py +417 -1567
  5. universal_mcp/applications/aws_s3/app.py +36 -103
  6. universal_mcp/applications/bill/app.py +546 -1957
  7. universal_mcp/applications/box/app.py +1068 -3981
  8. universal_mcp/applications/braze/app.py +364 -1430
  9. universal_mcp/applications/browser_use/app.py +2 -8
  10. universal_mcp/applications/cal_com_v2/app.py +207 -625
  11. universal_mcp/applications/calendly/app.py +61 -200
  12. universal_mcp/applications/canva/app.py +45 -110
  13. universal_mcp/applications/clickup/app.py +207 -674
  14. universal_mcp/applications/coda/app.py +146 -426
  15. universal_mcp/applications/confluence/app.py +310 -1098
  16. universal_mcp/applications/contentful/app.py +36 -151
  17. universal_mcp/applications/crustdata/app.py +28 -107
  18. universal_mcp/applications/dialpad/app.py +283 -756
  19. universal_mcp/applications/digitalocean/app.py +1766 -5777
  20. universal_mcp/applications/domain_checker/app.py +3 -54
  21. universal_mcp/applications/e2b/app.py +14 -64
  22. universal_mcp/applications/elevenlabs/app.py +9 -47
  23. universal_mcp/applications/exa/app.py +6 -17
  24. universal_mcp/applications/falai/app.py +24 -101
  25. universal_mcp/applications/figma/app.py +53 -137
  26. universal_mcp/applications/file_system/app.py +2 -13
  27. universal_mcp/applications/firecrawl/app.py +51 -152
  28. universal_mcp/applications/fireflies/app.py +59 -281
  29. universal_mcp/applications/fpl/app.py +91 -528
  30. universal_mcp/applications/fpl/utils/fixtures.py +15 -49
  31. universal_mcp/applications/fpl/utils/helper.py +25 -89
  32. universal_mcp/applications/fpl/utils/league_utils.py +20 -64
  33. universal_mcp/applications/ghost_content/app.py +52 -161
  34. universal_mcp/applications/github/app.py +19 -56
  35. universal_mcp/applications/gong/app.py +88 -248
  36. universal_mcp/applications/google_calendar/app.py +16 -68
  37. universal_mcp/applications/google_docs/app.py +88 -188
  38. universal_mcp/applications/google_drive/app.py +141 -463
  39. universal_mcp/applications/google_gemini/app.py +12 -64
  40. universal_mcp/applications/google_mail/app.py +28 -157
  41. universal_mcp/applications/google_searchconsole/app.py +15 -48
  42. universal_mcp/applications/google_sheet/app.py +103 -580
  43. universal_mcp/applications/google_sheet/helper.py +10 -37
  44. universal_mcp/applications/hashnode/app.py +57 -269
  45. universal_mcp/applications/heygen/app.py +44 -122
  46. universal_mcp/applications/http_tools/app.py +10 -32
  47. universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
  48. universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
  49. universal_mcp/applications/hubspot/app.py +23 -87
  50. universal_mcp/applications/jira/app.py +2071 -7986
  51. universal_mcp/applications/klaviyo/app.py +494 -1376
  52. universal_mcp/applications/linkedin/README.md +9 -2
  53. universal_mcp/applications/linkedin/app.py +392 -212
  54. universal_mcp/applications/mailchimp/app.py +450 -1605
  55. universal_mcp/applications/markitdown/app.py +8 -20
  56. universal_mcp/applications/miro/app.py +217 -699
  57. universal_mcp/applications/ms_teams/app.py +64 -186
  58. universal_mcp/applications/neon/app.py +86 -192
  59. universal_mcp/applications/notion/app.py +21 -36
  60. universal_mcp/applications/onedrive/app.py +16 -38
  61. universal_mcp/applications/openai/app.py +42 -165
  62. universal_mcp/applications/outlook/app.py +24 -84
  63. universal_mcp/applications/perplexity/app.py +4 -19
  64. universal_mcp/applications/pipedrive/app.py +832 -3142
  65. universal_mcp/applications/posthog/app.py +163 -432
  66. universal_mcp/applications/reddit/app.py +40 -139
  67. universal_mcp/applications/resend/app.py +41 -107
  68. universal_mcp/applications/retell/app.py +14 -41
  69. universal_mcp/applications/rocketlane/app.py +221 -934
  70. universal_mcp/applications/scraper/README.md +7 -4
  71. universal_mcp/applications/scraper/app.py +216 -102
  72. universal_mcp/applications/semanticscholar/app.py +22 -64
  73. universal_mcp/applications/semrush/app.py +43 -77
  74. universal_mcp/applications/sendgrid/app.py +512 -1262
  75. universal_mcp/applications/sentry/app.py +271 -906
  76. universal_mcp/applications/serpapi/app.py +40 -143
  77. universal_mcp/applications/sharepoint/app.py +17 -39
  78. universal_mcp/applications/shopify/app.py +1551 -4287
  79. universal_mcp/applications/shortcut/app.py +155 -417
  80. universal_mcp/applications/slack/app.py +50 -101
  81. universal_mcp/applications/spotify/app.py +126 -325
  82. universal_mcp/applications/supabase/app.py +104 -213
  83. universal_mcp/applications/tavily/app.py +1 -1
  84. universal_mcp/applications/trello/app.py +693 -2656
  85. universal_mcp/applications/twilio/app.py +14 -50
  86. universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
  87. universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
  88. universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
  89. universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
  90. universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
  91. universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
  92. universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
  93. universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
  94. universal_mcp/applications/whatsapp/app.py +35 -186
  95. universal_mcp/applications/whatsapp/audio.py +2 -6
  96. universal_mcp/applications/whatsapp/whatsapp.py +17 -51
  97. universal_mcp/applications/whatsapp_business/app.py +70 -283
  98. universal_mcp/applications/wrike/app.py +45 -118
  99. universal_mcp/applications/yahoo_finance/app.py +19 -65
  100. universal_mcp/applications/youtube/app.py +75 -261
  101. universal_mcp/applications/zenquotes/app.py +2 -2
  102. {universal_mcp_applications-0.1.30rc2.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/METADATA +2 -2
  103. {universal_mcp_applications-0.1.30rc2.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/RECORD +105 -105
  104. {universal_mcp_applications-0.1.30rc2.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/WHEEL +0 -0
  105. {universal_mcp_applications-0.1.30rc2.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/licenses/LICENSE +0 -0
@@ -1,5 +1,4 @@
1
1
  from typing import Any
2
-
3
2
  import httpx
4
3
  from universal_mcp.applications.application import APIApplication
5
4
  from universal_mcp.integrations import Integration
@@ -13,24 +12,15 @@ class ConfluenceApp(APIApplication):
13
12
  def get_base_url(self):
14
13
  headers = self._get_headers()
15
14
  url = "https://api.atlassian.com/oauth/token/accessible-resources"
16
-
17
15
  response = httpx.get(url, headers=headers)
18
16
  response.raise_for_status()
19
17
  resources = response.json()
20
-
21
18
  if not resources:
22
- raise ValueError(
23
- "No accessible Confluence resources found for the provided credentials."
24
- )
25
-
19
+ raise ValueError("No accessible Confluence resources found for the provided credentials.")
26
20
  first_resource = resources[0]
27
21
  resource_id = first_resource.get("id")
28
-
29
22
  if not resource_id:
30
- raise ValueError(
31
- "Could not determine the resource ID from the first accessible resource."
32
- )
33
-
23
+ raise ValueError("Could not determine the resource ID from the first accessible resource.")
34
24
  return f"https://api.atlassian.com/ex/confluence/{resource_id}/api/v2"
35
25
 
36
26
  @property
@@ -50,15 +40,7 @@ class ConfluenceApp(APIApplication):
50
40
  """
51
41
  self._base_url = value
52
42
 
53
- def get_attachments(
54
- self,
55
- sort=None,
56
- cursor=None,
57
- status=None,
58
- mediaType=None,
59
- filename=None,
60
- limit=None,
61
- ) -> dict[str, Any]:
43
+ async def get_attachments(self, sort=None, cursor=None, status=None, mediaType=None, filename=None, limit=None) -> dict[str, Any]:
62
44
  """
63
45
  Retrieves a list of attachments based on specified filters like sort order, cursor position, status, media type, filename, and limit, using the GET method.
64
46
 
@@ -93,7 +75,7 @@ class ConfluenceApp(APIApplication):
93
75
  response.raise_for_status()
94
76
  return response.json()
95
77
 
96
- def get_attachment_by_id(
78
+ async def get_attachment_by_id(
97
79
  self,
98
80
  id,
99
81
  version=None,
@@ -148,7 +130,7 @@ class ConfluenceApp(APIApplication):
148
130
  response.raise_for_status()
149
131
  return response.json()
150
132
 
151
- def delete_attachment(self, id, purge=None) -> Any:
133
+ async def delete_attachment(self, id, purge=None) -> Any:
152
134
  """
153
135
  Deletes the specified attachment using its unique identifier and optionally purges it permanently.
154
136
 
@@ -170,9 +152,7 @@ class ConfluenceApp(APIApplication):
170
152
  response.raise_for_status()
171
153
  return response.json()
172
154
 
173
- def get_attachment_labels(
174
- self, id, prefix=None, sort=None, cursor=None, limit=None
175
- ) -> dict[str, Any]:
155
+ async def get_attachment_labels(self, id, prefix=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
176
156
  """
177
157
  Retrieves labels associated with a specific attachment, optionally filtered by prefix, sorted, and paginated using cursor-based pagination.
178
158
 
@@ -192,21 +172,12 @@ class ConfluenceApp(APIApplication):
192
172
  if id is None:
193
173
  raise ValueError("Missing required parameter 'id'")
194
174
  url = f"{self.base_url}/attachments/{id}/labels"
195
- query_params = {
196
- k: v
197
- for k, v in [
198
- ("prefix", prefix),
199
- ("sort", sort),
200
- ("cursor", cursor),
201
- ("limit", limit),
202
- ]
203
- if v is not None
204
- }
175
+ query_params = {k: v for k, v in [("prefix", prefix), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
205
176
  response = self._get(url, params=query_params)
206
177
  response.raise_for_status()
207
178
  return response.json()
208
179
 
209
- def get_attachment_operations(self, id) -> dict[str, Any]:
180
+ async def get_attachment_operations(self, id) -> dict[str, Any]:
210
181
  """
211
182
  Retrieves operations associated with a specific attachment using its unique identifier.
212
183
 
@@ -227,9 +198,7 @@ class ConfluenceApp(APIApplication):
227
198
  response.raise_for_status()
228
199
  return response.json()
229
200
 
230
- def get_attachment_content_properties(
231
- self, attachment_id, key=None, sort=None, cursor=None, limit=None
232
- ) -> dict[str, Any]:
201
+ async def get_attachment_content_properties(self, attachment_id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
233
202
  """
234
203
  Retrieves properties of a specific attachment identified by `attachment-id`, with optional filtering, sorting, and pagination via query parameters.
235
204
 
@@ -249,23 +218,12 @@ class ConfluenceApp(APIApplication):
249
218
  if attachment_id is None:
250
219
  raise ValueError("Missing required parameter 'attachment-id'")
251
220
  url = f"{self.base_url}/attachments/{attachment_id}/properties"
252
- query_params = {
253
- k: v
254
- for k, v in [
255
- ("key", key),
256
- ("sort", sort),
257
- ("cursor", cursor),
258
- ("limit", limit),
259
- ]
260
- if v is not None
261
- }
221
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
262
222
  response = self._get(url, params=query_params)
263
223
  response.raise_for_status()
264
224
  return response.json()
265
225
 
266
- def create_attachment_property(
267
- self, attachment_id, key=None, value=None
268
- ) -> dict[str, Any]:
226
+ async def create_attachment_property(self, attachment_id, key=None, value=None) -> dict[str, Any]:
269
227
  """
270
228
  Creates a new property for the specified attachment and returns the created property.
271
229
 
@@ -282,10 +240,7 @@ class ConfluenceApp(APIApplication):
282
240
  """
283
241
  if attachment_id is None:
284
242
  raise ValueError("Missing required parameter 'attachment-id'")
285
- request_body = {
286
- "key": key,
287
- "value": value,
288
- }
243
+ request_body = {"key": key, "value": value}
289
244
  request_body = {k: v for k, v in request_body.items() if v is not None}
290
245
  url = f"{self.base_url}/attachments/{attachment_id}/properties"
291
246
  query_params = {}
@@ -293,9 +248,7 @@ class ConfluenceApp(APIApplication):
293
248
  response.raise_for_status()
294
249
  return response.json()
295
250
 
296
- def get_attachment_content_properties_by_id(
297
- self, attachment_id, property_id
298
- ) -> dict[str, Any]:
251
+ async def get_attachment_content_properties_by_id(self, attachment_id, property_id) -> dict[str, Any]:
299
252
  """
300
253
  Retrieves a specific property of an attachment using the provided attachment ID and property ID.
301
254
 
@@ -319,9 +272,7 @@ class ConfluenceApp(APIApplication):
319
272
  response.raise_for_status()
320
273
  return response.json()
321
274
 
322
- def update_attachment_property_by_id(
323
- self, attachment_id, property_id, key=None, value=None, version=None
324
- ) -> dict[str, Any]:
275
+ async def update_attachment_property_by_id(self, attachment_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
325
276
  """
326
277
  Updates a specific property for an attachment by its ID and returns the updated result.
327
278
 
@@ -342,11 +293,7 @@ class ConfluenceApp(APIApplication):
342
293
  raise ValueError("Missing required parameter 'attachment-id'")
343
294
  if property_id is None:
344
295
  raise ValueError("Missing required parameter 'property-id'")
345
- request_body = {
346
- "key": key,
347
- "value": value,
348
- "version": version,
349
- }
296
+ request_body = {"key": key, "value": value, "version": version}
350
297
  request_body = {k: v for k, v in request_body.items() if v is not None}
351
298
  url = f"{self.base_url}/attachments/{attachment_id}/properties/{property_id}"
352
299
  query_params = {}
@@ -354,7 +301,7 @@ class ConfluenceApp(APIApplication):
354
301
  response.raise_for_status()
355
302
  return response.json()
356
303
 
357
- def delete_attachment_property_by_id(self, attachment_id, property_id) -> Any:
304
+ async def delete_attachment_property_by_id(self, attachment_id, property_id) -> Any:
358
305
  """
359
306
  Deletes a specific property from an attachment using the DELETE method, identified by both the attachment ID and the property ID.
360
307
 
@@ -378,9 +325,7 @@ class ConfluenceApp(APIApplication):
378
325
  response.raise_for_status()
379
326
  return response.json()
380
327
 
381
- def get_attachment_versions(
382
- self, id, cursor=None, limit=None, sort=None
383
- ) -> dict[str, Any]:
328
+ async def get_attachment_versions(self, id, cursor=None, limit=None, sort=None) -> dict[str, Any]:
384
329
  """
385
330
  Retrieves a list of versions for a specific attachment using the "id" parameter and supports query parameters for pagination and sorting.
386
331
 
@@ -399,18 +344,12 @@ class ConfluenceApp(APIApplication):
399
344
  if id is None:
400
345
  raise ValueError("Missing required parameter 'id'")
401
346
  url = f"{self.base_url}/attachments/{id}/versions"
402
- query_params = {
403
- k: v
404
- for k, v in [("cursor", cursor), ("limit", limit), ("sort", sort)]
405
- if v is not None
406
- }
347
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None}
407
348
  response = self._get(url, params=query_params)
408
349
  response.raise_for_status()
409
350
  return response.json()
410
351
 
411
- def get_attachment_version_details(
412
- self, attachment_id, version_number
413
- ) -> dict[str, Any]:
352
+ async def get_attachment_version_details(self, attachment_id, version_number) -> dict[str, Any]:
414
353
  """
415
354
  Retrieves a specific version of an attachment file using the attachment ID and version number, returning the details of the specified version.
416
355
 
@@ -434,9 +373,7 @@ class ConfluenceApp(APIApplication):
434
373
  response.raise_for_status()
435
374
  return response.json()
436
375
 
437
- def get_attachment_comments(
438
- self, id, body_format=None, cursor=None, limit=None, sort=None, version=None
439
- ) -> dict[str, Any]:
376
+ async def get_attachment_comments(self, id, body_format=None, cursor=None, limit=None, sort=None, version=None) -> dict[str, Any]:
440
377
  """
441
378
  Retrieves paginated footer comments for a specific attachment using query parameters for formatting, pagination, sorting, and version control.
442
379
 
@@ -459,29 +396,15 @@ class ConfluenceApp(APIApplication):
459
396
  url = f"{self.base_url}/attachments/{id}/footer-comments"
460
397
  query_params = {
461
398
  k: v
462
- for k, v in [
463
- ("body-format", body_format),
464
- ("cursor", cursor),
465
- ("limit", limit),
466
- ("sort", sort),
467
- ("version", version),
468
- ]
399
+ for k, v in [("body-format", body_format), ("cursor", cursor), ("limit", limit), ("sort", sort), ("version", version)]
469
400
  if v is not None
470
401
  }
471
402
  response = self._get(url, params=query_params)
472
403
  response.raise_for_status()
473
404
  return response.json()
474
405
 
475
- def get_blog_posts(
476
- self,
477
- id=None,
478
- space_id=None,
479
- sort=None,
480
- status=None,
481
- title=None,
482
- body_format=None,
483
- cursor=None,
484
- limit=None,
406
+ async def get_blog_posts(
407
+ self, id=None, space_id=None, sort=None, status=None, title=None, body_format=None, cursor=None, limit=None
485
408
  ) -> dict[str, Any]:
486
409
  """
487
410
  Retrieves a list of blog posts using the "GET" method at the "/blogposts" endpoint, allowing filtering by parameters such as ID, space ID, sort order, status, title, and body format.
@@ -521,9 +444,7 @@ class ConfluenceApp(APIApplication):
521
444
  response.raise_for_status()
522
445
  return response.json()
523
446
 
524
- def create_blog_post(
525
- self, spaceId, private=None, status=None, title=None, body=None, createdAt=None
526
- ) -> Any:
447
+ async def create_blog_post(self, spaceId, private=None, status=None, title=None, body=None, createdAt=None) -> Any:
527
448
  """
528
449
  Creates a new blog post using the POST method at the "/blogposts" endpoint, with an optional parameter to specify whether the post should be private.
529
450
 
@@ -541,13 +462,7 @@ class ConfluenceApp(APIApplication):
541
462
  Tags:
542
463
  Blog Post
543
464
  """
544
- request_body = {
545
- "spaceId": spaceId,
546
- "status": status,
547
- "title": title,
548
- "body": body,
549
- "createdAt": createdAt,
550
- }
465
+ request_body = {"spaceId": spaceId, "status": status, "title": title, "body": body, "createdAt": createdAt}
551
466
  request_body = {k: v for k, v in request_body.items() if v is not None}
552
467
  url = f"{self.base_url}/blogposts"
553
468
  query_params = {k: v for k, v in [("private", private)] if v is not None}
@@ -555,7 +470,7 @@ class ConfluenceApp(APIApplication):
555
470
  response.raise_for_status()
556
471
  return response.json()
557
472
 
558
- def get_blog_post_by_id(
473
+ async def get_blog_post_by_id(
559
474
  self,
560
475
  id,
561
476
  body_format=None,
@@ -619,10 +534,7 @@ class ConfluenceApp(APIApplication):
619
534
  ("include-likes", include_likes),
620
535
  ("include-versions", include_versions),
621
536
  ("include-version", include_version),
622
- (
623
- "include-favorited-by-current-user-status",
624
- include_favorited_by_current_user_status,
625
- ),
537
+ ("include-favorited-by-current-user-status", include_favorited_by_current_user_status),
626
538
  ("include-webresources", include_webresources),
627
539
  ("include-collaborators", include_collaborators),
628
540
  ]
@@ -632,9 +544,7 @@ class ConfluenceApp(APIApplication):
632
544
  response.raise_for_status()
633
545
  return response.json()
634
546
 
635
- def update_blog_post(
636
- self, id, status, title, body, version, spaceId=None, createdAt=None
637
- ) -> Any:
547
+ async def update_blog_post(self, id, status, title, body, version, spaceId=None, createdAt=None) -> Any:
638
548
  """
639
549
  Updates or creates a blog post with the specified ID and returns a status message.
640
550
 
@@ -676,7 +586,7 @@ class ConfluenceApp(APIApplication):
676
586
  response.raise_for_status()
677
587
  return response.json()
678
588
 
679
- def delete_blog_post(self, id, purge=None, draft=None) -> Any:
589
+ async def delete_blog_post(self, id, purge=None, draft=None) -> Any:
680
590
  """
681
591
  Deletes a blog post with the specified ID using the DELETE method, with optional parameters to purge or manage draft status.
682
592
 
@@ -694,22 +604,13 @@ class ConfluenceApp(APIApplication):
694
604
  if id is None:
695
605
  raise ValueError("Missing required parameter 'id'")
696
606
  url = f"{self.base_url}/blogposts/{id}"
697
- query_params = {
698
- k: v for k, v in [("purge", purge), ("draft", draft)] if v is not None
699
- }
607
+ query_params = {k: v for k, v in [("purge", purge), ("draft", draft)] if v is not None}
700
608
  response = self._delete(url, params=query_params)
701
609
  response.raise_for_status()
702
610
  return response.json()
703
611
 
704
- def get_blogpost_attachments(
705
- self,
706
- id,
707
- sort=None,
708
- cursor=None,
709
- status=None,
710
- mediaType=None,
711
- filename=None,
712
- limit=None,
612
+ async def get_blogpost_attachments(
613
+ self, id, sort=None, cursor=None, status=None, mediaType=None, filename=None, limit=None
713
614
  ) -> dict[str, Any]:
714
615
  """
715
616
  Retrieves a list of attachments associated with a specific blog post, supporting filtering by status, media type, filename, and pagination via query parameters.
@@ -748,7 +649,7 @@ class ConfluenceApp(APIApplication):
748
649
  response.raise_for_status()
749
650
  return response.json()
750
651
 
751
- def get_custom_content_by_type_in_blog_post(
652
+ async def get_custom_content_by_type_in_blog_post(
752
653
  self, id, type, sort=None, cursor=None, limit=None, body_format=None
753
654
  ) -> dict[str, Any]:
754
655
  """
@@ -773,22 +674,14 @@ class ConfluenceApp(APIApplication):
773
674
  url = f"{self.base_url}/blogposts/{id}/custom-content"
774
675
  query_params = {
775
676
  k: v
776
- for k, v in [
777
- ("type", type),
778
- ("sort", sort),
779
- ("cursor", cursor),
780
- ("limit", limit),
781
- ("body-format", body_format),
782
- ]
677
+ for k, v in [("type", type), ("sort", sort), ("cursor", cursor), ("limit", limit), ("body-format", body_format)]
783
678
  if v is not None
784
679
  }
785
680
  response = self._get(url, params=query_params)
786
681
  response.raise_for_status()
787
682
  return response.json()
788
683
 
789
- def get_blog_post_labels(
790
- self, id, prefix=None, sort=None, cursor=None, limit=None
791
- ) -> dict[str, Any]:
684
+ async def get_blog_post_labels(self, id, prefix=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
792
685
  """
793
686
  Retrieves a list of labels associated with a specific blog post, filtered by prefix, sorted, and paginated based on provided query parameters.
794
687
 
@@ -808,21 +701,12 @@ class ConfluenceApp(APIApplication):
808
701
  if id is None:
809
702
  raise ValueError("Missing required parameter 'id'")
810
703
  url = f"{self.base_url}/blogposts/{id}/labels"
811
- query_params = {
812
- k: v
813
- for k, v in [
814
- ("prefix", prefix),
815
- ("sort", sort),
816
- ("cursor", cursor),
817
- ("limit", limit),
818
- ]
819
- if v is not None
820
- }
704
+ query_params = {k: v for k, v in [("prefix", prefix), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
821
705
  response = self._get(url, params=query_params)
822
706
  response.raise_for_status()
823
707
  return response.json()
824
708
 
825
- def get_blog_post_like_count(self, id) -> dict[str, Any]:
709
+ async def get_blog_post_like_count(self, id) -> dict[str, Any]:
826
710
  """
827
711
  Retrieves the number of likes for a blog post using the specified ID via the GET method.
828
712
 
@@ -843,7 +727,7 @@ class ConfluenceApp(APIApplication):
843
727
  response.raise_for_status()
844
728
  return response.json()
845
729
 
846
- def get_blog_post_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
730
+ async def get_blog_post_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
847
731
  """
848
732
  Retrieves a paginated list of users who liked a specific blog post, using cursor-based pagination parameters.
849
733
 
@@ -861,16 +745,12 @@ class ConfluenceApp(APIApplication):
861
745
  if id is None:
862
746
  raise ValueError("Missing required parameter 'id'")
863
747
  url = f"{self.base_url}/blogposts/{id}/likes/users"
864
- query_params = {
865
- k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None
866
- }
748
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None}
867
749
  response = self._get(url, params=query_params)
868
750
  response.raise_for_status()
869
751
  return response.json()
870
752
 
871
- def get_blogpost_content_properties(
872
- self, blogpost_id, key=None, sort=None, cursor=None, limit=None
873
- ) -> dict[str, Any]:
753
+ async def get_blogpost_content_properties(self, blogpost_id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
874
754
  """
875
755
  Retrieves properties of a specific blog post identified by its ID, allowing optional filtering by key, sorting, and pagination using cursor and limit parameters.
876
756
 
@@ -890,23 +770,12 @@ class ConfluenceApp(APIApplication):
890
770
  if blogpost_id is None:
891
771
  raise ValueError("Missing required parameter 'blogpost-id'")
892
772
  url = f"{self.base_url}/blogposts/{blogpost_id}/properties"
893
- query_params = {
894
- k: v
895
- for k, v in [
896
- ("key", key),
897
- ("sort", sort),
898
- ("cursor", cursor),
899
- ("limit", limit),
900
- ]
901
- if v is not None
902
- }
773
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
903
774
  response = self._get(url, params=query_params)
904
775
  response.raise_for_status()
905
776
  return response.json()
906
777
 
907
- def create_blogpost_property(
908
- self, blogpost_id, key=None, value=None
909
- ) -> dict[str, Any]:
778
+ async def create_blogpost_property(self, blogpost_id, key=None, value=None) -> dict[str, Any]:
910
779
  """
911
780
  Adds custom properties to a specified blogpost and returns a success or error status.
912
781
 
@@ -923,10 +792,7 @@ class ConfluenceApp(APIApplication):
923
792
  """
924
793
  if blogpost_id is None:
925
794
  raise ValueError("Missing required parameter 'blogpost-id'")
926
- request_body = {
927
- "key": key,
928
- "value": value,
929
- }
795
+ request_body = {"key": key, "value": value}
930
796
  request_body = {k: v for k, v in request_body.items() if v is not None}
931
797
  url = f"{self.base_url}/blogposts/{blogpost_id}/properties"
932
798
  query_params = {}
@@ -934,9 +800,7 @@ class ConfluenceApp(APIApplication):
934
800
  response.raise_for_status()
935
801
  return response.json()
936
802
 
937
- def get_blogpost_content_properties_by_id(
938
- self, blogpost_id, property_id
939
- ) -> dict[str, Any]:
803
+ async def get_blogpost_content_properties_by_id(self, blogpost_id, property_id) -> dict[str, Any]:
940
804
  """
941
805
  Retrieves a specific property from a blog post using the provided blogpost and property IDs.
942
806
 
@@ -960,9 +824,7 @@ class ConfluenceApp(APIApplication):
960
824
  response.raise_for_status()
961
825
  return response.json()
962
826
 
963
- def update_blogpost_property_by_id(
964
- self, blogpost_id, property_id, key=None, value=None, version=None
965
- ) -> dict[str, Any]:
827
+ async def update_blogpost_property_by_id(self, blogpost_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
966
828
  """
967
829
  Updates the specified property of a blog post using the provided identifiers and returns a status message.
968
830
 
@@ -983,11 +845,7 @@ class ConfluenceApp(APIApplication):
983
845
  raise ValueError("Missing required parameter 'blogpost-id'")
984
846
  if property_id is None:
985
847
  raise ValueError("Missing required parameter 'property-id'")
986
- request_body = {
987
- "key": key,
988
- "value": value,
989
- "version": version,
990
- }
848
+ request_body = {"key": key, "value": value, "version": version}
991
849
  request_body = {k: v for k, v in request_body.items() if v is not None}
992
850
  url = f"{self.base_url}/blogposts/{blogpost_id}/properties/{property_id}"
993
851
  query_params = {}
@@ -995,7 +853,7 @@ class ConfluenceApp(APIApplication):
995
853
  response.raise_for_status()
996
854
  return response.json()
997
855
 
998
- def delete_blogpost_property_by_id(self, blogpost_id, property_id) -> Any:
856
+ async def delete_blogpost_property_by_id(self, blogpost_id, property_id) -> Any:
999
857
  """
1000
858
  Deletes a specific property from a blog post using the blog post ID and property ID.
1001
859
 
@@ -1019,7 +877,7 @@ class ConfluenceApp(APIApplication):
1019
877
  response.raise_for_status()
1020
878
  return response.json()
1021
879
 
1022
- def get_blog_post_operations(self, id) -> dict[str, Any]:
880
+ async def get_blog_post_operations(self, id) -> dict[str, Any]:
1023
881
  """
1024
882
  Retrieves operations associated with a specific blog post identified by the provided ID using the GET method.
1025
883
 
@@ -1040,9 +898,7 @@ class ConfluenceApp(APIApplication):
1040
898
  response.raise_for_status()
1041
899
  return response.json()
1042
900
 
1043
- def get_blog_post_versions(
1044
- self, id, body_format=None, cursor=None, limit=None, sort=None
1045
- ) -> dict[str, Any]:
901
+ async def get_blog_post_versions(self, id, body_format=None, cursor=None, limit=None, sort=None) -> dict[str, Any]:
1046
902
  """
1047
903
  Retrieves a list of version history entries for a specific blog post, optionally paginated and sorted, with customizable response formatting.
1048
904
 
@@ -1063,22 +919,13 @@ class ConfluenceApp(APIApplication):
1063
919
  raise ValueError("Missing required parameter 'id'")
1064
920
  url = f"{self.base_url}/blogposts/{id}/versions"
1065
921
  query_params = {
1066
- k: v
1067
- for k, v in [
1068
- ("body-format", body_format),
1069
- ("cursor", cursor),
1070
- ("limit", limit),
1071
- ("sort", sort),
1072
- ]
1073
- if v is not None
922
+ k: v for k, v in [("body-format", body_format), ("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None
1074
923
  }
1075
924
  response = self._get(url, params=query_params)
1076
925
  response.raise_for_status()
1077
926
  return response.json()
1078
927
 
1079
- def get_blog_post_version_details(
1080
- self, blogpost_id, version_number
1081
- ) -> dict[str, Any]:
928
+ async def get_blog_post_version_details(self, blogpost_id, version_number) -> dict[str, Any]:
1082
929
  """
1083
930
  Retrieves a specific version of a blog post identified by its ID and version number using the GET method.
1084
931
 
@@ -1102,7 +949,7 @@ class ConfluenceApp(APIApplication):
1102
949
  response.raise_for_status()
1103
950
  return response.json()
1104
951
 
1105
- def convert_content_ids_to_content_types(self, contentIds) -> dict[str, Any]:
952
+ async def convert_content_ids_to_content_types(self, contentIds) -> dict[str, Any]:
1106
953
  """
1107
954
  Converts content IDs to their corresponding types using a POST request and returns appropriate responses based on the conversion outcome.
1108
955
 
@@ -1115,9 +962,7 @@ class ConfluenceApp(APIApplication):
1115
962
  Tags:
1116
963
  Content
1117
964
  """
1118
- request_body = {
1119
- "contentIds": contentIds,
1120
- }
965
+ request_body = {"contentIds": contentIds}
1121
966
  request_body = {k: v for k, v in request_body.items() if v is not None}
1122
967
  url = f"{self.base_url}/content/convert-ids-to-types"
1123
968
  query_params = {}
@@ -1125,15 +970,8 @@ class ConfluenceApp(APIApplication):
1125
970
  response.raise_for_status()
1126
971
  return response.json()
1127
972
 
1128
- def get_custom_content_by_type(
1129
- self,
1130
- type,
1131
- id=None,
1132
- space_id=None,
1133
- sort=None,
1134
- cursor=None,
1135
- limit=None,
1136
- body_format=None,
973
+ async def get_custom_content_by_type(
974
+ self, type, id=None, space_id=None, sort=None, cursor=None, limit=None, body_format=None
1137
975
  ) -> dict[str, Any]:
1138
976
  """
1139
977
  Retrieves custom content at the specified path "/custom-content" using the GET method, allowing for filtering by type, id, space-id, sort order, and pagination with optional cursor and limit parameters.
@@ -1171,16 +1009,8 @@ class ConfluenceApp(APIApplication):
1171
1009
  response.raise_for_status()
1172
1010
  return response.json()
1173
1011
 
1174
- def create_custom_content(
1175
- self,
1176
- type,
1177
- title,
1178
- body,
1179
- status=None,
1180
- spaceId=None,
1181
- pageId=None,
1182
- blogPostId=None,
1183
- customContentId=None,
1012
+ async def create_custom_content(
1013
+ self, type, title, body, status=None, spaceId=None, pageId=None, blogPostId=None, customContentId=None
1184
1014
  ) -> Any:
1185
1015
  """
1186
1016
  Creates custom content via a POST request and returns appropriate status codes indicating success or specific errors.
@@ -1218,7 +1048,7 @@ class ConfluenceApp(APIApplication):
1218
1048
  response.raise_for_status()
1219
1049
  return response.json()
1220
1050
 
1221
- def get_custom_content_by_id(
1051
+ async def get_custom_content_by_id(
1222
1052
  self,
1223
1053
  id,
1224
1054
  body_format=None,
@@ -1276,18 +1106,8 @@ class ConfluenceApp(APIApplication):
1276
1106
  response.raise_for_status()
1277
1107
  return response.json()
1278
1108
 
1279
- def update_custom_content(
1280
- self,
1281
- id,
1282
- type,
1283
- status,
1284
- title,
1285
- body,
1286
- version,
1287
- spaceId=None,
1288
- pageId=None,
1289
- blogPostId=None,
1290
- customContentId=None,
1109
+ async def update_custom_content(
1110
+ self, id, type, status, title, body, version, spaceId=None, pageId=None, blogPostId=None, customContentId=None
1291
1111
  ) -> Any:
1292
1112
  """
1293
1113
  Updates or replaces a custom content resource identified by the provided ID using the PUT method, returning various status responses based on the request's success or failure.
@@ -1331,7 +1151,7 @@ class ConfluenceApp(APIApplication):
1331
1151
  response.raise_for_status()
1332
1152
  return response.json()
1333
1153
 
1334
- def delete_custom_content(self, id, purge=None) -> Any:
1154
+ async def delete_custom_content(self, id, purge=None) -> Any:
1335
1155
  """
1336
1156
  Deletes a custom content resource identified by its ID from the system, with an optional query parameter to specify whether to purge the content.
1337
1157
 
@@ -1353,15 +1173,8 @@ class ConfluenceApp(APIApplication):
1353
1173
  response.raise_for_status()
1354
1174
  return response.json()
1355
1175
 
1356
- def get_custom_content_attachments(
1357
- self,
1358
- id,
1359
- sort=None,
1360
- cursor=None,
1361
- status=None,
1362
- mediaType=None,
1363
- filename=None,
1364
- limit=None,
1176
+ async def get_custom_content_attachments(
1177
+ self, id, sort=None, cursor=None, status=None, mediaType=None, filename=None, limit=None
1365
1178
  ) -> dict[str, Any]:
1366
1179
  """
1367
1180
  Retrieves a list of attachments associated with custom content identified by the given ID, allowing for filtering by sort order, cursor, status, media type, filename, and limiting the number of results.
@@ -1400,9 +1213,7 @@ class ConfluenceApp(APIApplication):
1400
1213
  response.raise_for_status()
1401
1214
  return response.json()
1402
1215
 
1403
- def get_custom_content_comments(
1404
- self, id, body_format=None, cursor=None, limit=None, sort=None
1405
- ) -> dict[str, Any]:
1216
+ async def get_custom_content_comments(self, id, body_format=None, cursor=None, limit=None, sort=None) -> dict[str, Any]:
1406
1217
  """
1407
1218
  Retrieves a list of footer comments associated with a specific custom content item using the "GET" method, allowing for optional filtering by body format, cursor, limit, and sort order.
1408
1219
 
@@ -1423,22 +1234,13 @@ class ConfluenceApp(APIApplication):
1423
1234
  raise ValueError("Missing required parameter 'id'")
1424
1235
  url = f"{self.base_url}/custom-content/{id}/footer-comments"
1425
1236
  query_params = {
1426
- k: v
1427
- for k, v in [
1428
- ("body-format", body_format),
1429
- ("cursor", cursor),
1430
- ("limit", limit),
1431
- ("sort", sort),
1432
- ]
1433
- if v is not None
1237
+ k: v for k, v in [("body-format", body_format), ("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None
1434
1238
  }
1435
1239
  response = self._get(url, params=query_params)
1436
1240
  response.raise_for_status()
1437
1241
  return response.json()
1438
1242
 
1439
- def get_custom_content_labels(
1440
- self, id, prefix=None, sort=None, cursor=None, limit=None
1441
- ) -> dict[str, Any]:
1243
+ async def get_custom_content_labels(self, id, prefix=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
1442
1244
  """
1443
1245
  Retrieves labels for custom content with a specified ID, allowing filtering by prefix, sorting, and pagination using query parameters.
1444
1246
 
@@ -1458,21 +1260,12 @@ class ConfluenceApp(APIApplication):
1458
1260
  if id is None:
1459
1261
  raise ValueError("Missing required parameter 'id'")
1460
1262
  url = f"{self.base_url}/custom-content/{id}/labels"
1461
- query_params = {
1462
- k: v
1463
- for k, v in [
1464
- ("prefix", prefix),
1465
- ("sort", sort),
1466
- ("cursor", cursor),
1467
- ("limit", limit),
1468
- ]
1469
- if v is not None
1470
- }
1263
+ query_params = {k: v for k, v in [("prefix", prefix), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
1471
1264
  response = self._get(url, params=query_params)
1472
1265
  response.raise_for_status()
1473
1266
  return response.json()
1474
1267
 
1475
- def get_custom_content_operations(self, id) -> dict[str, Any]:
1268
+ async def get_custom_content_operations(self, id) -> dict[str, Any]:
1476
1269
  """
1477
1270
  Retrieves operational details for a custom content item identified by its ID using the GET method.
1478
1271
 
@@ -1493,7 +1286,7 @@ class ConfluenceApp(APIApplication):
1493
1286
  response.raise_for_status()
1494
1287
  return response.json()
1495
1288
 
1496
- def get_custom_content_content_properties(
1289
+ async def get_custom_content_content_properties(
1497
1290
  self, custom_content_id, key=None, sort=None, cursor=None, limit=None
1498
1291
  ) -> dict[str, Any]:
1499
1292
  """
@@ -1515,23 +1308,12 @@ class ConfluenceApp(APIApplication):
1515
1308
  if custom_content_id is None:
1516
1309
  raise ValueError("Missing required parameter 'custom-content-id'")
1517
1310
  url = f"{self.base_url}/custom-content/{custom_content_id}/properties"
1518
- query_params = {
1519
- k: v
1520
- for k, v in [
1521
- ("key", key),
1522
- ("sort", sort),
1523
- ("cursor", cursor),
1524
- ("limit", limit),
1525
- ]
1526
- if v is not None
1527
- }
1311
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
1528
1312
  response = self._get(url, params=query_params)
1529
1313
  response.raise_for_status()
1530
1314
  return response.json()
1531
1315
 
1532
- def create_custom_content_property(
1533
- self, custom_content_id, key=None, value=None
1534
- ) -> dict[str, Any]:
1316
+ async def create_custom_content_property(self, custom_content_id, key=None, value=None) -> dict[str, Any]:
1535
1317
  """
1536
1318
  Adds or updates properties for a specified custom content item and returns the operation result.
1537
1319
 
@@ -1548,10 +1330,7 @@ class ConfluenceApp(APIApplication):
1548
1330
  """
1549
1331
  if custom_content_id is None:
1550
1332
  raise ValueError("Missing required parameter 'custom-content-id'")
1551
- request_body = {
1552
- "key": key,
1553
- "value": value,
1554
- }
1333
+ request_body = {"key": key, "value": value}
1555
1334
  request_body = {k: v for k, v in request_body.items() if v is not None}
1556
1335
  url = f"{self.base_url}/custom-content/{custom_content_id}/properties"
1557
1336
  query_params = {}
@@ -1559,9 +1338,7 @@ class ConfluenceApp(APIApplication):
1559
1338
  response.raise_for_status()
1560
1339
  return response.json()
1561
1340
 
1562
- def get_custom_content_content_properties_by_id(
1563
- self, custom_content_id, property_id
1564
- ) -> dict[str, Any]:
1341
+ async def get_custom_content_content_properties_by_id(self, custom_content_id, property_id) -> dict[str, Any]:
1565
1342
  """
1566
1343
  Retrieves properties of a specific item identified by a custom content ID and property ID using the GET method.
1567
1344
 
@@ -1585,7 +1362,7 @@ class ConfluenceApp(APIApplication):
1585
1362
  response.raise_for_status()
1586
1363
  return response.json()
1587
1364
 
1588
- def update_custom_content_property_by_id(
1365
+ async def update_custom_content_property_by_id(
1589
1366
  self, custom_content_id, property_id, key=None, value=None, version=None
1590
1367
  ) -> dict[str, Any]:
1591
1368
  """
@@ -1608,11 +1385,7 @@ class ConfluenceApp(APIApplication):
1608
1385
  raise ValueError("Missing required parameter 'custom-content-id'")
1609
1386
  if property_id is None:
1610
1387
  raise ValueError("Missing required parameter 'property-id'")
1611
- request_body = {
1612
- "key": key,
1613
- "value": value,
1614
- "version": version,
1615
- }
1388
+ request_body = {"key": key, "value": value, "version": version}
1616
1389
  request_body = {k: v for k, v in request_body.items() if v is not None}
1617
1390
  url = f"{self.base_url}/custom-content/{custom_content_id}/properties/{property_id}"
1618
1391
  query_params = {}
@@ -1620,9 +1393,7 @@ class ConfluenceApp(APIApplication):
1620
1393
  response.raise_for_status()
1621
1394
  return response.json()
1622
1395
 
1623
- def delete_custom_content_property_by_id(
1624
- self, custom_content_id, property_id
1625
- ) -> Any:
1396
+ async def delete_custom_content_property_by_id(self, custom_content_id, property_id) -> Any:
1626
1397
  """
1627
1398
  Deletes a specified property from a custom content resource.
1628
1399
 
@@ -1646,9 +1417,7 @@ class ConfluenceApp(APIApplication):
1646
1417
  response.raise_for_status()
1647
1418
  return response.json()
1648
1419
 
1649
- def get_labels(
1650
- self, label_id=None, prefix=None, cursor=None, sort=None, limit=None
1651
- ) -> dict[str, Any]:
1420
+ async def get_labels(self, label_id=None, prefix=None, cursor=None, sort=None, limit=None) -> dict[str, Any]:
1652
1421
  """
1653
1422
  Retrieves a list of labels using the "GET" method at the "/labels" endpoint, allowing filtering by label ID, prefix, sorting, and pagination via query parameters.
1654
1423
 
@@ -1668,22 +1437,14 @@ class ConfluenceApp(APIApplication):
1668
1437
  url = f"{self.base_url}/labels"
1669
1438
  query_params = {
1670
1439
  k: v
1671
- for k, v in [
1672
- ("label-id", label_id),
1673
- ("prefix", prefix),
1674
- ("cursor", cursor),
1675
- ("sort", sort),
1676
- ("limit", limit),
1677
- ]
1440
+ for k, v in [("label-id", label_id), ("prefix", prefix), ("cursor", cursor), ("sort", sort), ("limit", limit)]
1678
1441
  if v is not None
1679
1442
  }
1680
1443
  response = self._get(url, params=query_params)
1681
1444
  response.raise_for_status()
1682
1445
  return response.json()
1683
1446
 
1684
- def get_label_attachments(
1685
- self, id, sort=None, cursor=None, limit=None
1686
- ) -> dict[str, Any]:
1447
+ async def get_label_attachments(self, id, sort=None, cursor=None, limit=None) -> dict[str, Any]:
1687
1448
  """
1688
1449
  Retrieves a list of attachments associated with a label identified by the provided ID, allowing for sorting and pagination via query parameters.
1689
1450
 
@@ -1702,18 +1463,12 @@ class ConfluenceApp(APIApplication):
1702
1463
  if id is None:
1703
1464
  raise ValueError("Missing required parameter 'id'")
1704
1465
  url = f"{self.base_url}/labels/{id}/attachments"
1705
- query_params = {
1706
- k: v
1707
- for k, v in [("sort", sort), ("cursor", cursor), ("limit", limit)]
1708
- if v is not None
1709
- }
1466
+ query_params = {k: v for k, v in [("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
1710
1467
  response = self._get(url, params=query_params)
1711
1468
  response.raise_for_status()
1712
1469
  return response.json()
1713
1470
 
1714
- def get_label_blog_posts(
1715
- self, id, space_id=None, body_format=None, sort=None, cursor=None, limit=None
1716
- ) -> dict[str, Any]:
1471
+ async def get_label_blog_posts(self, id, space_id=None, body_format=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
1717
1472
  """
1718
1473
  Retrieves a list of blog posts associated with a specific label by ID, allowing optional filtering by space ID, body format, sorting, cursor pagination, and content limit, using the GET method.
1719
1474
 
@@ -1736,22 +1491,14 @@ class ConfluenceApp(APIApplication):
1736
1491
  url = f"{self.base_url}/labels/{id}/blogposts"
1737
1492
  query_params = {
1738
1493
  k: v
1739
- for k, v in [
1740
- ("space-id", space_id),
1741
- ("body-format", body_format),
1742
- ("sort", sort),
1743
- ("cursor", cursor),
1744
- ("limit", limit),
1745
- ]
1494
+ for k, v in [("space-id", space_id), ("body-format", body_format), ("sort", sort), ("cursor", cursor), ("limit", limit)]
1746
1495
  if v is not None
1747
1496
  }
1748
1497
  response = self._get(url, params=query_params)
1749
1498
  response.raise_for_status()
1750
1499
  return response.json()
1751
1500
 
1752
- def get_label_pages(
1753
- self, id, space_id=None, body_format=None, sort=None, cursor=None, limit=None
1754
- ) -> dict[str, Any]:
1501
+ async def get_label_pages(self, id, space_id=None, body_format=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
1755
1502
  """
1756
1503
  Retrieves a list of pages associated with a label identified by `{id}`, allowing filtering by space, body format, sorting, and pagination options.
1757
1504
 
@@ -1774,29 +1521,15 @@ class ConfluenceApp(APIApplication):
1774
1521
  url = f"{self.base_url}/labels/{id}/pages"
1775
1522
  query_params = {
1776
1523
  k: v
1777
- for k, v in [
1778
- ("space-id", space_id),
1779
- ("body-format", body_format),
1780
- ("sort", sort),
1781
- ("cursor", cursor),
1782
- ("limit", limit),
1783
- ]
1524
+ for k, v in [("space-id", space_id), ("body-format", body_format), ("sort", sort), ("cursor", cursor), ("limit", limit)]
1784
1525
  if v is not None
1785
1526
  }
1786
1527
  response = self._get(url, params=query_params)
1787
1528
  response.raise_for_status()
1788
1529
  return response.json()
1789
1530
 
1790
- def get_pages(
1791
- self,
1792
- id=None,
1793
- space_id=None,
1794
- sort=None,
1795
- status=None,
1796
- title=None,
1797
- body_format=None,
1798
- cursor=None,
1799
- limit=None,
1531
+ async def get_pages(
1532
+ self, id=None, space_id=None, sort=None, status=None, title=None, body_format=None, cursor=None, limit=None
1800
1533
  ) -> dict[str, Any]:
1801
1534
  """
1802
1535
  Retrieves a list of pages based on specified parameters such as ID, space ID, sort order, status, title, body format, cursor, and limit using the GET method at the "/pages" endpoint.
@@ -1836,16 +1569,8 @@ class ConfluenceApp(APIApplication):
1836
1569
  response.raise_for_status()
1837
1570
  return response.json()
1838
1571
 
1839
- def create_page(
1840
- self,
1841
- spaceId,
1842
- embedded=None,
1843
- private=None,
1844
- root_level=None,
1845
- status=None,
1846
- title=None,
1847
- parentId=None,
1848
- body=None,
1572
+ async def create_page(
1573
+ self, spaceId, embedded=None, private=None, root_level=None, status=None, title=None, parentId=None, body=None
1849
1574
  ) -> Any:
1850
1575
  """
1851
1576
  Creates a new page with optional query parameters to specify visibility (private/public), embedding, and root-level placement, returning appropriate status codes.
@@ -1868,29 +1593,15 @@ class ConfluenceApp(APIApplication):
1868
1593
  Tags:
1869
1594
  Page
1870
1595
  """
1871
- request_body = {
1872
- "spaceId": spaceId,
1873
- "status": status,
1874
- "title": title,
1875
- "parentId": parentId,
1876
- "body": body,
1877
- }
1596
+ request_body = {"spaceId": spaceId, "status": status, "title": title, "parentId": parentId, "body": body}
1878
1597
  request_body = {k: v for k, v in request_body.items() if v is not None}
1879
1598
  url = f"{self.base_url}/pages"
1880
- query_params = {
1881
- k: v
1882
- for k, v in [
1883
- ("embedded", embedded),
1884
- ("private", private),
1885
- ("root-level", root_level),
1886
- ]
1887
- if v is not None
1888
- }
1599
+ query_params = {k: v for k, v in [("embedded", embedded), ("private", private), ("root-level", root_level)] if v is not None}
1889
1600
  response = self._post(url, data=request_body, params=query_params)
1890
1601
  response.raise_for_status()
1891
1602
  return response.json()
1892
1603
 
1893
- def get_page_by_id(
1604
+ async def get_page_by_id(
1894
1605
  self,
1895
1606
  id,
1896
1607
  body_format=None,
@@ -1954,10 +1665,7 @@ class ConfluenceApp(APIApplication):
1954
1665
  ("include-likes", include_likes),
1955
1666
  ("include-versions", include_versions),
1956
1667
  ("include-version", include_version),
1957
- (
1958
- "include-favorited-by-current-user-status",
1959
- include_favorited_by_current_user_status,
1960
- ),
1668
+ ("include-favorited-by-current-user-status", include_favorited_by_current_user_status),
1961
1669
  ("include-webresources", include_webresources),
1962
1670
  ("include-collaborators", include_collaborators),
1963
1671
  ]
@@ -1967,17 +1675,7 @@ class ConfluenceApp(APIApplication):
1967
1675
  response.raise_for_status()
1968
1676
  return response.json()
1969
1677
 
1970
- def update_page(
1971
- self,
1972
- id,
1973
- status,
1974
- title,
1975
- body,
1976
- version,
1977
- spaceId=None,
1978
- parentId=None,
1979
- ownerId=None,
1980
- ) -> Any:
1678
+ async def update_page(self, id, status, title, body, version, spaceId=None, parentId=None, ownerId=None) -> Any:
1981
1679
  """
1982
1680
  Updates or creates a page resource at the specified ID and returns a status.
1983
1681
 
@@ -2025,7 +1723,7 @@ class ConfluenceApp(APIApplication):
2025
1723
  response.raise_for_status()
2026
1724
  return response.json()
2027
1725
 
2028
- def delete_page(self, id, purge=None, draft=None) -> Any:
1726
+ async def delete_page(self, id, purge=None, draft=None) -> Any:
2029
1727
  """
2030
1728
  Deletes a page specified by ID using the DELETE method, with optional purge and draft query parameters, returning a successful response if the operation is completed without providing content.
2031
1729
 
@@ -2043,22 +1741,13 @@ class ConfluenceApp(APIApplication):
2043
1741
  if id is None:
2044
1742
  raise ValueError("Missing required parameter 'id'")
2045
1743
  url = f"{self.base_url}/pages/{id}"
2046
- query_params = {
2047
- k: v for k, v in [("purge", purge), ("draft", draft)] if v is not None
2048
- }
1744
+ query_params = {k: v for k, v in [("purge", purge), ("draft", draft)] if v is not None}
2049
1745
  response = self._delete(url, params=query_params)
2050
1746
  response.raise_for_status()
2051
1747
  return response.json()
2052
1748
 
2053
- def get_page_attachments(
2054
- self,
2055
- id,
2056
- sort=None,
2057
- cursor=None,
2058
- status=None,
2059
- mediaType=None,
2060
- filename=None,
2061
- limit=None,
1749
+ async def get_page_attachments(
1750
+ self, id, sort=None, cursor=None, status=None, mediaType=None, filename=None, limit=None
2062
1751
  ) -> dict[str, Any]:
2063
1752
  """
2064
1753
  Retrieves a list of attachments for a page with the specified ID, allowing optional sorting, filtering, and pagination based on query parameters.
@@ -2097,9 +1786,7 @@ class ConfluenceApp(APIApplication):
2097
1786
  response.raise_for_status()
2098
1787
  return response.json()
2099
1788
 
2100
- def get_custom_content_by_type_in_page(
2101
- self, id, type, sort=None, cursor=None, limit=None, body_format=None
2102
- ) -> dict[str, Any]:
1789
+ async def get_custom_content_by_type_in_page(self, id, type, sort=None, cursor=None, limit=None, body_format=None) -> dict[str, Any]:
2103
1790
  """
2104
1791
  Retrieves custom content for a page with the specified ID using the GET method, allowing filtering by type, sorting, pagination, and body format customization.
2105
1792
 
@@ -2122,22 +1809,14 @@ class ConfluenceApp(APIApplication):
2122
1809
  url = f"{self.base_url}/pages/{id}/custom-content"
2123
1810
  query_params = {
2124
1811
  k: v
2125
- for k, v in [
2126
- ("type", type),
2127
- ("sort", sort),
2128
- ("cursor", cursor),
2129
- ("limit", limit),
2130
- ("body-format", body_format),
2131
- ]
1812
+ for k, v in [("type", type), ("sort", sort), ("cursor", cursor), ("limit", limit), ("body-format", body_format)]
2132
1813
  if v is not None
2133
1814
  }
2134
1815
  response = self._get(url, params=query_params)
2135
1816
  response.raise_for_status()
2136
1817
  return response.json()
2137
1818
 
2138
- def get_page_labels(
2139
- self, id, prefix=None, sort=None, cursor=None, limit=None
2140
- ) -> dict[str, Any]:
1819
+ async def get_page_labels(self, id, prefix=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
2141
1820
  """
2142
1821
  Retrieves a list of labels for a page with the specified ID, optionally filtering by prefix, sorting, and paginating using cursor and limit parameters.
2143
1822
 
@@ -2157,21 +1836,12 @@ class ConfluenceApp(APIApplication):
2157
1836
  if id is None:
2158
1837
  raise ValueError("Missing required parameter 'id'")
2159
1838
  url = f"{self.base_url}/pages/{id}/labels"
2160
- query_params = {
2161
- k: v
2162
- for k, v in [
2163
- ("prefix", prefix),
2164
- ("sort", sort),
2165
- ("cursor", cursor),
2166
- ("limit", limit),
2167
- ]
2168
- if v is not None
2169
- }
1839
+ query_params = {k: v for k, v in [("prefix", prefix), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
2170
1840
  response = self._get(url, params=query_params)
2171
1841
  response.raise_for_status()
2172
1842
  return response.json()
2173
1843
 
2174
- def get_page_like_count(self, id) -> dict[str, Any]:
1844
+ async def get_page_like_count(self, id) -> dict[str, Any]:
2175
1845
  """
2176
1846
  Retrieves the number of likes for a page identified by the given ID using the GET method.
2177
1847
 
@@ -2192,7 +1862,7 @@ class ConfluenceApp(APIApplication):
2192
1862
  response.raise_for_status()
2193
1863
  return response.json()
2194
1864
 
2195
- def get_page_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
1865
+ async def get_page_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
2196
1866
  """
2197
1867
  Retrieves a list of users who have liked a page with the specified ID using the GET method, with optional parameters for pagination.
2198
1868
 
@@ -2210,14 +1880,12 @@ class ConfluenceApp(APIApplication):
2210
1880
  if id is None:
2211
1881
  raise ValueError("Missing required parameter 'id'")
2212
1882
  url = f"{self.base_url}/pages/{id}/likes/users"
2213
- query_params = {
2214
- k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None
2215
- }
1883
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None}
2216
1884
  response = self._get(url, params=query_params)
2217
1885
  response.raise_for_status()
2218
1886
  return response.json()
2219
1887
 
2220
- def get_page_operations(self, id) -> dict[str, Any]:
1888
+ async def get_page_operations(self, id) -> dict[str, Any]:
2221
1889
  """
2222
1890
  Retrieves operations associated with a specific page based on the provided ID.
2223
1891
 
@@ -2238,9 +1906,7 @@ class ConfluenceApp(APIApplication):
2238
1906
  response.raise_for_status()
2239
1907
  return response.json()
2240
1908
 
2241
- def get_page_content_properties(
2242
- self, page_id, key=None, sort=None, cursor=None, limit=None
2243
- ) -> dict[str, Any]:
1909
+ async def get_page_content_properties(self, page_id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
2244
1910
  """
2245
1911
  Retrieves properties associated with a specific page using the Notion API and returns them based on query parameters like key, sort, cursor, and limit.
2246
1912
 
@@ -2260,21 +1926,12 @@ class ConfluenceApp(APIApplication):
2260
1926
  if page_id is None:
2261
1927
  raise ValueError("Missing required parameter 'page-id'")
2262
1928
  url = f"{self.base_url}/pages/{page_id}/properties"
2263
- query_params = {
2264
- k: v
2265
- for k, v in [
2266
- ("key", key),
2267
- ("sort", sort),
2268
- ("cursor", cursor),
2269
- ("limit", limit),
2270
- ]
2271
- if v is not None
2272
- }
1929
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
2273
1930
  response = self._get(url, params=query_params)
2274
1931
  response.raise_for_status()
2275
1932
  return response.json()
2276
1933
 
2277
- def create_page_property(self, page_id, key=None, value=None) -> dict[str, Any]:
1934
+ async def create_page_property(self, page_id, key=None, value=None) -> dict[str, Any]:
2278
1935
  """
2279
1936
  Updates properties for a page using the page ID provided in the path.
2280
1937
 
@@ -2291,10 +1948,7 @@ class ConfluenceApp(APIApplication):
2291
1948
  """
2292
1949
  if page_id is None:
2293
1950
  raise ValueError("Missing required parameter 'page-id'")
2294
- request_body = {
2295
- "key": key,
2296
- "value": value,
2297
- }
1951
+ request_body = {"key": key, "value": value}
2298
1952
  request_body = {k: v for k, v in request_body.items() if v is not None}
2299
1953
  url = f"{self.base_url}/pages/{page_id}/properties"
2300
1954
  query_params = {}
@@ -2302,7 +1956,7 @@ class ConfluenceApp(APIApplication):
2302
1956
  response.raise_for_status()
2303
1957
  return response.json()
2304
1958
 
2305
- def get_page_content_properties_by_id(self, page_id, property_id) -> dict[str, Any]:
1959
+ async def get_page_content_properties_by_id(self, page_id, property_id) -> dict[str, Any]:
2306
1960
  """
2307
1961
  Retrieves the properties of a specific page element using the page ID and property ID.
2308
1962
 
@@ -2326,9 +1980,7 @@ class ConfluenceApp(APIApplication):
2326
1980
  response.raise_for_status()
2327
1981
  return response.json()
2328
1982
 
2329
- def update_page_property_by_id(
2330
- self, page_id, property_id, key=None, value=None, version=None
2331
- ) -> dict[str, Any]:
1983
+ async def update_page_property_by_id(self, page_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
2332
1984
  """
2333
1985
  Updates a specific property for a given page using the provided path parameters and returns the operation status.
2334
1986
 
@@ -2349,11 +2001,7 @@ class ConfluenceApp(APIApplication):
2349
2001
  raise ValueError("Missing required parameter 'page-id'")
2350
2002
  if property_id is None:
2351
2003
  raise ValueError("Missing required parameter 'property-id'")
2352
- request_body = {
2353
- "key": key,
2354
- "value": value,
2355
- "version": version,
2356
- }
2004
+ request_body = {"key": key, "value": value, "version": version}
2357
2005
  request_body = {k: v for k, v in request_body.items() if v is not None}
2358
2006
  url = f"{self.base_url}/pages/{page_id}/properties/{property_id}"
2359
2007
  query_params = {}
@@ -2361,7 +2009,7 @@ class ConfluenceApp(APIApplication):
2361
2009
  response.raise_for_status()
2362
2010
  return response.json()
2363
2011
 
2364
- def delete_page_property_by_id(self, page_id, property_id) -> Any:
2012
+ async def delete_page_property_by_id(self, page_id, property_id) -> Any:
2365
2013
  """
2366
2014
  Deletes a specific property from a specified page using the provided page-id and property-id as path parameters.
2367
2015
 
@@ -2385,9 +2033,7 @@ class ConfluenceApp(APIApplication):
2385
2033
  response.raise_for_status()
2386
2034
  return response.json()
2387
2035
 
2388
- def get_page_versions(
2389
- self, id, body_format=None, cursor=None, limit=None, sort=None
2390
- ) -> dict[str, Any]:
2036
+ async def get_page_versions(self, id, body_format=None, cursor=None, limit=None, sort=None) -> dict[str, Any]:
2391
2037
  """
2392
2038
  Retrieves versions of a page identified by the specified ID, allowing optional filtering by body format, sorting, and pagination using cursor and limit parameters.
2393
2039
 
@@ -2408,28 +2054,13 @@ class ConfluenceApp(APIApplication):
2408
2054
  raise ValueError("Missing required parameter 'id'")
2409
2055
  url = f"{self.base_url}/pages/{id}/versions"
2410
2056
  query_params = {
2411
- k: v
2412
- for k, v in [
2413
- ("body-format", body_format),
2414
- ("cursor", cursor),
2415
- ("limit", limit),
2416
- ("sort", sort),
2417
- ]
2418
- if v is not None
2057
+ k: v for k, v in [("body-format", body_format), ("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None
2419
2058
  }
2420
2059
  response = self._get(url, params=query_params)
2421
2060
  response.raise_for_status()
2422
2061
  return response.json()
2423
2062
 
2424
- def create_whiteboard(
2425
- self,
2426
- spaceId,
2427
- private=None,
2428
- title=None,
2429
- parentId=None,
2430
- templateKey=None,
2431
- locale=None,
2432
- ) -> Any:
2063
+ async def create_whiteboard(self, spaceId, private=None, title=None, parentId=None, templateKey=None, locale=None) -> Any:
2433
2064
  """
2434
2065
  Creates a new whiteboard with optional privacy settings and returns the result.
2435
2066
 
@@ -2447,13 +2078,7 @@ class ConfluenceApp(APIApplication):
2447
2078
  Tags:
2448
2079
  Whiteboard
2449
2080
  """
2450
- request_body = {
2451
- "spaceId": spaceId,
2452
- "title": title,
2453
- "parentId": parentId,
2454
- "templateKey": templateKey,
2455
- "locale": locale,
2456
- }
2081
+ request_body = {"spaceId": spaceId, "title": title, "parentId": parentId, "templateKey": templateKey, "locale": locale}
2457
2082
  request_body = {k: v for k, v in request_body.items() if v is not None}
2458
2083
  url = f"{self.base_url}/whiteboards"
2459
2084
  query_params = {k: v for k, v in [("private", private)] if v is not None}
@@ -2461,13 +2086,8 @@ class ConfluenceApp(APIApplication):
2461
2086
  response.raise_for_status()
2462
2087
  return response.json()
2463
2088
 
2464
- def get_whiteboard_by_id(
2465
- self,
2466
- id,
2467
- include_collaborators=None,
2468
- include_direct_children=None,
2469
- include_operations=None,
2470
- include_properties=None,
2089
+ async def get_whiteboard_by_id(
2090
+ self, id, include_collaborators=None, include_direct_children=None, include_operations=None, include_properties=None
2471
2091
  ) -> Any:
2472
2092
  """
2473
2093
  Retrieves a specific whiteboard by ID, optionally including additional details such as collaborators, direct children, operations, and properties using query parameters.
@@ -2508,7 +2128,7 @@ class ConfluenceApp(APIApplication):
2508
2128
  response.raise_for_status()
2509
2129
  return response.json()
2510
2130
 
2511
- def delete_whiteboard(self, id) -> Any:
2131
+ async def delete_whiteboard(self, id) -> Any:
2512
2132
  """
2513
2133
  Deletes the specified whiteboard by its ID and moves it to the trash.
2514
2134
 
@@ -2529,9 +2149,7 @@ class ConfluenceApp(APIApplication):
2529
2149
  response.raise_for_status()
2530
2150
  return response.json()
2531
2151
 
2532
- def get_whiteboard_content_properties(
2533
- self, id, key=None, sort=None, cursor=None, limit=None
2534
- ) -> dict[str, Any]:
2152
+ async def get_whiteboard_content_properties(self, id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
2535
2153
  """
2536
2154
  Retrieves properties for a whiteboard with the specified ID, optionally filtering by key, sorting, and paginating results using a cursor and limit parameters.
2537
2155
 
@@ -2551,21 +2169,12 @@ class ConfluenceApp(APIApplication):
2551
2169
  if id is None:
2552
2170
  raise ValueError("Missing required parameter 'id'")
2553
2171
  url = f"{self.base_url}/whiteboards/{id}/properties"
2554
- query_params = {
2555
- k: v
2556
- for k, v in [
2557
- ("key", key),
2558
- ("sort", sort),
2559
- ("cursor", cursor),
2560
- ("limit", limit),
2561
- ]
2562
- if v is not None
2563
- }
2172
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
2564
2173
  response = self._get(url, params=query_params)
2565
2174
  response.raise_for_status()
2566
2175
  return response.json()
2567
2176
 
2568
- def create_whiteboard_property(self, id, key=None, value=None) -> dict[str, Any]:
2177
+ async def create_whiteboard_property(self, id, key=None, value=None) -> dict[str, Any]:
2569
2178
  """
2570
2179
  Updates the properties of a specific whiteboard using the API at path "/whiteboards/{id}/properties" via the POST method.
2571
2180
 
@@ -2582,10 +2191,7 @@ class ConfluenceApp(APIApplication):
2582
2191
  """
2583
2192
  if id is None:
2584
2193
  raise ValueError("Missing required parameter 'id'")
2585
- request_body = {
2586
- "key": key,
2587
- "value": value,
2588
- }
2194
+ request_body = {"key": key, "value": value}
2589
2195
  request_body = {k: v for k, v in request_body.items() if v is not None}
2590
2196
  url = f"{self.base_url}/whiteboards/{id}/properties"
2591
2197
  query_params = {}
@@ -2593,9 +2199,7 @@ class ConfluenceApp(APIApplication):
2593
2199
  response.raise_for_status()
2594
2200
  return response.json()
2595
2201
 
2596
- def get_whiteboard_content_properties_by_id(
2597
- self, whiteboard_id, property_id
2598
- ) -> dict[str, Any]:
2202
+ async def get_whiteboard_content_properties_by_id(self, whiteboard_id, property_id) -> dict[str, Any]:
2599
2203
  """
2600
2204
  Retrieves a specific property from a designated whiteboard using the provided whiteboard and property identifiers.
2601
2205
 
@@ -2619,9 +2223,7 @@ class ConfluenceApp(APIApplication):
2619
2223
  response.raise_for_status()
2620
2224
  return response.json()
2621
2225
 
2622
- def update_whiteboard_property_by_id(
2623
- self, whiteboard_id, property_id, key=None, value=None, version=None
2624
- ) -> dict[str, Any]:
2226
+ async def update_whiteboard_property_by_id(self, whiteboard_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
2625
2227
  """
2626
2228
  Updates a specific property of a whiteboard using the "PUT" method, specifying the whiteboard and property IDs in the path.
2627
2229
 
@@ -2642,11 +2244,7 @@ class ConfluenceApp(APIApplication):
2642
2244
  raise ValueError("Missing required parameter 'whiteboard-id'")
2643
2245
  if property_id is None:
2644
2246
  raise ValueError("Missing required parameter 'property-id'")
2645
- request_body = {
2646
- "key": key,
2647
- "value": value,
2648
- "version": version,
2649
- }
2247
+ request_body = {"key": key, "value": value, "version": version}
2650
2248
  request_body = {k: v for k, v in request_body.items() if v is not None}
2651
2249
  url = f"{self.base_url}/whiteboards/{whiteboard_id}/properties/{property_id}"
2652
2250
  query_params = {}
@@ -2654,7 +2252,7 @@ class ConfluenceApp(APIApplication):
2654
2252
  response.raise_for_status()
2655
2253
  return response.json()
2656
2254
 
2657
- def delete_whiteboard_property_by_id(self, whiteboard_id, property_id) -> Any:
2255
+ async def delete_whiteboard_property_by_id(self, whiteboard_id, property_id) -> Any:
2658
2256
  """
2659
2257
  Deletes a specific property from a whiteboard by ID using the DELETE method.
2660
2258
 
@@ -2678,7 +2276,7 @@ class ConfluenceApp(APIApplication):
2678
2276
  response.raise_for_status()
2679
2277
  return response.json()
2680
2278
 
2681
- def get_whiteboard_operations(self, id) -> dict[str, Any]:
2279
+ async def get_whiteboard_operations(self, id) -> dict[str, Any]:
2682
2280
  """
2683
2281
  Retrieves a list of operations for a specific whiteboard identified by its ID using the GET method.
2684
2282
 
@@ -2699,7 +2297,7 @@ class ConfluenceApp(APIApplication):
2699
2297
  response.raise_for_status()
2700
2298
  return response.json()
2701
2299
 
2702
- def get_whiteboard_ancestors(self, id, limit=None) -> dict[str, Any]:
2300
+ async def get_whiteboard_ancestors(self, id, limit=None) -> dict[str, Any]:
2703
2301
  """
2704
2302
  Retrieves all ancestors for a specified whiteboard in top-to-bottom order, limited by the `limit` parameter, with minimal details returned for each ancestor.
2705
2303
 
@@ -2721,7 +2319,7 @@ class ConfluenceApp(APIApplication):
2721
2319
  response.raise_for_status()
2722
2320
  return response.json()
2723
2321
 
2724
- def create_database(self, spaceId, private=None, title=None, parentId=None) -> Any:
2322
+ async def create_database(self, spaceId, private=None, title=None, parentId=None) -> Any:
2725
2323
  """
2726
2324
  Creates a new database (optionally with private access restrictions) and returns the operation result.
2727
2325
 
@@ -2737,11 +2335,7 @@ class ConfluenceApp(APIApplication):
2737
2335
  Tags:
2738
2336
  Database
2739
2337
  """
2740
- request_body = {
2741
- "spaceId": spaceId,
2742
- "title": title,
2743
- "parentId": parentId,
2744
- }
2338
+ request_body = {"spaceId": spaceId, "title": title, "parentId": parentId}
2745
2339
  request_body = {k: v for k, v in request_body.items() if v is not None}
2746
2340
  url = f"{self.base_url}/databases"
2747
2341
  query_params = {k: v for k, v in [("private", private)] if v is not None}
@@ -2749,13 +2343,8 @@ class ConfluenceApp(APIApplication):
2749
2343
  response.raise_for_status()
2750
2344
  return response.json()
2751
2345
 
2752
- def get_database_by_id(
2753
- self,
2754
- id,
2755
- include_collaborators=None,
2756
- include_direct_children=None,
2757
- include_operations=None,
2758
- include_properties=None,
2346
+ async def get_database_by_id(
2347
+ self, id, include_collaborators=None, include_direct_children=None, include_operations=None, include_properties=None
2759
2348
  ) -> Any:
2760
2349
  """
2761
2350
  Retrieves a database by its ID and optionally includes additional details such as collaborators, direct children, operations, or properties using the specified query parameters.
@@ -2796,7 +2385,7 @@ class ConfluenceApp(APIApplication):
2796
2385
  response.raise_for_status()
2797
2386
  return response.json()
2798
2387
 
2799
- def delete_database(self, id) -> Any:
2388
+ async def delete_database(self, id) -> Any:
2800
2389
  """
2801
2390
  Deletes a database identified by its ID using the DELETE method, returning a success status of 204 if successful, or error statuses for unauthorized access, invalid requests, or if the database is not found.
2802
2391
 
@@ -2817,9 +2406,7 @@ class ConfluenceApp(APIApplication):
2817
2406
  response.raise_for_status()
2818
2407
  return response.json()
2819
2408
 
2820
- def get_database_content_properties(
2821
- self, id, key=None, sort=None, cursor=None, limit=None
2822
- ) -> dict[str, Any]:
2409
+ async def get_database_content_properties(self, id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
2823
2410
  """
2824
2411
  Retrieves the properties (columns) of a Notion database identified by its ID, supporting pagination and sorting via query parameters.
2825
2412
 
@@ -2839,21 +2426,12 @@ class ConfluenceApp(APIApplication):
2839
2426
  if id is None:
2840
2427
  raise ValueError("Missing required parameter 'id'")
2841
2428
  url = f"{self.base_url}/databases/{id}/properties"
2842
- query_params = {
2843
- k: v
2844
- for k, v in [
2845
- ("key", key),
2846
- ("sort", sort),
2847
- ("cursor", cursor),
2848
- ("limit", limit),
2849
- ]
2850
- if v is not None
2851
- }
2429
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
2852
2430
  response = self._get(url, params=query_params)
2853
2431
  response.raise_for_status()
2854
2432
  return response.json()
2855
2433
 
2856
- def create_database_property(self, id, key=None, value=None) -> dict[str, Any]:
2434
+ async def create_database_property(self, id, key=None, value=None) -> dict[str, Any]:
2857
2435
  """
2858
2436
  Creates a new property in a database using the specified database ID and returns the result.
2859
2437
 
@@ -2870,10 +2448,7 @@ class ConfluenceApp(APIApplication):
2870
2448
  """
2871
2449
  if id is None:
2872
2450
  raise ValueError("Missing required parameter 'id'")
2873
- request_body = {
2874
- "key": key,
2875
- "value": value,
2876
- }
2451
+ request_body = {"key": key, "value": value}
2877
2452
  request_body = {k: v for k, v in request_body.items() if v is not None}
2878
2453
  url = f"{self.base_url}/databases/{id}/properties"
2879
2454
  query_params = {}
@@ -2881,9 +2456,7 @@ class ConfluenceApp(APIApplication):
2881
2456
  response.raise_for_status()
2882
2457
  return response.json()
2883
2458
 
2884
- def get_database_content_properties_by_id(
2885
- self, database_id, property_id
2886
- ) -> dict[str, Any]:
2459
+ async def get_database_content_properties_by_id(self, database_id, property_id) -> dict[str, Any]:
2887
2460
  """
2888
2461
  Retrieves specific property details from a designated database using the provided database and property identifiers.
2889
2462
 
@@ -2907,9 +2480,7 @@ class ConfluenceApp(APIApplication):
2907
2480
  response.raise_for_status()
2908
2481
  return response.json()
2909
2482
 
2910
- def update_database_property_by_id(
2911
- self, database_id, property_id, key=None, value=None, version=None
2912
- ) -> dict[str, Any]:
2483
+ async def update_database_property_by_id(self, database_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
2913
2484
  """
2914
2485
  Updates a specific property in a database by providing the database ID and property ID, using the PUT method to modify its schema or settings.
2915
2486
 
@@ -2930,11 +2501,7 @@ class ConfluenceApp(APIApplication):
2930
2501
  raise ValueError("Missing required parameter 'database-id'")
2931
2502
  if property_id is None:
2932
2503
  raise ValueError("Missing required parameter 'property-id'")
2933
- request_body = {
2934
- "key": key,
2935
- "value": value,
2936
- "version": version,
2937
- }
2504
+ request_body = {"key": key, "value": value, "version": version}
2938
2505
  request_body = {k: v for k, v in request_body.items() if v is not None}
2939
2506
  url = f"{self.base_url}/databases/{database_id}/properties/{property_id}"
2940
2507
  query_params = {}
@@ -2942,7 +2509,7 @@ class ConfluenceApp(APIApplication):
2942
2509
  response.raise_for_status()
2943
2510
  return response.json()
2944
2511
 
2945
- def delete_database_property_by_id(self, database_id, property_id) -> Any:
2512
+ async def delete_database_property_by_id(self, database_id, property_id) -> Any:
2946
2513
  """
2947
2514
  Removes a specified property from a database and returns a confirmation response upon success.
2948
2515
 
@@ -2966,7 +2533,7 @@ class ConfluenceApp(APIApplication):
2966
2533
  response.raise_for_status()
2967
2534
  return response.json()
2968
2535
 
2969
- def get_database_operations(self, id) -> dict[str, Any]:
2536
+ async def get_database_operations(self, id) -> dict[str, Any]:
2970
2537
  """
2971
2538
  Retrieves and performs operations on a specific database by its identifier.
2972
2539
 
@@ -2987,7 +2554,7 @@ class ConfluenceApp(APIApplication):
2987
2554
  response.raise_for_status()
2988
2555
  return response.json()
2989
2556
 
2990
- def get_database_ancestors(self, id, limit=None) -> dict[str, Any]:
2557
+ async def get_database_ancestors(self, id, limit=None) -> dict[str, Any]:
2991
2558
  """
2992
2559
  Retrieves a list of ancestors for a database specified by its ID, returning them in top-to-bottom order, with optional filtering by a limit parameter.
2993
2560
 
@@ -3009,9 +2576,7 @@ class ConfluenceApp(APIApplication):
3009
2576
  response.raise_for_status()
3010
2577
  return response.json()
3011
2578
 
3012
- def create_smart_link(
3013
- self, spaceId, title=None, parentId=None, embedUrl=None
3014
- ) -> Any:
2579
+ async def create_smart_link(self, spaceId, title=None, parentId=None, embedUrl=None) -> Any:
3015
2580
  """
3016
2581
  Creates or processes embedded content via the API and returns a status or the created resource.
3017
2582
 
@@ -3027,12 +2592,7 @@ class ConfluenceApp(APIApplication):
3027
2592
  Tags:
3028
2593
  Smart Link
3029
2594
  """
3030
- request_body = {
3031
- "spaceId": spaceId,
3032
- "title": title,
3033
- "parentId": parentId,
3034
- "embedUrl": embedUrl,
3035
- }
2595
+ request_body = {"spaceId": spaceId, "title": title, "parentId": parentId, "embedUrl": embedUrl}
3036
2596
  request_body = {k: v for k, v in request_body.items() if v is not None}
3037
2597
  url = f"{self.base_url}/embeds"
3038
2598
  query_params = {}
@@ -3040,13 +2600,8 @@ class ConfluenceApp(APIApplication):
3040
2600
  response.raise_for_status()
3041
2601
  return response.json()
3042
2602
 
3043
- def get_smart_link_by_id(
3044
- self,
3045
- id,
3046
- include_collaborators=None,
3047
- include_direct_children=None,
3048
- include_operations=None,
3049
- include_properties=None,
2603
+ async def get_smart_link_by_id(
2604
+ self, id, include_collaborators=None, include_direct_children=None, include_operations=None, include_properties=None
3050
2605
  ) -> Any:
3051
2606
  """
3052
2607
  Retrieves an embed with the specified ID and optionally includes collaborators, direct children, operations, and properties based on query parameters.
@@ -3087,7 +2642,7 @@ class ConfluenceApp(APIApplication):
3087
2642
  response.raise_for_status()
3088
2643
  return response.json()
3089
2644
 
3090
- def delete_smart_link(self, id) -> Any:
2645
+ async def delete_smart_link(self, id) -> Any:
3091
2646
  """
3092
2647
  Deletes an embed resource by ID and returns a success status upon removal.
3093
2648
 
@@ -3108,9 +2663,7 @@ class ConfluenceApp(APIApplication):
3108
2663
  response.raise_for_status()
3109
2664
  return response.json()
3110
2665
 
3111
- def get_smart_link_content_properties(
3112
- self, id, key=None, sort=None, cursor=None, limit=None
3113
- ) -> dict[str, Any]:
2666
+ async def get_smart_link_content_properties(self, id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
3114
2667
  """
3115
2668
  Retrieves properties for an embed with the specified ID, allowing optional filtering by key, sorting, and pagination using query parameters.
3116
2669
 
@@ -3130,21 +2683,12 @@ class ConfluenceApp(APIApplication):
3130
2683
  if id is None:
3131
2684
  raise ValueError("Missing required parameter 'id'")
3132
2685
  url = f"{self.base_url}/embeds/{id}/properties"
3133
- query_params = {
3134
- k: v
3135
- for k, v in [
3136
- ("key", key),
3137
- ("sort", sort),
3138
- ("cursor", cursor),
3139
- ("limit", limit),
3140
- ]
3141
- if v is not None
3142
- }
2686
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
3143
2687
  response = self._get(url, params=query_params)
3144
2688
  response.raise_for_status()
3145
2689
  return response.json()
3146
2690
 
3147
- def create_smart_link_property(self, id, key=None, value=None) -> dict[str, Any]:
2691
+ async def create_smart_link_property(self, id, key=None, value=None) -> dict[str, Any]:
3148
2692
  """
3149
2693
  Creates or updates properties for a specific embed using the embed ID and returns the operation status.
3150
2694
 
@@ -3161,10 +2705,7 @@ class ConfluenceApp(APIApplication):
3161
2705
  """
3162
2706
  if id is None:
3163
2707
  raise ValueError("Missing required parameter 'id'")
3164
- request_body = {
3165
- "key": key,
3166
- "value": value,
3167
- }
2708
+ request_body = {"key": key, "value": value}
3168
2709
  request_body = {k: v for k, v in request_body.items() if v is not None}
3169
2710
  url = f"{self.base_url}/embeds/{id}/properties"
3170
2711
  query_params = {}
@@ -3172,9 +2713,7 @@ class ConfluenceApp(APIApplication):
3172
2713
  response.raise_for_status()
3173
2714
  return response.json()
3174
2715
 
3175
- def get_smart_link_content_properties_by_id(
3176
- self, embed_id, property_id
3177
- ) -> dict[str, Any]:
2716
+ async def get_smart_link_content_properties_by_id(self, embed_id, property_id) -> dict[str, Any]:
3178
2717
  """
3179
2718
  Retrieves the properties of a specific embed using its embed ID and property ID.
3180
2719
 
@@ -3198,9 +2737,7 @@ class ConfluenceApp(APIApplication):
3198
2737
  response.raise_for_status()
3199
2738
  return response.json()
3200
2739
 
3201
- def update_smart_link_property_by_id(
3202
- self, embed_id, property_id, key=None, value=None, version=None
3203
- ) -> dict[str, Any]:
2740
+ async def update_smart_link_property_by_id(self, embed_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
3204
2741
  """
3205
2742
  Updates a specific property of an embed using the provided embed ID and property ID.
3206
2743
 
@@ -3221,11 +2758,7 @@ class ConfluenceApp(APIApplication):
3221
2758
  raise ValueError("Missing required parameter 'embed-id'")
3222
2759
  if property_id is None:
3223
2760
  raise ValueError("Missing required parameter 'property-id'")
3224
- request_body = {
3225
- "key": key,
3226
- "value": value,
3227
- "version": version,
3228
- }
2761
+ request_body = {"key": key, "value": value, "version": version}
3229
2762
  request_body = {k: v for k, v in request_body.items() if v is not None}
3230
2763
  url = f"{self.base_url}/embeds/{embed_id}/properties/{property_id}"
3231
2764
  query_params = {}
@@ -3233,7 +2766,7 @@ class ConfluenceApp(APIApplication):
3233
2766
  response.raise_for_status()
3234
2767
  return response.json()
3235
2768
 
3236
- def delete_smart_link_property_by_id(self, embed_id, property_id) -> Any:
2769
+ async def delete_smart_link_property_by_id(self, embed_id, property_id) -> Any:
3237
2770
  """
3238
2771
  Deletes a specific property from an embed identified by embed-id and property-id.
3239
2772
 
@@ -3257,7 +2790,7 @@ class ConfluenceApp(APIApplication):
3257
2790
  response.raise_for_status()
3258
2791
  return response.json()
3259
2792
 
3260
- def get_smart_link_operations(self, id) -> dict[str, Any]:
2793
+ async def get_smart_link_operations(self, id) -> dict[str, Any]:
3261
2794
  """
3262
2795
  Retrieves the operations associated with a specific embed identified by {id}.
3263
2796
 
@@ -3278,7 +2811,7 @@ class ConfluenceApp(APIApplication):
3278
2811
  response.raise_for_status()
3279
2812
  return response.json()
3280
2813
 
3281
- def get_smart_link_ancestors(self, id, limit=None) -> dict[str, Any]:
2814
+ async def get_smart_link_ancestors(self, id, limit=None) -> dict[str, Any]:
3282
2815
  """
3283
2816
  Retrieves a list of ancestors associated with a specified embed ID using a path parameter and an optional query limit.
3284
2817
 
@@ -3300,7 +2833,7 @@ class ConfluenceApp(APIApplication):
3300
2833
  response.raise_for_status()
3301
2834
  return response.json()
3302
2835
 
3303
- def create_folder(self, spaceId, title=None, parentId=None) -> Any:
2836
+ async def create_folder(self, spaceId, title=None, parentId=None) -> Any:
3304
2837
  """
3305
2838
  Creates a new folder within a specified parent folder using the POST method and returns details of the newly created folder.
3306
2839
 
@@ -3315,11 +2848,7 @@ class ConfluenceApp(APIApplication):
3315
2848
  Tags:
3316
2849
  Folder
3317
2850
  """
3318
- request_body = {
3319
- "spaceId": spaceId,
3320
- "title": title,
3321
- "parentId": parentId,
3322
- }
2851
+ request_body = {"spaceId": spaceId, "title": title, "parentId": parentId}
3323
2852
  request_body = {k: v for k, v in request_body.items() if v is not None}
3324
2853
  url = f"{self.base_url}/folders"
3325
2854
  query_params = {}
@@ -3327,13 +2856,8 @@ class ConfluenceApp(APIApplication):
3327
2856
  response.raise_for_status()
3328
2857
  return response.json()
3329
2858
 
3330
- def get_folder_by_id(
3331
- self,
3332
- id,
3333
- include_collaborators=None,
3334
- include_direct_children=None,
3335
- include_operations=None,
3336
- include_properties=None,
2859
+ async def get_folder_by_id(
2860
+ self, id, include_collaborators=None, include_direct_children=None, include_operations=None, include_properties=None
3337
2861
  ) -> Any:
3338
2862
  """
3339
2863
  Retrieves a specific folder's details including its collaborators, direct children, operations, and properties based on the provided ID.
@@ -3374,7 +2898,7 @@ class ConfluenceApp(APIApplication):
3374
2898
  response.raise_for_status()
3375
2899
  return response.json()
3376
2900
 
3377
- def delete_folder(self, id) -> Any:
2901
+ async def delete_folder(self, id) -> Any:
3378
2902
  """
3379
2903
  Deletes a folder by its ID using the DELETE method, returning a 204 status code upon successful removal.
3380
2904
 
@@ -3395,9 +2919,7 @@ class ConfluenceApp(APIApplication):
3395
2919
  response.raise_for_status()
3396
2920
  return response.json()
3397
2921
 
3398
- def get_folder_content_properties(
3399
- self, id, key=None, sort=None, cursor=None, limit=None
3400
- ) -> dict[str, Any]:
2922
+ async def get_folder_content_properties(self, id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
3401
2923
  """
3402
2924
  Retrieves properties for a folder identified by the provided ID, allowing filtering by key and optional sorting, pagination, and limiting of results.
3403
2925
 
@@ -3417,21 +2939,12 @@ class ConfluenceApp(APIApplication):
3417
2939
  if id is None:
3418
2940
  raise ValueError("Missing required parameter 'id'")
3419
2941
  url = f"{self.base_url}/folders/{id}/properties"
3420
- query_params = {
3421
- k: v
3422
- for k, v in [
3423
- ("key", key),
3424
- ("sort", sort),
3425
- ("cursor", cursor),
3426
- ("limit", limit),
3427
- ]
3428
- if v is not None
3429
- }
2942
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
3430
2943
  response = self._get(url, params=query_params)
3431
2944
  response.raise_for_status()
3432
2945
  return response.json()
3433
2946
 
3434
- def create_folder_property(self, id, key=None, value=None) -> dict[str, Any]:
2947
+ async def create_folder_property(self, id, key=None, value=None) -> dict[str, Any]:
3435
2948
  """
3436
2949
  Creates and updates properties for a specific folder identified by `{id}` using the "POST" method.
3437
2950
 
@@ -3448,10 +2961,7 @@ class ConfluenceApp(APIApplication):
3448
2961
  """
3449
2962
  if id is None:
3450
2963
  raise ValueError("Missing required parameter 'id'")
3451
- request_body = {
3452
- "key": key,
3453
- "value": value,
3454
- }
2964
+ request_body = {"key": key, "value": value}
3455
2965
  request_body = {k: v for k, v in request_body.items() if v is not None}
3456
2966
  url = f"{self.base_url}/folders/{id}/properties"
3457
2967
  query_params = {}
@@ -3459,9 +2969,7 @@ class ConfluenceApp(APIApplication):
3459
2969
  response.raise_for_status()
3460
2970
  return response.json()
3461
2971
 
3462
- def get_folder_content_properties_by_id(
3463
- self, folder_id, property_id
3464
- ) -> dict[str, Any]:
2972
+ async def get_folder_content_properties_by_id(self, folder_id, property_id) -> dict[str, Any]:
3465
2973
  """
3466
2974
  Retrieves a specific property associated with a folder using the folder ID and property ID.
3467
2975
 
@@ -3485,9 +2993,7 @@ class ConfluenceApp(APIApplication):
3485
2993
  response.raise_for_status()
3486
2994
  return response.json()
3487
2995
 
3488
- def update_folder_property_by_id(
3489
- self, folder_id, property_id, key=None, value=None, version=None
3490
- ) -> dict[str, Any]:
2996
+ async def update_folder_property_by_id(self, folder_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
3491
2997
  """
3492
2998
  Updates a specific property of a folder by ID using the specified property identifier.
3493
2999
 
@@ -3508,11 +3014,7 @@ class ConfluenceApp(APIApplication):
3508
3014
  raise ValueError("Missing required parameter 'folder-id'")
3509
3015
  if property_id is None:
3510
3016
  raise ValueError("Missing required parameter 'property-id'")
3511
- request_body = {
3512
- "key": key,
3513
- "value": value,
3514
- "version": version,
3515
- }
3017
+ request_body = {"key": key, "value": value, "version": version}
3516
3018
  request_body = {k: v for k, v in request_body.items() if v is not None}
3517
3019
  url = f"{self.base_url}/folders/{folder_id}/properties/{property_id}"
3518
3020
  query_params = {}
@@ -3520,7 +3022,7 @@ class ConfluenceApp(APIApplication):
3520
3022
  response.raise_for_status()
3521
3023
  return response.json()
3522
3024
 
3523
- def delete_folder_property_by_id(self, folder_id, property_id) -> Any:
3025
+ async def delete_folder_property_by_id(self, folder_id, property_id) -> Any:
3524
3026
  """
3525
3027
  Deletes a specific property from a folder using the "DELETE" method by providing the folder ID and property ID in the request path.
3526
3028
 
@@ -3544,7 +3046,7 @@ class ConfluenceApp(APIApplication):
3544
3046
  response.raise_for_status()
3545
3047
  return response.json()
3546
3048
 
3547
- def get_folder_operations(self, id) -> dict[str, Any]:
3049
+ async def get_folder_operations(self, id) -> dict[str, Any]:
3548
3050
  """
3549
3051
  Retrieves a list of available operations for a specific folder identified by its ID using the GET method.
3550
3052
 
@@ -3565,7 +3067,7 @@ class ConfluenceApp(APIApplication):
3565
3067
  response.raise_for_status()
3566
3068
  return response.json()
3567
3069
 
3568
- def get_folder_ancestors(self, id, limit=None) -> dict[str, Any]:
3070
+ async def get_folder_ancestors(self, id, limit=None) -> dict[str, Any]:
3569
3071
  """
3570
3072
  Retrieves a flat list of a folder's ancestors starting from its parent up to the root folder.
3571
3073
 
@@ -3587,7 +3089,7 @@ class ConfluenceApp(APIApplication):
3587
3089
  response.raise_for_status()
3588
3090
  return response.json()
3589
3091
 
3590
- def get_page_version_details(self, page_id, version_number) -> dict[str, Any]:
3092
+ async def get_page_version_details(self, page_id, version_number) -> dict[str, Any]:
3591
3093
  """
3592
3094
  Retrieves a specific version of a page using the provided page ID and version number.
3593
3095
 
@@ -3611,9 +3113,7 @@ class ConfluenceApp(APIApplication):
3611
3113
  response.raise_for_status()
3612
3114
  return response.json()
3613
3115
 
3614
- def get_custom_content_versions(
3615
- self, custom_content_id, body_format=None, cursor=None, limit=None, sort=None
3616
- ) -> dict[str, Any]:
3116
+ async def get_custom_content_versions(self, custom_content_id, body_format=None, cursor=None, limit=None, sort=None) -> dict[str, Any]:
3617
3117
  """
3618
3118
  Retrieves a paginated list of versions for a specific custom content item, supporting filtering, sorting, and format customization.
3619
3119
 
@@ -3629,27 +3129,18 @@ class ConfluenceApp(APIApplication):
3629
3129
 
3630
3130
  Tags:
3631
3131
  Version
3632
- """
3633
- if custom_content_id is None:
3634
- raise ValueError("Missing required parameter 'custom-content-id'")
3635
- url = f"{self.base_url}/custom-content/{custom_content_id}/versions"
3636
- query_params = {
3637
- k: v
3638
- for k, v in [
3639
- ("body-format", body_format),
3640
- ("cursor", cursor),
3641
- ("limit", limit),
3642
- ("sort", sort),
3643
- ]
3644
- if v is not None
3132
+ """
3133
+ if custom_content_id is None:
3134
+ raise ValueError("Missing required parameter 'custom-content-id'")
3135
+ url = f"{self.base_url}/custom-content/{custom_content_id}/versions"
3136
+ query_params = {
3137
+ k: v for k, v in [("body-format", body_format), ("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None
3645
3138
  }
3646
3139
  response = self._get(url, params=query_params)
3647
3140
  response.raise_for_status()
3648
3141
  return response.json()
3649
3142
 
3650
- def get_custom_content_version_details(
3651
- self, custom_content_id, version_number
3652
- ) -> dict[str, Any]:
3143
+ async def get_custom_content_version_details(self, custom_content_id, version_number) -> dict[str, Any]:
3653
3144
  """
3654
3145
  Retrieves a specific version of custom content by its ID and version number using the "GET" method.
3655
3146
 
@@ -3673,7 +3164,7 @@ class ConfluenceApp(APIApplication):
3673
3164
  response.raise_for_status()
3674
3165
  return response.json()
3675
3166
 
3676
- def get_spaces(
3167
+ async def get_spaces(
3677
3168
  self,
3678
3169
  ids=None,
3679
3170
  keys=None,
@@ -3734,9 +3225,7 @@ class ConfluenceApp(APIApplication):
3734
3225
  response.raise_for_status()
3735
3226
  return response.json()
3736
3227
 
3737
- def create_space(
3738
- self, name, key=None, alias=None, description=None, roleAssignments=None
3739
- ) -> Any:
3228
+ async def create_space(self, name, key=None, alias=None, description=None, roleAssignments=None) -> Any:
3740
3229
  """
3741
3230
  Creates a new space resource and returns a success response upon creation.
3742
3231
 
@@ -3754,13 +3243,7 @@ class ConfluenceApp(APIApplication):
3754
3243
  Space, EAP
3755
3244
  """
3756
3245
  self._ensure_base_url_set()
3757
- request_body = {
3758
- "name": name,
3759
- "key": key,
3760
- "alias": alias,
3761
- "description": description,
3762
- "roleAssignments": roleAssignments,
3763
- }
3246
+ request_body = {"name": name, "key": key, "alias": alias, "description": description, "roleAssignments": roleAssignments}
3764
3247
  request_body = {k: v for k, v in request_body.items() if v is not None}
3765
3248
  url = f"{self.base_url}/spaces"
3766
3249
  query_params = {}
@@ -3768,7 +3251,7 @@ class ConfluenceApp(APIApplication):
3768
3251
  response.raise_for_status()
3769
3252
  return response.json()
3770
3253
 
3771
- def get_space_by_id(
3254
+ async def get_space_by_id(
3772
3255
  self,
3773
3256
  id,
3774
3257
  description_format=None,
@@ -3828,15 +3311,8 @@ class ConfluenceApp(APIApplication):
3828
3311
  response.raise_for_status()
3829
3312
  return response.json()
3830
3313
 
3831
- def get_blog_posts_in_space(
3832
- self,
3833
- id,
3834
- sort=None,
3835
- status=None,
3836
- title=None,
3837
- body_format=None,
3838
- cursor=None,
3839
- limit=None,
3314
+ async def get_blog_posts_in_space(
3315
+ self, id, sort=None, status=None, title=None, body_format=None, cursor=None, limit=None
3840
3316
  ) -> dict[str, Any]:
3841
3317
  """
3842
3318
  Retrieves a list of blog posts associated with a specific space, allowing filtering by status, title, and sorting options.
@@ -3875,9 +3351,7 @@ class ConfluenceApp(APIApplication):
3875
3351
  response.raise_for_status()
3876
3352
  return response.json()
3877
3353
 
3878
- def get_space_labels(
3879
- self, id, prefix=None, sort=None, cursor=None, limit=None
3880
- ) -> dict[str, Any]:
3354
+ async def get_space_labels(self, id, prefix=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
3881
3355
  """
3882
3356
  Retrieves a list of labels for a specific space identified by its ID, allowing optional filtering by prefix, sorting, and pagination using query parameters.
3883
3357
 
@@ -3897,23 +3371,12 @@ class ConfluenceApp(APIApplication):
3897
3371
  if id is None:
3898
3372
  raise ValueError("Missing required parameter 'id'")
3899
3373
  url = f"{self.base_url}/spaces/{id}/labels"
3900
- query_params = {
3901
- k: v
3902
- for k, v in [
3903
- ("prefix", prefix),
3904
- ("sort", sort),
3905
- ("cursor", cursor),
3906
- ("limit", limit),
3907
- ]
3908
- if v is not None
3909
- }
3374
+ query_params = {k: v for k, v in [("prefix", prefix), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
3910
3375
  response = self._get(url, params=query_params)
3911
3376
  response.raise_for_status()
3912
3377
  return response.json()
3913
3378
 
3914
- def get_space_content_labels(
3915
- self, id, prefix=None, sort=None, cursor=None, limit=None
3916
- ) -> dict[str, Any]:
3379
+ async def get_space_content_labels(self, id, prefix=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
3917
3380
  """
3918
3381
  Retrieves a list of content labels for a specific space using the provided ID, with optional filtering by prefix, sorting, and pagination.
3919
3382
 
@@ -3933,23 +3396,12 @@ class ConfluenceApp(APIApplication):
3933
3396
  if id is None:
3934
3397
  raise ValueError("Missing required parameter 'id'")
3935
3398
  url = f"{self.base_url}/spaces/{id}/content/labels"
3936
- query_params = {
3937
- k: v
3938
- for k, v in [
3939
- ("prefix", prefix),
3940
- ("sort", sort),
3941
- ("cursor", cursor),
3942
- ("limit", limit),
3943
- ]
3944
- if v is not None
3945
- }
3399
+ query_params = {k: v for k, v in [("prefix", prefix), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
3946
3400
  response = self._get(url, params=query_params)
3947
3401
  response.raise_for_status()
3948
3402
  return response.json()
3949
3403
 
3950
- def get_custom_content_by_type_in_space(
3951
- self, id, type, cursor=None, limit=None, body_format=None
3952
- ) -> dict[str, Any]:
3404
+ async def get_custom_content_by_type_in_space(self, id, type, cursor=None, limit=None, body_format=None) -> dict[str, Any]:
3953
3405
  """
3954
3406
  Retrieves custom content for a specific space, allowing users to filter by type, cursor, and limit, with options for different body formats.
3955
3407
 
@@ -3970,20 +3422,13 @@ class ConfluenceApp(APIApplication):
3970
3422
  raise ValueError("Missing required parameter 'id'")
3971
3423
  url = f"{self.base_url}/spaces/{id}/custom-content"
3972
3424
  query_params = {
3973
- k: v
3974
- for k, v in [
3975
- ("type", type),
3976
- ("cursor", cursor),
3977
- ("limit", limit),
3978
- ("body-format", body_format),
3979
- ]
3980
- if v is not None
3425
+ k: v for k, v in [("type", type), ("cursor", cursor), ("limit", limit), ("body-format", body_format)] if v is not None
3981
3426
  }
3982
3427
  response = self._get(url, params=query_params)
3983
3428
  response.raise_for_status()
3984
3429
  return response.json()
3985
3430
 
3986
- def get_space_operations(self, id) -> dict[str, Any]:
3431
+ async def get_space_operations(self, id) -> dict[str, Any]:
3987
3432
  """
3988
3433
  Retrieves a list of operations for a specific space identified by the given ID using the provided API endpoint.
3989
3434
 
@@ -4004,16 +3449,8 @@ class ConfluenceApp(APIApplication):
4004
3449
  response.raise_for_status()
4005
3450
  return response.json()
4006
3451
 
4007
- def get_pages_in_space(
4008
- self,
4009
- id,
4010
- depth=None,
4011
- sort=None,
4012
- status=None,
4013
- title=None,
4014
- body_format=None,
4015
- cursor=None,
4016
- limit=None,
3452
+ async def get_pages_in_space(
3453
+ self, id, depth=None, sort=None, status=None, title=None, body_format=None, cursor=None, limit=None
4017
3454
  ) -> dict[str, Any]:
4018
3455
  """
4019
3456
  Retrieves a list of pages for a specified space, allowing filtering by depth, sort order, status, title, body format, and pagination controls.
@@ -4054,9 +3491,7 @@ class ConfluenceApp(APIApplication):
4054
3491
  response.raise_for_status()
4055
3492
  return response.json()
4056
3493
 
4057
- def get_space_properties(
4058
- self, space_id, key=None, cursor=None, limit=None
4059
- ) -> dict[str, Any]:
3494
+ async def get_space_properties(self, space_id, key=None, cursor=None, limit=None) -> dict[str, Any]:
4060
3495
  """
4061
3496
  Retrieves a list of properties for a specified space, optionally filtered by key, with pagination support via cursor and limit parameters.
4062
3497
 
@@ -4075,16 +3510,12 @@ class ConfluenceApp(APIApplication):
4075
3510
  if space_id is None:
4076
3511
  raise ValueError("Missing required parameter 'space-id'")
4077
3512
  url = f"{self.base_url}/spaces/{space_id}/properties"
4078
- query_params = {
4079
- k: v
4080
- for k, v in [("key", key), ("cursor", cursor), ("limit", limit)]
4081
- if v is not None
4082
- }
3513
+ query_params = {k: v for k, v in [("key", key), ("cursor", cursor), ("limit", limit)] if v is not None}
4083
3514
  response = self._get(url, params=query_params)
4084
3515
  response.raise_for_status()
4085
3516
  return response.json()
4086
3517
 
4087
- def create_space_property(self, space_id, key=None, value=None) -> dict[str, Any]:
3518
+ async def create_space_property(self, space_id, key=None, value=None) -> dict[str, Any]:
4088
3519
  """
4089
3520
  Creates a new property for a specified space using the "POST" method, where the space is identified by the `{space-id}` path parameter.
4090
3521
 
@@ -4101,10 +3532,7 @@ class ConfluenceApp(APIApplication):
4101
3532
  """
4102
3533
  if space_id is None:
4103
3534
  raise ValueError("Missing required parameter 'space-id'")
4104
- request_body = {
4105
- "key": key,
4106
- "value": value,
4107
- }
3535
+ request_body = {"key": key, "value": value}
4108
3536
  request_body = {k: v for k, v in request_body.items() if v is not None}
4109
3537
  url = f"{self.base_url}/spaces/{space_id}/properties"
4110
3538
  query_params = {}
@@ -4112,7 +3540,7 @@ class ConfluenceApp(APIApplication):
4112
3540
  response.raise_for_status()
4113
3541
  return response.json()
4114
3542
 
4115
- def get_space_property_by_id(self, space_id, property_id) -> dict[str, Any]:
3543
+ async def get_space_property_by_id(self, space_id, property_id) -> dict[str, Any]:
4116
3544
  """
4117
3545
  Retrieves the specified property details for a space using the provided space and property identifiers.
4118
3546
 
@@ -4136,9 +3564,7 @@ class ConfluenceApp(APIApplication):
4136
3564
  response.raise_for_status()
4137
3565
  return response.json()
4138
3566
 
4139
- def update_space_property_by_id(
4140
- self, space_id, property_id, key=None, value=None, version=None
4141
- ) -> dict[str, Any]:
3567
+ async def update_space_property_by_id(self, space_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
4142
3568
  """
4143
3569
  Updates the specified property within a designated space and returns a success status upon completion.
4144
3570
 
@@ -4159,11 +3585,7 @@ class ConfluenceApp(APIApplication):
4159
3585
  raise ValueError("Missing required parameter 'space-id'")
4160
3586
  if property_id is None:
4161
3587
  raise ValueError("Missing required parameter 'property-id'")
4162
- request_body = {
4163
- "key": key,
4164
- "value": value,
4165
- "version": version,
4166
- }
3588
+ request_body = {"key": key, "value": value, "version": version}
4167
3589
  request_body = {k: v for k, v in request_body.items() if v is not None}
4168
3590
  url = f"{self.base_url}/spaces/{space_id}/properties/{property_id}"
4169
3591
  query_params = {}
@@ -4171,7 +3593,7 @@ class ConfluenceApp(APIApplication):
4171
3593
  response.raise_for_status()
4172
3594
  return response.json()
4173
3595
 
4174
- def delete_space_property_by_id(self, space_id, property_id) -> Any:
3596
+ async def delete_space_property_by_id(self, space_id, property_id) -> Any:
4175
3597
  """
4176
3598
  Deletes a property from a specified space using the provided space ID and property ID.
4177
3599
 
@@ -4195,9 +3617,7 @@ class ConfluenceApp(APIApplication):
4195
3617
  response.raise_for_status()
4196
3618
  return response.json()
4197
3619
 
4198
- def get_space_permissions_assignments(
4199
- self, id, cursor=None, limit=None
4200
- ) -> dict[str, Any]:
3620
+ async def get_space_permissions_assignments(self, id, cursor=None, limit=None) -> dict[str, Any]:
4201
3621
  """
4202
3622
  Retrieves the list of permissions assigned to a specific space, supporting pagination via cursor and limit parameters.
4203
3623
 
@@ -4215,16 +3635,12 @@ class ConfluenceApp(APIApplication):
4215
3635
  if id is None:
4216
3636
  raise ValueError("Missing required parameter 'id'")
4217
3637
  url = f"{self.base_url}/spaces/{id}/permissions"
4218
- query_params = {
4219
- k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None
4220
- }
3638
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None}
4221
3639
  response = self._get(url, params=query_params)
4222
3640
  response.raise_for_status()
4223
3641
  return response.json()
4224
3642
 
4225
- def get_available_space_permissions(
4226
- self, cursor=None, limit=None
4227
- ) -> dict[str, Any]:
3643
+ async def get_available_space_permissions(self, cursor=None, limit=None) -> dict[str, Any]:
4228
3644
  """
4229
3645
  Retrieves space permissions with pagination support using cursor and limit parameters.
4230
3646
 
@@ -4239,21 +3655,13 @@ class ConfluenceApp(APIApplication):
4239
3655
  Space Permissions, EAP
4240
3656
  """
4241
3657
  url = f"{self.base_url}/space-permissions"
4242
- query_params = {
4243
- k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None
4244
- }
3658
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None}
4245
3659
  response = self._get(url, params=query_params)
4246
3660
  response.raise_for_status()
4247
3661
  return response.json()
4248
3662
 
4249
- def get_available_space_roles(
4250
- self,
4251
- space_id=None,
4252
- role_type=None,
4253
- principal_id=None,
4254
- principal_type=None,
4255
- cursor=None,
4256
- limit=None,
3663
+ async def get_available_space_roles(
3664
+ self, space_id=None, role_type=None, principal_id=None, principal_type=None, cursor=None, limit=None
4257
3665
  ) -> dict[str, Any]:
4258
3666
  """
4259
3667
  Retrieves a list of space roles, filtered by space ID, role type, principal ID, and principal type, with options for pagination using a cursor and limit, returning relevant space role information.
@@ -4289,7 +3697,7 @@ class ConfluenceApp(APIApplication):
4289
3697
  response.raise_for_status()
4290
3698
  return response.json()
4291
3699
 
4292
- def get_space_roles_by_id(self, id) -> Any:
3700
+ async def get_space_roles_by_id(self, id) -> Any:
4293
3701
  """
4294
3702
  Retrieves space role assignments for a specified space ID, returning role-based permissions and user access details.
4295
3703
 
@@ -4310,15 +3718,8 @@ class ConfluenceApp(APIApplication):
4310
3718
  response.raise_for_status()
4311
3719
  return response.json()
4312
3720
 
4313
- def get_space_role_assignments(
4314
- self,
4315
- id,
4316
- role_id=None,
4317
- role_type=None,
4318
- principal_id=None,
4319
- principal_type=None,
4320
- cursor=None,
4321
- limit=None,
3721
+ async def get_space_role_assignments(
3722
+ self, id, role_id=None, role_type=None, principal_id=None, principal_type=None, cursor=None, limit=None
4322
3723
  ) -> dict[str, Any]:
4323
3724
  """
4324
3725
  Retrieves role assignments for a specific space with optional filtering by role type, role ID, principal type, principal ID, and pagination controls.
@@ -4357,7 +3758,7 @@ class ConfluenceApp(APIApplication):
4357
3758
  response.raise_for_status()
4358
3759
  return response.json()
4359
3760
 
4360
- def set_space_role_assignments(self, id, principal, roleId=None) -> dict[str, Any]:
3761
+ async def set_space_role_assignments(self, id, principal, roleId=None) -> dict[str, Any]:
4361
3762
  """
4362
3763
  Assigns a role to a specific space identified by the path parameter ID and returns the assignment status.
4363
3764
 
@@ -4374,10 +3775,7 @@ class ConfluenceApp(APIApplication):
4374
3775
  """
4375
3776
  if id is None:
4376
3777
  raise ValueError("Missing required parameter 'id'")
4377
- request_body = {
4378
- "principal": principal,
4379
- "roleId": roleId,
4380
- }
3778
+ request_body = {"principal": principal, "roleId": roleId}
4381
3779
  request_body = {k: v for k, v in request_body.items() if v is not None}
4382
3780
  url = f"{self.base_url}/spaces/{id}/role-assignments"
4383
3781
  query_params = {}
@@ -4385,9 +3783,7 @@ class ConfluenceApp(APIApplication):
4385
3783
  response.raise_for_status()
4386
3784
  return response.json()
4387
3785
 
4388
- def get_page_footer_comments(
4389
- self, id, body_format=None, status=None, sort=None, cursor=None, limit=None
4390
- ) -> dict[str, Any]:
3786
+ async def get_page_footer_comments(self, id, body_format=None, status=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
4391
3787
  """
4392
3788
  Retrieves comments from the footer section of a specific page identified by its ID, allowing for optional filtering by body format, status, sorting, cursor, and limit.
4393
3789
 
@@ -4410,28 +3806,15 @@ class ConfluenceApp(APIApplication):
4410
3806
  url = f"{self.base_url}/pages/{id}/footer-comments"
4411
3807
  query_params = {
4412
3808
  k: v
4413
- for k, v in [
4414
- ("body-format", body_format),
4415
- ("status", status),
4416
- ("sort", sort),
4417
- ("cursor", cursor),
4418
- ("limit", limit),
4419
- ]
3809
+ for k, v in [("body-format", body_format), ("status", status), ("sort", sort), ("cursor", cursor), ("limit", limit)]
4420
3810
  if v is not None
4421
3811
  }
4422
3812
  response = self._get(url, params=query_params)
4423
3813
  response.raise_for_status()
4424
3814
  return response.json()
4425
3815
 
4426
- def get_page_inline_comments(
4427
- self,
4428
- id,
4429
- body_format=None,
4430
- status=None,
4431
- resolution_status=None,
4432
- sort=None,
4433
- cursor=None,
4434
- limit=None,
3816
+ async def get_page_inline_comments(
3817
+ self, id, body_format=None, status=None, resolution_status=None, sort=None, cursor=None, limit=None
4435
3818
  ) -> dict[str, Any]:
4436
3819
  """
4437
3820
  Retrieves a list of inline comments for a specific page, allowing customization by body format, status, resolution status, sorting, cursor, and limit, using the API at "/pages/{id}/inline-comments" via the GET method.
@@ -4470,9 +3853,7 @@ class ConfluenceApp(APIApplication):
4470
3853
  response.raise_for_status()
4471
3854
  return response.json()
4472
3855
 
4473
- def get_blog_post_footer_comments(
4474
- self, id, body_format=None, status=None, sort=None, cursor=None, limit=None
4475
- ) -> dict[str, Any]:
3856
+ async def get_blog_post_footer_comments(self, id, body_format=None, status=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
4476
3857
  """
4477
3858
  Retrieves comments from the footer section of a specific blog post using the "GET" method, allowing for customizable output format and sorting options based on query parameters.
4478
3859
 
@@ -4495,28 +3876,15 @@ class ConfluenceApp(APIApplication):
4495
3876
  url = f"{self.base_url}/blogposts/{id}/footer-comments"
4496
3877
  query_params = {
4497
3878
  k: v
4498
- for k, v in [
4499
- ("body-format", body_format),
4500
- ("status", status),
4501
- ("sort", sort),
4502
- ("cursor", cursor),
4503
- ("limit", limit),
4504
- ]
3879
+ for k, v in [("body-format", body_format), ("status", status), ("sort", sort), ("cursor", cursor), ("limit", limit)]
4505
3880
  if v is not None
4506
3881
  }
4507
3882
  response = self._get(url, params=query_params)
4508
3883
  response.raise_for_status()
4509
3884
  return response.json()
4510
3885
 
4511
- def get_blog_post_inline_comments(
4512
- self,
4513
- id,
4514
- body_format=None,
4515
- status=None,
4516
- resolution_status=None,
4517
- sort=None,
4518
- cursor=None,
4519
- limit=None,
3886
+ async def get_blog_post_inline_comments(
3887
+ self, id, body_format=None, status=None, resolution_status=None, sort=None, cursor=None, limit=None
4520
3888
  ) -> dict[str, Any]:
4521
3889
  """
4522
3890
  Retrieves a list of inline comments associated with a specific blog post using the provided parameters for filtering and sorting.
@@ -4555,9 +3923,7 @@ class ConfluenceApp(APIApplication):
4555
3923
  response.raise_for_status()
4556
3924
  return response.json()
4557
3925
 
4558
- def get_footer_comments(
4559
- self, body_format=None, sort=None, cursor=None, limit=None
4560
- ) -> dict[str, Any]:
3926
+ async def get_footer_comments(self, body_format=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
4561
3927
  """
4562
3928
  Retrieves a list of comments for the footer, allowing customization through query parameters for body format, sorting, pagination with a cursor, and limiting the number of results.
4563
3929
 
@@ -4575,27 +3941,14 @@ class ConfluenceApp(APIApplication):
4575
3941
  """
4576
3942
  url = f"{self.base_url}/footer-comments"
4577
3943
  query_params = {
4578
- k: v
4579
- for k, v in [
4580
- ("body-format", body_format),
4581
- ("sort", sort),
4582
- ("cursor", cursor),
4583
- ("limit", limit),
4584
- ]
4585
- if v is not None
3944
+ k: v for k, v in [("body-format", body_format), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None
4586
3945
  }
4587
3946
  response = self._get(url, params=query_params)
4588
3947
  response.raise_for_status()
4589
3948
  return response.json()
4590
3949
 
4591
- def create_footer_comment(
4592
- self,
4593
- blogPostId=None,
4594
- pageId=None,
4595
- parentCommentId=None,
4596
- attachmentId=None,
4597
- customContentId=None,
4598
- body=None,
3950
+ async def create_footer_comment(
3951
+ self, blogPostId=None, pageId=None, parentCommentId=None, attachmentId=None, customContentId=None, body=None
4599
3952
  ) -> Any:
4600
3953
  """
4601
3954
  Creates a new footer comment entry and returns a success status upon creation.
@@ -4629,7 +3982,7 @@ class ConfluenceApp(APIApplication):
4629
3982
  response.raise_for_status()
4630
3983
  return response.json()
4631
3984
 
4632
- def get_footer_comment_by_id(
3985
+ async def get_footer_comment_by_id(
4633
3986
  self,
4634
3987
  comment_id,
4635
3988
  body_format=None,
@@ -4684,9 +4037,7 @@ class ConfluenceApp(APIApplication):
4684
4037
  response.raise_for_status()
4685
4038
  return response.json()
4686
4039
 
4687
- def update_footer_comment(
4688
- self, comment_id, version=None, body=None, alinks=None
4689
- ) -> dict[str, Any]:
4040
+ async def update_footer_comment(self, comment_id, version=None, body=None, alinks=None) -> dict[str, Any]:
4690
4041
  """
4691
4042
  Updates a Confluence footer comment's content and returns a success response.
4692
4043
 
@@ -4704,11 +4055,7 @@ class ConfluenceApp(APIApplication):
4704
4055
  """
4705
4056
  if comment_id is None:
4706
4057
  raise ValueError("Missing required parameter 'comment-id'")
4707
- request_body = {
4708
- "version": version,
4709
- "body": body,
4710
- "links": alinks,
4711
- }
4058
+ request_body = {"version": version, "body": body, "links": alinks}
4712
4059
  request_body = {k: v for k, v in request_body.items() if v is not None}
4713
4060
  url = f"{self.base_url}/footer-comments/{comment_id}"
4714
4061
  query_params = {}
@@ -4716,7 +4063,7 @@ class ConfluenceApp(APIApplication):
4716
4063
  response.raise_for_status()
4717
4064
  return response.json()
4718
4065
 
4719
- def delete_footer_comment(self, comment_id) -> Any:
4066
+ async def delete_footer_comment(self, comment_id) -> Any:
4720
4067
  """
4721
4068
  Deletes a specific footer comment identified by its ID using the DELETE method, returning a 204 status code upon successful deletion.
4722
4069
 
@@ -4737,9 +4084,7 @@ class ConfluenceApp(APIApplication):
4737
4084
  response.raise_for_status()
4738
4085
  return response.json()
4739
4086
 
4740
- def get_footer_comment_children(
4741
- self, id, body_format=None, sort=None, cursor=None, limit=None
4742
- ) -> dict[str, Any]:
4087
+ async def get_footer_comment_children(self, id, body_format=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
4743
4088
  """
4744
4089
  Retrieves child comments for a specific footer comment with optional filtering, sorting, and pagination parameters.
4745
4090
 
@@ -4760,20 +4105,13 @@ class ConfluenceApp(APIApplication):
4760
4105
  raise ValueError("Missing required parameter 'id'")
4761
4106
  url = f"{self.base_url}/footer-comments/{id}/children"
4762
4107
  query_params = {
4763
- k: v
4764
- for k, v in [
4765
- ("body-format", body_format),
4766
- ("sort", sort),
4767
- ("cursor", cursor),
4768
- ("limit", limit),
4769
- ]
4770
- if v is not None
4108
+ k: v for k, v in [("body-format", body_format), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None
4771
4109
  }
4772
4110
  response = self._get(url, params=query_params)
4773
4111
  response.raise_for_status()
4774
4112
  return response.json()
4775
4113
 
4776
- def get_footer_like_count(self, id) -> dict[str, Any]:
4114
+ async def get_footer_like_count(self, id) -> dict[str, Any]:
4777
4115
  """
4778
4116
  Retrieves the count of likes for a specific footer comment using the "GET" method at the "/footer-comments/{id}/likes/count" endpoint.
4779
4117
 
@@ -4794,7 +4132,7 @@ class ConfluenceApp(APIApplication):
4794
4132
  response.raise_for_status()
4795
4133
  return response.json()
4796
4134
 
4797
- def get_footer_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
4135
+ async def get_footer_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
4798
4136
  """
4799
4137
  Retrieves a list of users who have liked a specific comment with the given ID using the GET method, allowing for pagination through cursor and limit parameters.
4800
4138
 
@@ -4812,14 +4150,12 @@ class ConfluenceApp(APIApplication):
4812
4150
  if id is None:
4813
4151
  raise ValueError("Missing required parameter 'id'")
4814
4152
  url = f"{self.base_url}/footer-comments/{id}/likes/users"
4815
- query_params = {
4816
- k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None
4817
- }
4153
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None}
4818
4154
  response = self._get(url, params=query_params)
4819
4155
  response.raise_for_status()
4820
4156
  return response.json()
4821
4157
 
4822
- def get_footer_comment_operations(self, id) -> dict[str, Any]:
4158
+ async def get_footer_comment_operations(self, id) -> dict[str, Any]:
4823
4159
  """
4824
4160
  Retrieves the operations for a specific footer comment identified by the provided ID using the GET method.
4825
4161
 
@@ -4840,9 +4176,7 @@ class ConfluenceApp(APIApplication):
4840
4176
  response.raise_for_status()
4841
4177
  return response.json()
4842
4178
 
4843
- def get_footer_comment_versions(
4844
- self, id, body_format=None, cursor=None, limit=None, sort=None
4845
- ) -> dict[str, Any]:
4179
+ async def get_footer_comment_versions(self, id, body_format=None, cursor=None, limit=None, sort=None) -> dict[str, Any]:
4846
4180
  """
4847
4181
  Retrieves and lists versions of a specific comment identified by `{id}` in the footer, allowing customization through query parameters such as format, sorting, and pagination.
4848
4182
 
@@ -4863,20 +4197,13 @@ class ConfluenceApp(APIApplication):
4863
4197
  raise ValueError("Missing required parameter 'id'")
4864
4198
  url = f"{self.base_url}/footer-comments/{id}/versions"
4865
4199
  query_params = {
4866
- k: v
4867
- for k, v in [
4868
- ("body-format", body_format),
4869
- ("cursor", cursor),
4870
- ("limit", limit),
4871
- ("sort", sort),
4872
- ]
4873
- if v is not None
4200
+ k: v for k, v in [("body-format", body_format), ("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None
4874
4201
  }
4875
4202
  response = self._get(url, params=query_params)
4876
4203
  response.raise_for_status()
4877
4204
  return response.json()
4878
4205
 
4879
- def get_footer_comment_version_details(self, id, version_number) -> dict[str, Any]:
4206
+ async def get_footer_comment_version_details(self, id, version_number) -> dict[str, Any]:
4880
4207
  """
4881
4208
  Retrieves a specific version of a footer comment by its ID and version number.
4882
4209
 
@@ -4900,9 +4227,7 @@ class ConfluenceApp(APIApplication):
4900
4227
  response.raise_for_status()
4901
4228
  return response.json()
4902
4229
 
4903
- def get_inline_comments(
4904
- self, body_format=None, sort=None, cursor=None, limit=None
4905
- ) -> dict[str, Any]:
4230
+ async def get_inline_comments(self, body_format=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
4906
4231
  """
4907
4232
  Retrieves a paginated list of inline comments with optional parameters for body formatting, sorting, pagination (cursor), and result limit.
4908
4233
 
@@ -4920,26 +4245,14 @@ class ConfluenceApp(APIApplication):
4920
4245
  """
4921
4246
  url = f"{self.base_url}/inline-comments"
4922
4247
  query_params = {
4923
- k: v
4924
- for k, v in [
4925
- ("body-format", body_format),
4926
- ("sort", sort),
4927
- ("cursor", cursor),
4928
- ("limit", limit),
4929
- ]
4930
- if v is not None
4248
+ k: v for k, v in [("body-format", body_format), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None
4931
4249
  }
4932
4250
  response = self._get(url, params=query_params)
4933
4251
  response.raise_for_status()
4934
4252
  return response.json()
4935
4253
 
4936
- def create_inline_comment(
4937
- self,
4938
- blogPostId=None,
4939
- pageId=None,
4940
- parentCommentId=None,
4941
- body=None,
4942
- inlineCommentProperties=None,
4254
+ async def create_inline_comment(
4255
+ self, blogPostId=None, pageId=None, parentCommentId=None, body=None, inlineCommentProperties=None
4943
4256
  ) -> Any:
4944
4257
  """
4945
4258
  Creates inline comments on a specified line of a pull request file using the GitHub API and returns the created comment.
@@ -4971,7 +4284,7 @@ class ConfluenceApp(APIApplication):
4971
4284
  response.raise_for_status()
4972
4285
  return response.json()
4973
4286
 
4974
- def get_inline_comment_by_id(
4287
+ async def get_inline_comment_by_id(
4975
4288
  self,
4976
4289
  comment_id,
4977
4290
  body_format=None,
@@ -5026,9 +4339,7 @@ class ConfluenceApp(APIApplication):
5026
4339
  response.raise_for_status()
5027
4340
  return response.json()
5028
4341
 
5029
- def update_inline_comment(
5030
- self, comment_id, version=None, body=None, resolved=None
5031
- ) -> Any:
4342
+ async def update_inline_comment(self, comment_id, version=None, body=None, resolved=None) -> Any:
5032
4343
  """
5033
4344
  Updates an inline comment's content in a version control system using the specified comment identifier.
5034
4345
 
@@ -5048,11 +4359,7 @@ class ConfluenceApp(APIApplication):
5048
4359
  """
5049
4360
  if comment_id is None:
5050
4361
  raise ValueError("Missing required parameter 'comment-id'")
5051
- request_body = {
5052
- "version": version,
5053
- "body": body,
5054
- "resolved": resolved,
5055
- }
4362
+ request_body = {"version": version, "body": body, "resolved": resolved}
5056
4363
  request_body = {k: v for k, v in request_body.items() if v is not None}
5057
4364
  url = f"{self.base_url}/inline-comments/{comment_id}"
5058
4365
  query_params = {}
@@ -5060,7 +4367,7 @@ class ConfluenceApp(APIApplication):
5060
4367
  response.raise_for_status()
5061
4368
  return response.json()
5062
4369
 
5063
- def delete_inline_comment(self, comment_id) -> Any:
4370
+ async def delete_inline_comment(self, comment_id) -> Any:
5064
4371
  """
5065
4372
  Deletes an inline comment specified by its ID using the DELETE method and returns a successful status upon completion.
5066
4373
 
@@ -5081,9 +4388,7 @@ class ConfluenceApp(APIApplication):
5081
4388
  response.raise_for_status()
5082
4389
  return response.json()
5083
4390
 
5084
- def get_inline_comment_children(
5085
- self, id, body_format=None, sort=None, cursor=None, limit=None
5086
- ) -> dict[str, Any]:
4391
+ async def get_inline_comment_children(self, id, body_format=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
5087
4392
  """
5088
4393
  Retrieves a paginated list of child comments for a specific inline comment, supporting query parameters for formatting, sorting, and pagination.
5089
4394
 
@@ -5104,20 +4409,13 @@ class ConfluenceApp(APIApplication):
5104
4409
  raise ValueError("Missing required parameter 'id'")
5105
4410
  url = f"{self.base_url}/inline-comments/{id}/children"
5106
4411
  query_params = {
5107
- k: v
5108
- for k, v in [
5109
- ("body-format", body_format),
5110
- ("sort", sort),
5111
- ("cursor", cursor),
5112
- ("limit", limit),
5113
- ]
5114
- if v is not None
4412
+ k: v for k, v in [("body-format", body_format), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None
5115
4413
  }
5116
4414
  response = self._get(url, params=query_params)
5117
4415
  response.raise_for_status()
5118
4416
  return response.json()
5119
4417
 
5120
- def get_inline_like_count(self, id) -> dict[str, Any]:
4418
+ async def get_inline_like_count(self, id) -> dict[str, Any]:
5121
4419
  """
5122
4420
  Retrieves the total number of likes for a specific inline comment using the API endpoint "/inline-comments/{id}/likes/count" via the GET method.
5123
4421
 
@@ -5138,7 +4436,7 @@ class ConfluenceApp(APIApplication):
5138
4436
  response.raise_for_status()
5139
4437
  return response.json()
5140
4438
 
5141
- def get_inline_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
4439
+ async def get_inline_like_users(self, id, cursor=None, limit=None) -> dict[str, Any]:
5142
4440
  """
5143
4441
  Retrieves a list of users who have liked an inline comment with the specified ID, with optional pagination using cursor and limit parameters.
5144
4442
 
@@ -5156,14 +4454,12 @@ class ConfluenceApp(APIApplication):
5156
4454
  if id is None:
5157
4455
  raise ValueError("Missing required parameter 'id'")
5158
4456
  url = f"{self.base_url}/inline-comments/{id}/likes/users"
5159
- query_params = {
5160
- k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None
5161
- }
4457
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None}
5162
4458
  response = self._get(url, params=query_params)
5163
4459
  response.raise_for_status()
5164
4460
  return response.json()
5165
4461
 
5166
- def get_inline_comment_operations(self, id) -> dict[str, Any]:
4462
+ async def get_inline_comment_operations(self, id) -> dict[str, Any]:
5167
4463
  """
5168
4464
  Retrieves an inline comment by ID from a GitHub repository using the GitHub API.
5169
4465
 
@@ -5184,9 +4480,7 @@ class ConfluenceApp(APIApplication):
5184
4480
  response.raise_for_status()
5185
4481
  return response.json()
5186
4482
 
5187
- def get_inline_comment_versions(
5188
- self, id, body_format=None, cursor=None, limit=None, sort=None
5189
- ) -> dict[str, Any]:
4483
+ async def get_inline_comment_versions(self, id, body_format=None, cursor=None, limit=None, sort=None) -> dict[str, Any]:
5190
4484
  """
5191
4485
  Retrieves version history for a specific inline comment, supporting pagination and body formatting options.
5192
4486
 
@@ -5207,20 +4501,13 @@ class ConfluenceApp(APIApplication):
5207
4501
  raise ValueError("Missing required parameter 'id'")
5208
4502
  url = f"{self.base_url}/inline-comments/{id}/versions"
5209
4503
  query_params = {
5210
- k: v
5211
- for k, v in [
5212
- ("body-format", body_format),
5213
- ("cursor", cursor),
5214
- ("limit", limit),
5215
- ("sort", sort),
5216
- ]
5217
- if v is not None
4504
+ k: v for k, v in [("body-format", body_format), ("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None
5218
4505
  }
5219
4506
  response = self._get(url, params=query_params)
5220
4507
  response.raise_for_status()
5221
4508
  return response.json()
5222
4509
 
5223
- def get_inline_comment_version_details(self, id, version_number) -> dict[str, Any]:
4510
+ async def get_inline_comment_version_details(self, id, version_number) -> dict[str, Any]:
5224
4511
  """
5225
4512
  Retrieves a specific version of an inline comment by its ID and version number using the GET method.
5226
4513
 
@@ -5244,9 +4531,7 @@ class ConfluenceApp(APIApplication):
5244
4531
  response.raise_for_status()
5245
4532
  return response.json()
5246
4533
 
5247
- def get_comment_content_properties(
5248
- self, comment_id, key=None, sort=None, cursor=None, limit=None
5249
- ) -> dict[str, Any]:
4534
+ async def get_comment_content_properties(self, comment_id, key=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
5250
4535
  """
5251
4536
  Retrieves specific properties of a comment using its ID, optionally filtered by key, sorted, and paginated.
5252
4537
 
@@ -5266,23 +4551,12 @@ class ConfluenceApp(APIApplication):
5266
4551
  if comment_id is None:
5267
4552
  raise ValueError("Missing required parameter 'comment-id'")
5268
4553
  url = f"{self.base_url}/comments/{comment_id}/properties"
5269
- query_params = {
5270
- k: v
5271
- for k, v in [
5272
- ("key", key),
5273
- ("sort", sort),
5274
- ("cursor", cursor),
5275
- ("limit", limit),
5276
- ]
5277
- if v is not None
5278
- }
4554
+ query_params = {k: v for k, v in [("key", key), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None}
5279
4555
  response = self._get(url, params=query_params)
5280
4556
  response.raise_for_status()
5281
4557
  return response.json()
5282
4558
 
5283
- def create_comment_property(
5284
- self, comment_id, key=None, value=None
5285
- ) -> dict[str, Any]:
4559
+ async def create_comment_property(self, comment_id, key=None, value=None) -> dict[str, Any]:
5286
4560
  """
5287
4561
  Updates properties of a comment identified by the given "comment-id" using the specified API.
5288
4562
 
@@ -5299,10 +4573,7 @@ class ConfluenceApp(APIApplication):
5299
4573
  """
5300
4574
  if comment_id is None:
5301
4575
  raise ValueError("Missing required parameter 'comment-id'")
5302
- request_body = {
5303
- "key": key,
5304
- "value": value,
5305
- }
4576
+ request_body = {"key": key, "value": value}
5306
4577
  request_body = {k: v for k, v in request_body.items() if v is not None}
5307
4578
  url = f"{self.base_url}/comments/{comment_id}/properties"
5308
4579
  query_params = {}
@@ -5310,9 +4581,7 @@ class ConfluenceApp(APIApplication):
5310
4581
  response.raise_for_status()
5311
4582
  return response.json()
5312
4583
 
5313
- def get_comment_content_properties_by_id(
5314
- self, comment_id, property_id
5315
- ) -> dict[str, Any]:
4584
+ async def get_comment_content_properties_by_id(self, comment_id, property_id) -> dict[str, Any]:
5316
4585
  """
5317
4586
  Retrieves the specified property of a comment using the provided comment ID and property ID.
5318
4587
 
@@ -5336,9 +4605,7 @@ class ConfluenceApp(APIApplication):
5336
4605
  response.raise_for_status()
5337
4606
  return response.json()
5338
4607
 
5339
- def update_comment_property_by_id(
5340
- self, comment_id, property_id, key=None, value=None, version=None
5341
- ) -> dict[str, Any]:
4608
+ async def update_comment_property_by_id(self, comment_id, property_id, key=None, value=None, version=None) -> dict[str, Any]:
5342
4609
  """
5343
4610
  Updates the specified property of a comment using the provided path parameters and returns a status message.
5344
4611
 
@@ -5359,11 +4626,7 @@ class ConfluenceApp(APIApplication):
5359
4626
  raise ValueError("Missing required parameter 'comment-id'")
5360
4627
  if property_id is None:
5361
4628
  raise ValueError("Missing required parameter 'property-id'")
5362
- request_body = {
5363
- "key": key,
5364
- "value": value,
5365
- "version": version,
5366
- }
4629
+ request_body = {"key": key, "value": value, "version": version}
5367
4630
  request_body = {k: v for k, v in request_body.items() if v is not None}
5368
4631
  url = f"{self.base_url}/comments/{comment_id}/properties/{property_id}"
5369
4632
  query_params = {}
@@ -5371,7 +4634,7 @@ class ConfluenceApp(APIApplication):
5371
4634
  response.raise_for_status()
5372
4635
  return response.json()
5373
4636
 
5374
- def delete_comment_property_by_id(self, comment_id, property_id) -> Any:
4637
+ async def delete_comment_property_by_id(self, comment_id, property_id) -> Any:
5375
4638
  """
5376
4639
  Deletes a specific property from a comment using the provided `comment-id` and `property-id`, returning a status code upon successful deletion.
5377
4640
 
@@ -5395,7 +4658,7 @@ class ConfluenceApp(APIApplication):
5395
4658
  response.raise_for_status()
5396
4659
  return response.json()
5397
4660
 
5398
- def get_tasks(
4661
+ async def get_tasks(
5399
4662
  self,
5400
4663
  body_format=None,
5401
4664
  include_blank_tasks=None,
@@ -5474,7 +4737,7 @@ class ConfluenceApp(APIApplication):
5474
4737
  response.raise_for_status()
5475
4738
  return response.json()
5476
4739
 
5477
- def get_task_by_id(self, id, body_format=None) -> dict[str, Any]:
4740
+ async def get_task_by_id(self, id, body_format=None) -> dict[str, Any]:
5478
4741
  """
5479
4742
  Retrieves a specific task by ID and optionally formats the response body based on the body-format query parameter.
5480
4743
 
@@ -5491,14 +4754,12 @@ class ConfluenceApp(APIApplication):
5491
4754
  if id is None:
5492
4755
  raise ValueError("Missing required parameter 'id'")
5493
4756
  url = f"{self.base_url}/tasks/{id}"
5494
- query_params = {
5495
- k: v for k, v in [("body-format", body_format)] if v is not None
5496
- }
4757
+ query_params = {k: v for k, v in [("body-format", body_format)] if v is not None}
5497
4758
  response = self._get(url, params=query_params)
5498
4759
  response.raise_for_status()
5499
4760
  return response.json()
5500
4761
 
5501
- def get_child_pages(self, id, cursor=None, limit=None, sort=None) -> dict[str, Any]:
4762
+ async def get_child_pages(self, id, cursor=None, limit=None, sort=None) -> dict[str, Any]:
5502
4763
  """
5503
4764
  Retrieves a list of child pages for a given page, identified by the `{id}`, allowing optional filtering by cursor, limit, and sort order.
5504
4765
 
@@ -5517,18 +4778,12 @@ class ConfluenceApp(APIApplication):
5517
4778
  if id is None:
5518
4779
  raise ValueError("Missing required parameter 'id'")
5519
4780
  url = f"{self.base_url}/pages/{id}/children"
5520
- query_params = {
5521
- k: v
5522
- for k, v in [("cursor", cursor), ("limit", limit), ("sort", sort)]
5523
- if v is not None
5524
- }
4781
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None}
5525
4782
  response = self._get(url, params=query_params)
5526
4783
  response.raise_for_status()
5527
4784
  return response.json()
5528
4785
 
5529
- def get_child_custom_content(
5530
- self, id, cursor=None, limit=None, sort=None
5531
- ) -> dict[str, Any]:
4786
+ async def get_child_custom_content(self, id, cursor=None, limit=None, sort=None) -> dict[str, Any]:
5532
4787
  """
5533
4788
  Retrieves a list of child content items for a specified custom content item identified by `{id}`, allowing optional filtering by `cursor`, `limit`, and `sort` parameters.
5534
4789
 
@@ -5547,16 +4802,12 @@ class ConfluenceApp(APIApplication):
5547
4802
  if id is None:
5548
4803
  raise ValueError("Missing required parameter 'id'")
5549
4804
  url = f"{self.base_url}/custom-content/{id}/children"
5550
- query_params = {
5551
- k: v
5552
- for k, v in [("cursor", cursor), ("limit", limit), ("sort", sort)]
5553
- if v is not None
5554
- }
4805
+ query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit), ("sort", sort)] if v is not None}
5555
4806
  response = self._get(url, params=query_params)
5556
4807
  response.raise_for_status()
5557
4808
  return response.json()
5558
4809
 
5559
- def get_page_ancestors(self, id, limit=None) -> dict[str, Any]:
4810
+ async def get_page_ancestors(self, id, limit=None) -> dict[str, Any]:
5560
4811
  """
5561
4812
  Retrieves the hierarchical ancestors of a specified Confluence page in top-to-bottom order, returning minimal page details with optional limit control.
5562
4813
 
@@ -5578,7 +4829,7 @@ class ConfluenceApp(APIApplication):
5578
4829
  response.raise_for_status()
5579
4830
  return response.json()
5580
4831
 
5581
- def create_bulk_user_lookup(self, accountIds) -> dict[str, Any]:
4832
+ async def create_bulk_user_lookup(self, accountIds) -> dict[str, Any]:
5582
4833
  """
5583
4834
  Creates a bulk operation on user data using the POST method at the "/users-bulk" endpoint.
5584
4835
 
@@ -5591,9 +4842,7 @@ class ConfluenceApp(APIApplication):
5591
4842
  Tags:
5592
4843
  User
5593
4844
  """
5594
- request_body = {
5595
- "accountIds": accountIds,
5596
- }
4845
+ request_body = {"accountIds": accountIds}
5597
4846
  request_body = {k: v for k, v in request_body.items() if v is not None}
5598
4847
  url = f"{self.base_url}/users-bulk"
5599
4848
  query_params = {}
@@ -5601,7 +4850,7 @@ class ConfluenceApp(APIApplication):
5601
4850
  response.raise_for_status()
5602
4851
  return response.json()
5603
4852
 
5604
- def check_access_by_email(self, emails) -> dict[str, Any]:
4853
+ async def check_access_by_email(self, emails) -> dict[str, Any]:
5605
4854
  """
5606
4855
  Checks user access by email using a POST request to the "/user/access/check-access-by-email" endpoint, returning relevant access information.
5607
4856
 
@@ -5614,9 +4863,7 @@ class ConfluenceApp(APIApplication):
5614
4863
  Tags:
5615
4864
  User
5616
4865
  """
5617
- request_body = {
5618
- "emails": emails,
5619
- }
4866
+ request_body = {"emails": emails}
5620
4867
  request_body = {k: v for k, v in request_body.items() if v is not None}
5621
4868
  url = f"{self.base_url}/user/access/check-access-by-email"
5622
4869
  query_params = {}
@@ -5624,7 +4871,7 @@ class ConfluenceApp(APIApplication):
5624
4871
  response.raise_for_status()
5625
4872
  return response.json()
5626
4873
 
5627
- def invite_by_email(self, emails) -> Any:
4874
+ async def invite_by_email(self, emails) -> Any:
5628
4875
  """
5629
4876
  Sends an email invitation to grant user access and returns a success or error status.
5630
4877
 
@@ -5637,9 +4884,7 @@ class ConfluenceApp(APIApplication):
5637
4884
  Tags:
5638
4885
  User
5639
4886
  """
5640
- request_body = {
5641
- "emails": emails,
5642
- }
4887
+ request_body = {"emails": emails}
5643
4888
  request_body = {k: v for k, v in request_body.items() if v is not None}
5644
4889
  url = f"{self.base_url}/user/access/invite-by-email"
5645
4890
  query_params = {}
@@ -5647,7 +4892,7 @@ class ConfluenceApp(APIApplication):
5647
4892
  response.raise_for_status()
5648
4893
  return response.json()
5649
4894
 
5650
- def get_data_policy_metadata(self) -> dict[str, Any]:
4895
+ async def get_data_policy_metadata(self) -> dict[str, Any]:
5651
4896
  """
5652
4897
  Retrieves data policy metadata from a workspace using the Confluence Cloud REST API.
5653
4898
 
@@ -5663,9 +4908,7 @@ class ConfluenceApp(APIApplication):
5663
4908
  response.raise_for_status()
5664
4909
  return response.json()
5665
4910
 
5666
- def get_data_policy_spaces(
5667
- self, ids=None, keys=None, sort=None, cursor=None, limit=None
5668
- ) -> dict[str, Any]:
4911
+ async def get_data_policy_spaces(self, ids=None, keys=None, sort=None, cursor=None, limit=None) -> dict[str, Any]:
5669
4912
  """
5670
4913
  Retrieves information about data policies affecting spaces, returning details on whether content is blocked for each space specified by query parameters like `ids`, `keys`, `sort`, `cursor`, and `limit`.
5671
4914
 
@@ -5684,21 +4927,13 @@ class ConfluenceApp(APIApplication):
5684
4927
  """
5685
4928
  url = f"{self.base_url}/data-policies/spaces"
5686
4929
  query_params = {
5687
- k: v
5688
- for k, v in [
5689
- ("ids", ids),
5690
- ("keys", keys),
5691
- ("sort", sort),
5692
- ("cursor", cursor),
5693
- ("limit", limit),
5694
- ]
5695
- if v is not None
4930
+ k: v for k, v in [("ids", ids), ("keys", keys), ("sort", sort), ("cursor", cursor), ("limit", limit)] if v is not None
5696
4931
  }
5697
4932
  response = self._get(url, params=query_params)
5698
4933
  response.raise_for_status()
5699
4934
  return response.json()
5700
4935
 
5701
- def get_classification_levels(self) -> list[Any]:
4936
+ async def get_classification_levels(self) -> list[Any]:
5702
4937
  """
5703
4938
  Retrieves a list of classification levels using the "GET" method at the "/classification-levels" path.
5704
4939
 
@@ -5714,7 +4949,7 @@ class ConfluenceApp(APIApplication):
5714
4949
  response.raise_for_status()
5715
4950
  return response.json()
5716
4951
 
5717
- def get_space_default_classification_level(self, id) -> dict[str, Any]:
4952
+ async def get_space_default_classification_level(self, id) -> dict[str, Any]:
5718
4953
  """
5719
4954
  Retrieves the default classification level for a specified space using its unique identifier.
5720
4955
 
@@ -5735,7 +4970,7 @@ class ConfluenceApp(APIApplication):
5735
4970
  response.raise_for_status()
5736
4971
  return response.json()
5737
4972
 
5738
- def put_space_default_classification_level(self, id, status) -> Any:
4973
+ async def put_space_default_classification_level(self, id, status) -> Any:
5739
4974
  """
5740
4975
  Updates the default classification level for a space with the specified ID using the "PUT" method via the API endpoint "/spaces/{id}/classification-level/default."
5741
4976
 
@@ -5751,10 +4986,7 @@ class ConfluenceApp(APIApplication):
5751
4986
  """
5752
4987
  if id is None:
5753
4988
  raise ValueError("Missing required parameter 'id'")
5754
- request_body = {
5755
- "id": id,
5756
- "status": status,
5757
- }
4989
+ request_body = {"id": id, "status": status}
5758
4990
  request_body = {k: v for k, v in request_body.items() if v is not None}
5759
4991
  url = f"{self.base_url}/spaces/{id}/classification-level/default"
5760
4992
  query_params = {}
@@ -5762,7 +4994,7 @@ class ConfluenceApp(APIApplication):
5762
4994
  response.raise_for_status()
5763
4995
  return response.json()
5764
4996
 
5765
- def delete_space_default_classification_level(self, id) -> Any:
4997
+ async def delete_space_default_classification_level(self, id) -> Any:
5766
4998
  """
5767
4999
  Removes the default classification level from a specified space identified by its ID.
5768
5000
 
@@ -5783,7 +5015,7 @@ class ConfluenceApp(APIApplication):
5783
5015
  response.raise_for_status()
5784
5016
  return response.json()
5785
5017
 
5786
- def get_page_classification_level(self, id, status=None) -> dict[str, Any]:
5018
+ async def get_page_classification_level(self, id, status=None) -> dict[str, Any]:
5787
5019
  """
5788
5020
  Retrieves the classification level for a specified page using the `GET` method, accepting a page ID and an optional status query parameter.
5789
5021
 
@@ -5805,7 +5037,7 @@ class ConfluenceApp(APIApplication):
5805
5037
  response.raise_for_status()
5806
5038
  return response.json()
5807
5039
 
5808
- def put_page_classification_level(self, id, status) -> Any:
5040
+ async def put_page_classification_level(self, id, status) -> Any:
5809
5041
  """
5810
5042
  Updates the classification level of a page with the specified ID using the PUT method.
5811
5043
 
@@ -5821,10 +5053,7 @@ class ConfluenceApp(APIApplication):
5821
5053
  """
5822
5054
  if id is None:
5823
5055
  raise ValueError("Missing required parameter 'id'")
5824
- request_body = {
5825
- "id": id,
5826
- "status": status,
5827
- }
5056
+ request_body = {"id": id, "status": status}
5828
5057
  request_body = {k: v for k, v in request_body.items() if v is not None}
5829
5058
  url = f"{self.base_url}/pages/{id}/classification-level"
5830
5059
  query_params = {}
@@ -5832,7 +5061,7 @@ class ConfluenceApp(APIApplication):
5832
5061
  response.raise_for_status()
5833
5062
  return response.json()
5834
5063
 
5835
- def post_page_classification_level(self, id, status) -> Any:
5064
+ async def post_page_classification_level(self, id, status) -> Any:
5836
5065
  """
5837
5066
  Resets the classification level for a specific page to the default, removing any custom classification settings.
5838
5067
 
@@ -5848,9 +5077,7 @@ class ConfluenceApp(APIApplication):
5848
5077
  """
5849
5078
  if id is None:
5850
5079
  raise ValueError("Missing required parameter 'id'")
5851
- request_body = {
5852
- "status": status,
5853
- }
5080
+ request_body = {"status": status}
5854
5081
  request_body = {k: v for k, v in request_body.items() if v is not None}
5855
5082
  url = f"{self.base_url}/pages/{id}/classification-level/reset"
5856
5083
  query_params = {}
@@ -5858,7 +5085,7 @@ class ConfluenceApp(APIApplication):
5858
5085
  response.raise_for_status()
5859
5086
  return response.json()
5860
5087
 
5861
- def get_blog_post_classification_level(self, id, status=None) -> dict[str, Any]:
5088
+ async def get_blog_post_classification_level(self, id, status=None) -> dict[str, Any]:
5862
5089
  """
5863
5090
  Retrieves the classification level for a specific blog post identified by its ID using the GET method at the "/blogposts/{id}/classification-level" endpoint, allowing for optional filtering by status.
5864
5091
 
@@ -5880,7 +5107,7 @@ class ConfluenceApp(APIApplication):
5880
5107
  response.raise_for_status()
5881
5108
  return response.json()
5882
5109
 
5883
- def put_blog_post_classification_level(self, id, status) -> Any:
5110
+ async def put_blog_post_classification_level(self, id, status) -> Any:
5884
5111
  """
5885
5112
  Updates the classification level of the blog post with the specified ID and returns a success status upon completion.
5886
5113
 
@@ -5896,10 +5123,7 @@ class ConfluenceApp(APIApplication):
5896
5123
  """
5897
5124
  if id is None:
5898
5125
  raise ValueError("Missing required parameter 'id'")
5899
- request_body = {
5900
- "id": id,
5901
- "status": status,
5902
- }
5126
+ request_body = {"id": id, "status": status}
5903
5127
  request_body = {k: v for k, v in request_body.items() if v is not None}
5904
5128
  url = f"{self.base_url}/blogposts/{id}/classification-level"
5905
5129
  query_params = {}
@@ -5907,7 +5131,7 @@ class ConfluenceApp(APIApplication):
5907
5131
  response.raise_for_status()
5908
5132
  return response.json()
5909
5133
 
5910
- def post_blog_post_classification_level(self, id, status) -> Any:
5134
+ async def post_blog_post_classification_level(self, id, status) -> Any:
5911
5135
  """
5912
5136
  Resets the classification level for a specific blog post to the space's default level using the Confluence REST API.
5913
5137
 
@@ -5923,9 +5147,7 @@ class ConfluenceApp(APIApplication):
5923
5147
  """
5924
5148
  if id is None:
5925
5149
  raise ValueError("Missing required parameter 'id'")
5926
- request_body = {
5927
- "status": status,
5928
- }
5150
+ request_body = {"status": status}
5929
5151
  request_body = {k: v for k, v in request_body.items() if v is not None}
5930
5152
  url = f"{self.base_url}/blogposts/{id}/classification-level/reset"
5931
5153
  query_params = {}
@@ -5933,7 +5155,7 @@ class ConfluenceApp(APIApplication):
5933
5155
  response.raise_for_status()
5934
5156
  return response.json()
5935
5157
 
5936
- def get_whiteboard_classification_level(self, id) -> dict[str, Any]:
5158
+ async def get_whiteboard_classification_level(self, id) -> dict[str, Any]:
5937
5159
  """
5938
5160
  Retrieves the classification level of a specific whiteboard identified by its ID, returning relevant information if the request is successful.
5939
5161
 
@@ -5954,7 +5176,7 @@ class ConfluenceApp(APIApplication):
5954
5176
  response.raise_for_status()
5955
5177
  return response.json()
5956
5178
 
5957
- def put_whiteboard_classification_level(self, id, status) -> Any:
5179
+ async def put_whiteboard_classification_level(self, id, status) -> Any:
5958
5180
  """
5959
5181
  Updates the classification level for a specific whiteboard identified by its ID using the Confluence Cloud REST API.
5960
5182
 
@@ -5970,10 +5192,7 @@ class ConfluenceApp(APIApplication):
5970
5192
  """
5971
5193
  if id is None:
5972
5194
  raise ValueError("Missing required parameter 'id'")
5973
- request_body = {
5974
- "id": id,
5975
- "status": status,
5976
- }
5195
+ request_body = {"id": id, "status": status}
5977
5196
  request_body = {k: v for k, v in request_body.items() if v is not None}
5978
5197
  url = f"{self.base_url}/whiteboards/{id}/classification-level"
5979
5198
  query_params = {}
@@ -5981,7 +5200,7 @@ class ConfluenceApp(APIApplication):
5981
5200
  response.raise_for_status()
5982
5201
  return response.json()
5983
5202
 
5984
- def post_whiteboard_classification_level(self, id, status) -> Any:
5203
+ async def post_whiteboard_classification_level(self, id, status) -> Any:
5985
5204
  """
5986
5205
  Resets the classification level for a specific whiteboard to the default space classification level using the Confluence Cloud REST API.
5987
5206
 
@@ -5997,9 +5216,7 @@ class ConfluenceApp(APIApplication):
5997
5216
  """
5998
5217
  if id is None:
5999
5218
  raise ValueError("Missing required parameter 'id'")
6000
- request_body = {
6001
- "status": status,
6002
- }
5219
+ request_body = {"status": status}
6003
5220
  request_body = {k: v for k, v in request_body.items() if v is not None}
6004
5221
  url = f"{self.base_url}/whiteboards/{id}/classification-level/reset"
6005
5222
  query_params = {}
@@ -6007,7 +5224,7 @@ class ConfluenceApp(APIApplication):
6007
5224
  response.raise_for_status()
6008
5225
  return response.json()
6009
5226
 
6010
- def get_database_classification_level(self, id) -> dict[str, Any]:
5227
+ async def get_database_classification_level(self, id) -> dict[str, Any]:
6011
5228
  """
6012
5229
  Retrieves the classification level of a specific database by its unique identifier.
6013
5230
 
@@ -6028,7 +5245,7 @@ class ConfluenceApp(APIApplication):
6028
5245
  response.raise_for_status()
6029
5246
  return response.json()
6030
5247
 
6031
- def put_database_classification_level(self, id, status) -> Any:
5248
+ async def put_database_classification_level(self, id, status) -> Any:
6032
5249
  """
6033
5250
  Updates the classification level of a database identified by `{id}` using the PUT method.
6034
5251
 
@@ -6044,10 +5261,7 @@ class ConfluenceApp(APIApplication):
6044
5261
  """
6045
5262
  if id is None:
6046
5263
  raise ValueError("Missing required parameter 'id'")
6047
- request_body = {
6048
- "id": id,
6049
- "status": status,
6050
- }
5264
+ request_body = {"id": id, "status": status}
6051
5265
  request_body = {k: v for k, v in request_body.items() if v is not None}
6052
5266
  url = f"{self.base_url}/databases/{id}/classification-level"
6053
5267
  query_params = {}
@@ -6055,7 +5269,7 @@ class ConfluenceApp(APIApplication):
6055
5269
  response.raise_for_status()
6056
5270
  return response.json()
6057
5271
 
6058
- def post_database_classification_level(self, id, status) -> Any:
5272
+ async def post_database_classification_level(self, id, status) -> Any:
6059
5273
  """
6060
5274
  Resets the classification level for a specified database using a POST request and returns an empty response on success.
6061
5275
 
@@ -6071,9 +5285,7 @@ class ConfluenceApp(APIApplication):
6071
5285
  """
6072
5286
  if id is None:
6073
5287
  raise ValueError("Missing required parameter 'id'")
6074
- request_body = {
6075
- "status": status,
6076
- }
5288
+ request_body = {"status": status}
6077
5289
  request_body = {k: v for k, v in request_body.items() if v is not None}
6078
5290
  url = f"{self.base_url}/databases/{id}/classification-level/reset"
6079
5291
  query_params = {}