atlassian-python-api 5.0.0__py3-none-any.whl → 5.0.2__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 (44) hide show
  1. atlassian/VERSION +1 -1
  2. atlassian/__init__.py +13 -2
  3. atlassian/assets.py +10 -3
  4. atlassian/bamboo.py +197 -4
  5. atlassian/bitbucket/__init__.py +87 -1
  6. atlassian/bitbucket/base.py +11 -14
  7. atlassian/bitbucket/cloud/repositories/__init__.py +33 -0
  8. atlassian/bitbucket/cloud/workspaces/__init__.py +15 -7
  9. atlassian/bitbucket/server/__init__.py +11 -0
  10. atlassian/cloud_admin.py +418 -0
  11. atlassian/confluence/__init__.py +13 -1
  12. atlassian/confluence/base.py +80 -14
  13. atlassian/confluence/cloud/__init__.py +233 -11
  14. atlassian/confluence/cloud/classification_levels.py +77 -0
  15. atlassian/confluence/cloud/cloud.py +79 -186
  16. atlassian/confluence/cloud/content_properties.py +71 -0
  17. atlassian/confluence/cloud/databases.py +59 -0
  18. atlassian/confluence/cloud/folders.py +48 -0
  19. atlassian/confluence/cloud/graphql.py +99 -0
  20. atlassian/confluence/cloud/tasks.py +86 -0
  21. atlassian/confluence/cloud/whiteboards.py +95 -0
  22. atlassian/confluence/server/__init__.py +603 -194
  23. atlassian/confluence_base.py +28 -3
  24. atlassian/crowd.py +78 -0
  25. atlassian/jira/__init__.py +21 -0
  26. atlassian/jira/core_methods.py +11698 -0
  27. atlassian/jira/jira_cloud.py +160 -0
  28. atlassian/{jira.py → jira/jira_server.py} +336 -8
  29. atlassian/jira/service_management_methods.py +1381 -0
  30. atlassian/jira/software_methods.py +2114 -0
  31. atlassian/rest_client.py +67 -8
  32. atlassian/service_desk.py +10 -3
  33. atlassian/yogi/__init__.py +17 -0
  34. atlassian/yogi/base.py +11 -0
  35. atlassian/yogi/cloud.py +2367 -0
  36. atlassian/yogi/yogi_confluence_cloud.py +10 -0
  37. atlassian/yogi/yogi_confluence_dc.py +94 -0
  38. atlassian/yogi/yogi_jira_cloud.py +10 -0
  39. atlassian/yogi/yogi_jira_dc.py +64 -0
  40. {atlassian_python_api-5.0.0.dist-info → atlassian_python_api-5.0.2.dist-info}/METADATA +80 -10
  41. {atlassian_python_api-5.0.0.dist-info → atlassian_python_api-5.0.2.dist-info}/RECORD +44 -25
  42. {atlassian_python_api-5.0.0.dist-info → atlassian_python_api-5.0.2.dist-info}/WHEEL +0 -0
  43. {atlassian_python_api-5.0.0.dist-info → atlassian_python_api-5.0.2.dist-info}/licenses/LICENSE +0 -0
  44. {atlassian_python_api-5.0.0.dist-info → atlassian_python_api-5.0.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,95 @@
1
+ """Confluence Cloud V2 whiteboard operations."""
2
+
3
+ from typing import Any, Dict, List, Optional
4
+
5
+ from ...confluence_base import ConfluenceBase
6
+
7
+
8
+ class WhiteboardOperations(ConfluenceBase):
9
+ """Base component implementing Confluence Cloud whiteboard endpoints."""
10
+
11
+ def create_whiteboard(
12
+ self,
13
+ space_id: str,
14
+ title: Optional[str] = None,
15
+ parent_id: Optional[str] = None,
16
+ template_key: Optional[str] = None,
17
+ locale: Optional[str] = None,
18
+ private: Optional[bool] = None,
19
+ ) -> Optional[Dict[str, Any]]:
20
+ """Create a whiteboard in a Confluence Cloud space.
21
+
22
+ Scoped tokens require ``write:whiteboard:confluence``. ``private`` is
23
+ sent as the API query parameter; the remaining optional values are
24
+ fields in the request body.
25
+ """
26
+ data: Dict[str, str] = {"spaceId": space_id}
27
+ if title is not None:
28
+ data["title"] = title
29
+ if parent_id is not None:
30
+ data["parentId"] = parent_id
31
+ if template_key is not None:
32
+ data["templateKey"] = template_key
33
+ if locale is not None:
34
+ data["locale"] = locale
35
+ if private is None:
36
+ return self.post(self.get_endpoint("whiteboard"), data=data)
37
+ return self.post(self.get_endpoint("whiteboard"), data=data, params={"private": private})
38
+
39
+ def get_whiteboard(
40
+ self,
41
+ whiteboard_id: str,
42
+ include_collaborators: Optional[bool] = None,
43
+ include_direct_children: Optional[bool] = None,
44
+ include_operations: Optional[bool] = None,
45
+ include_properties: Optional[bool] = None,
46
+ ) -> Optional[Dict[str, Any]]:
47
+ """Return a whiteboard by ID.
48
+
49
+ Scoped tokens require ``read:whiteboard:confluence``.
50
+ """
51
+ optional_params = {
52
+ "include-collaborators": include_collaborators,
53
+ "include-direct-children": include_direct_children,
54
+ "include-operations": include_operations,
55
+ "include-properties": include_properties,
56
+ }
57
+ params = {key: value for key, value in optional_params.items() if value is not None}
58
+ endpoint = self.get_endpoint("whiteboard_by_id", id=whiteboard_id)
59
+ if not params:
60
+ return self.get(endpoint)
61
+ return self.get(endpoint, params=params)
62
+
63
+ def get_whiteboard_by_id(self, whiteboard_id: str, **kwargs) -> Optional[Dict[str, Any]]:
64
+ """Backward-compatible alias for :meth:`get_whiteboard`."""
65
+ return self.get_whiteboard(whiteboard_id, **kwargs)
66
+
67
+ def delete_whiteboard(self, whiteboard_id: str) -> Optional[Dict[str, Any]]:
68
+ """Move a whiteboard to the Confluence Cloud trash.
69
+
70
+ Scoped tokens require ``delete:whiteboard:confluence``.
71
+ """
72
+ return self.delete(self.get_endpoint("whiteboard_by_id", id=whiteboard_id))
73
+
74
+ def get_whiteboard_children(
75
+ self, whiteboard_id: str, cursor: Optional[str] = None, limit: Optional[int] = None
76
+ ) -> List[Dict[str, Any]]:
77
+ """Return every child of a whiteboard, following pagination."""
78
+ params = {key: value for key, value in {"cursor": cursor, "limit": limit}.items() if value is not None}
79
+ return list(self._get_paged(self.get_endpoint("whiteboard_children", id=whiteboard_id), params=params))
80
+
81
+ def get_whiteboard_ancestors(self, whiteboard_id: str) -> List[Dict[str, Any]]:
82
+ """Return the ancestors of a whiteboard."""
83
+ response = self.get(self.get_endpoint("whiteboard_ancestors", id=whiteboard_id))
84
+ if response is None:
85
+ return []
86
+ return response.get("results", [])
87
+
88
+ def get_space_whiteboards(
89
+ self, space_id: str, cursor: Optional[str] = None, limit: int = 25
90
+ ) -> List[Dict[str, Any]]:
91
+ """Return every whiteboard in a space, following pagination."""
92
+ params: Dict[str, Any] = {"spaceId": space_id, "limit": limit}
93
+ if cursor is not None:
94
+ params["cursor"] = cursor
95
+ return list(self._get_paged(self.get_endpoint("whiteboard"), params=params))