atlassian-python-api 4.0.7__py3-none-any.whl → 5.0.0__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 (60) hide show
  1. atlassian/VERSION +1 -1
  2. atlassian/__init__.py +18 -1
  3. atlassian/assets.py +1 -1
  4. atlassian/bamboo.py +4 -4
  5. atlassian/bitbucket/__init__.py +3 -3
  6. atlassian/bitbucket/cloud/repositories/pipelines.py +1 -1
  7. atlassian/bitbucket/cloud/workspaces/__init__.py +2 -2
  8. atlassian/bitbucket/cloud/workspaces/projects.py +1 -1
  9. atlassian/bitbucket/server/__init__.py +1 -1
  10. atlassian/bitbucket/server/projects/__init__.py +2 -1
  11. atlassian/bitbucket/server/projects/repos/__init__.py +1 -0
  12. atlassian/confluence/__init__.py +54 -4106
  13. atlassian/confluence/base.py +195 -0
  14. atlassian/confluence/cloud/__init__.py +354 -0
  15. atlassian/confluence/cloud/base.py +25 -0
  16. atlassian/confluence/cloud/cloud.py +2480 -0
  17. atlassian/confluence/server/__init__.py +3988 -0
  18. atlassian/confluence/server/base.py +25 -0
  19. atlassian/confluence/server/confluence_server.py +28 -0
  20. atlassian/confluence_base.py +281 -0
  21. atlassian/confluence_v2.py +7 -0
  22. atlassian/crowd.py +1 -1
  23. atlassian/insight.py +3 -2
  24. atlassian/jira.py +309 -16
  25. atlassian/jira_models.py +10 -0
  26. atlassian/models/__init__.py +5 -0
  27. atlassian/models/jira/__init__.py +109 -0
  28. atlassian/models/jira/adf.py +178 -0
  29. atlassian/models/jira/builders.py +272 -0
  30. atlassian/models/jira/comment.py +52 -0
  31. atlassian/models/jira/fields.py +236 -0
  32. atlassian/models/jira/issues.py +101 -0
  33. atlassian/models/jira/serializer.py +138 -0
  34. atlassian/models/jira/transition.py +78 -0
  35. atlassian/models/jira/update.py +179 -0
  36. atlassian/models/jira/validation.py +56 -0
  37. atlassian/models/py.typed +0 -0
  38. atlassian/rest_client.py +81 -15
  39. atlassian/service_desk.py +41 -1
  40. atlassian/statuspage.py +7 -6
  41. atlassian/tempo/__init__.py +14 -0
  42. atlassian/tempo/cloud/__init__.py +232 -0
  43. atlassian/tempo/cloud/base.py +38 -0
  44. atlassian/tempo/server/__init__.py +78 -0
  45. atlassian/tempo/server/accounts.py +38 -0
  46. atlassian/tempo/server/base.py +50 -0
  47. atlassian/tempo/server/budgets.py +42 -0
  48. atlassian/tempo/server/events.py +52 -0
  49. atlassian/tempo/server/planner.py +42 -0
  50. atlassian/tempo/server/servlet.py +46 -0
  51. atlassian/tempo/server/teams.py +50 -0
  52. atlassian/tempo/server/timesheets.py +54 -0
  53. atlassian/typehints.py +14 -2
  54. atlassian/xray.py +2 -0
  55. {atlassian_python_api-4.0.7.dist-info → atlassian_python_api-5.0.0.dist-info}/METADATA +45 -5
  56. atlassian_python_api-5.0.0.dist-info/RECORD +92 -0
  57. {atlassian_python_api-4.0.7.dist-info → atlassian_python_api-5.0.0.dist-info}/WHEEL +1 -1
  58. atlassian_python_api-4.0.7.dist-info/RECORD +0 -58
  59. {atlassian_python_api-4.0.7.dist-info → atlassian_python_api-5.0.0.dist-info}/licenses/LICENSE +0 -0
  60. {atlassian_python_api-4.0.7.dist-info → atlassian_python_api-5.0.0.dist-info}/top_level.txt +0 -0
atlassian/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.7
1
+ 5.0.0
atlassian/__init__.py CHANGED
@@ -6,7 +6,8 @@ from .bamboo import Bamboo
6
6
  from .bitbucket import Bitbucket
7
7
  from .bitbucket import Bitbucket as Stash
8
8
  from .cloud_admin import CloudAdminOrgs, CloudAdminUsers
9
- from .confluence import Confluence
9
+ from .confluence import Confluence, ConfluenceBase, ConfluenceCloud, ConfluenceServer
10
+ from .confluence.cloud.cloud import ConfluenceCloud as ConfluenceV2
10
11
  from .crowd import Crowd
11
12
  from .insight import Insight
12
13
  from .insight import Insight as Assets # used for Insight on-premise
@@ -16,10 +17,24 @@ from .marketplace import MarketPlace
16
17
  from .portfolio import Portfolio
17
18
  from .service_desk import ServiceDesk
18
19
  from .service_desk import ServiceDesk as ServiceManagement
20
+ from .tempo import TempoCloud, TempoServer
19
21
  from .xray import Xray
20
22
 
23
+
24
+ # Confluence REST API v2 client. The existing ``Confluence`` class remains
25
+ # the backwards-compatible v1/v2 URL-dispatching client.
26
+ def create_confluence(url, *args, api_version=1, **kwargs):
27
+ """Create a version-aware Confluence client."""
28
+ return ConfluenceBase.factory(url, *args, api_version=api_version, **kwargs)
29
+
30
+
21
31
  __all__ = [
22
32
  "Confluence",
33
+ "ConfluenceBase",
34
+ "ConfluenceCloud",
35
+ "ConfluenceServer",
36
+ "ConfluenceV2",
37
+ "create_confluence",
23
38
  "Jira",
24
39
  "Bitbucket",
25
40
  "CloudAdminOrgs",
@@ -35,4 +50,6 @@ __all__ = [
35
50
  "Insight",
36
51
  "Assets",
37
52
  "AssetsCloud",
53
+ "TempoCloud",
54
+ "TempoServer",
38
55
  ]
atlassian/assets.py CHANGED
@@ -174,7 +174,7 @@ class AssetsCloud(AtlassianRestAPI):
174
174
  raise NotImplementedError
175
175
  params = {"comment": comment, "objectId": object_id, "role": role}
176
176
  url = "rest/assets/1.0/comment/create"
177
- return self.post(url, params=params)
177
+ return self.post(url, data=params)
178
178
 
179
179
  def get_comment_of_object(self, object_id):
180
180
  """
atlassian/bamboo.py CHANGED
@@ -71,8 +71,8 @@ class Bamboo(AtlassianRestAPI):
71
71
  max_results,
72
72
  label=None,
73
73
  start_index=0,
74
- **kwargs
75
- ): # fmt: skip
74
+ **kwargs,
75
+ ):
76
76
  flags = []
77
77
  params = {"max-results": max_results}
78
78
  if expand:
@@ -628,8 +628,8 @@ class Bamboo(AtlassianRestAPI):
628
628
  stage=None,
629
629
  execute_all_stages=True,
630
630
  custom_revision=None,
631
- **bamboo_variables
632
- ): # fmt: skip
631
+ **bamboo_variables,
632
+ ):
633
633
  """
634
634
  Fire build execution for specified plan.
635
635
  !IMPORTANT! NOTE: for some reason, this method always execute all stages
@@ -1056,7 +1056,7 @@ class Bitbucket(BitbucketBase):
1056
1056
  repo_administrators = []
1057
1057
  for user in self.repo_users(project_key, repo_key):
1058
1058
  if user["permission"] == "REPO_ADMIN":
1059
- repo_administrators.append(user)
1059
+ repo_administrators.append(user["user"])
1060
1060
  for group in self.repo_groups_with_administrator_permissions(project_key, repo_key):
1061
1061
  for user in self.group_members(group):
1062
1062
  repo_administrators.append(user)
@@ -2575,8 +2575,8 @@ class Bitbucket(BitbucketBase):
2575
2575
  commit_id,
2576
2576
  report_key,
2577
2577
  report_title,
2578
- **report_params
2579
- ): # fmt: skip
2578
+ **report_params,
2579
+ ):
2580
2580
  """
2581
2581
  Create a new insight report, or replace the existing one
2582
2582
  if a report already exists for the given repository_slug, commit, and report key.
@@ -1,9 +1,9 @@
1
1
  # coding=utf-8
2
2
 
3
- from .pullRequests import PullRequest
4
3
  from requests import HTTPError
5
4
 
6
5
  from ..base import BitbucketCloudBase
6
+ from .pullRequests import PullRequest
7
7
 
8
8
 
9
9
  class Pipelines(BitbucketCloudBase):
@@ -1,12 +1,12 @@
1
1
  # coding=utf-8
2
2
 
3
3
  from requests import HTTPError
4
- from ..base import BitbucketCloudBase
5
4
 
5
+ from ..base import BitbucketCloudBase
6
+ from ..repositories import WorkspaceRepositories
6
7
  from .members import WorkspaceMembers
7
8
  from .permissions import Permissions
8
9
  from .projects import Projects
9
- from ..repositories import WorkspaceRepositories
10
10
 
11
11
 
12
12
  class Workspaces(BitbucketCloudBase):
@@ -1,8 +1,8 @@
1
1
  # coding=utf-8
2
2
 
3
3
  from requests import HTTPError
4
- from ..base import BitbucketCloudBase
5
4
 
5
+ from ..base import BitbucketCloudBase
6
6
  from ..repositories import ProjectRepositories
7
7
 
8
8
 
@@ -1,8 +1,8 @@
1
1
  # coding=utf-8
2
2
 
3
3
  from .base import BitbucketServerBase
4
- from .projects import Projects
5
4
  from .globalPermissions import Groups, Users
5
+ from .projects import Projects
6
6
 
7
7
 
8
8
  class Server(BitbucketServerBase):
@@ -1,9 +1,10 @@
1
1
  # coding=utf-8
2
2
 
3
3
  from requests import HTTPError
4
- from .repos import Repositories
4
+
5
5
  from ..base import BitbucketServerBase
6
6
  from ..common.permissions import Groups, Users
7
+ from .repos import Repositories
7
8
 
8
9
 
9
10
  class Projects(BitbucketServerBase):
@@ -1,6 +1,7 @@
1
1
  # coding=utf-8
2
2
 
3
3
  from requests import HTTPError
4
+
4
5
  from ...base import BitbucketServerBase
5
6
  from ...common.permissions import Groups, Users
6
7