Skip to content

Commit

Permalink
Release 99
Browse files Browse the repository at this point in the history
# Patch notes for 99.0.2541

These patch notes summarize the changes from version 98.0.2363.

Added 2 new APIs:
* TaskField.QueryTaskFields (GET /api/data/projects/tasks/fields)
* TaskField.QueryTaskFieldValues (GET /api/data/tasks/fields/values)

Renamed 2 old APIs:
* Renamed 'ProjectField.UpdateProjectField' to 'ProjectField.UpdateProjectFieldValue'
* Renamed 'ProjectMembers.RetrieveUserProjectMemberShip' to 'ProjectMembers.RetrieveUserProjectMembership'
  • Loading branch information
tspence committed Dec 5, 2023
1 parent cece1fc commit 3eb2bed
Show file tree
Hide file tree
Showing 25 changed files with 483 additions and 301 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ProjectManagerSdk"
version = "98.0.2363"
version = "99.0.2541"
authors = [
{ name = "ProjectManager.com", email = "[email protected]" }
]
Expand Down
11 changes: 6 additions & 5 deletions src/ProjectManagerSdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,25 @@
from ProjectManagerSdk.models.createprojectfieldresponsedto import CreateProjectFieldResponseDto
from ProjectManagerSdk.models.createresourceskilldto import CreateResourceSkillDto
from ProjectManagerSdk.models.createresourceteamdto import CreateResourceTeamDto
from ProjectManagerSdk.models.createtaskfieldrequestdto import CreateTaskFieldRequestDto
from ProjectManagerSdk.models.createtaskfielddto import CreateTaskFieldDto
from ProjectManagerSdk.models.dashboardsettingcreatedto import DashboardSettingCreateDto
from ProjectManagerSdk.models.dashboardsettingdto import DashboardSettingDto
from ProjectManagerSdk.models.deleteprojectfielddto import DeleteProjectFieldDto
from ProjectManagerSdk.models.directlinkdto import DirectLinkDto
from ProjectManagerSdk.models.discussioncreatedto import DiscussionCreateDto
from ProjectManagerSdk.models.discussioncreateresponsedto import DiscussionCreateResponseDto
from ProjectManagerSdk.models.discussiondto import DiscussionDto
from ProjectManagerSdk.models.discussionemoji import DiscussionEmoji
from ProjectManagerSdk.models.filedto import FileDto
from ProjectManagerSdk.models.getprojectfieldsresponsedto import GetProjectFieldsResponseDto
from ProjectManagerSdk.models.gettaskfieldsresponsedto import GetTaskFieldsResponseDto
from ProjectManagerSdk.models.iddto import IdDto
from ProjectManagerSdk.models.integrationauthsetupdto import IntegrationAuthSetupDto
from ProjectManagerSdk.models.integrationcategorydto import IntegrationCategoryDto
from ProjectManagerSdk.models.integrationconnectionschemeobjectdto import IntegrationConnectionSchemeObjectDto
from ProjectManagerSdk.models.integrationdto import IntegrationDto
from ProjectManagerSdk.models.integrationinstancedto import IntegrationInstanceDto
from ProjectManagerSdk.models.integrationproviderdto import IntegrationProviderDto
from ProjectManagerSdk.models.licensedto import LicenseDto
from ProjectManagerSdk.models.masterconnectionschemedto import MasterConnectionSchemeDto
from ProjectManagerSdk.models.namedto import NameDto
from ProjectManagerSdk.models.odataentitysetinfo import ODataEntitySetInfo
from ProjectManagerSdk.models.odatafunctionimportinfo import ODataFunctionImportInfo
Expand Down Expand Up @@ -105,10 +105,11 @@
from ProjectManagerSdk.models.tagupdatedto import TagUpdateDto
from ProjectManagerSdk.models.taskassigneedto import TaskAssigneeDto
from ProjectManagerSdk.models.taskcreatedto import TaskCreateDto
from ProjectManagerSdk.models.taskdetailsdto import TaskDetailsDto
from ProjectManagerSdk.models.taskdto import TaskDto
from ProjectManagerSdk.models.taskfielddto import TaskFieldDto
from ProjectManagerSdk.models.taskfieldsvalueresponsedto import TaskFieldsValueResponseDto
from ProjectManagerSdk.models.taskfieldprojectdto import TaskFieldProjectDto
from ProjectManagerSdk.models.taskfieldvaluedto import TaskFieldValueDto
from ProjectManagerSdk.models.taskfieldvaluetaskdto import TaskFieldValueTaskDto
from ProjectManagerSdk.models.taskprioritydto import TaskPriorityDto
from ProjectManagerSdk.models.taskprojectdto import TaskProjectDto
from ProjectManagerSdk.models.taskstatuscreatedto import TaskStatusCreateDto
Expand Down
8 changes: 4 additions & 4 deletions src/ProjectManagerSdk/clients/projectcustomerclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def retrieve_project_customers(self) -> AstroResult[list[ProjectCustomerDto]]:
"""
Retrieves all ProjectCustomers defined within your Workspace.
A ProjectCustomer is a code used to identify costs within your
Projects. Each ProjectCustomer has a name and a unique
identifier. ProjectCustomers are defined per Workspace and are
shared among Projects.
A ProjectCustomer is a code used to identify customers
associated with your Projects. Each ProjectCustomer has a name
and a unique identifier. ProjectCustomers are defined per
Workspace and are shared among Projects.
Parameters
----------
Expand Down
34 changes: 23 additions & 11 deletions src/ProjectManagerSdk/clients/projectfieldclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from ProjectManagerSdk.models.astroresult import AstroResult
from ProjectManagerSdk.models.createprojectfielddto import CreateProjectFieldDto
from ProjectManagerSdk.models.createprojectfieldresponsedto import CreateProjectFieldResponseDto
from ProjectManagerSdk.models.deleteprojectfielddto import DeleteProjectFieldDto
from ProjectManagerSdk.models.getprojectfieldsresponsedto import GetProjectFieldsResponseDto
from ProjectManagerSdk.models.projectfieldsvalueresponsedto import ProjectFieldsValueResponseDto
from ProjectManagerSdk.models.updateprojectfieldvaluedto import UpdateProjectFieldValueDto
Expand Down Expand Up @@ -76,7 +75,7 @@ def create_project_field(self, body: CreateProjectFieldDto) -> AstroResult[Creat
else:
return AstroResult[CreateProjectFieldResponseDto](result.json(), False, True, result.status_code, None)

def delete_project_field(self, body: DeleteProjectFieldDto) -> AstroResult[object]:
def delete_project_field(self, fieldId: str) -> AstroResult[object]:
"""
Deletes an existing ProjectField within your Workspace.
Expand All @@ -88,20 +87,21 @@ def delete_project_field(self, body: DeleteProjectFieldDto) -> AstroResult[objec
Parameters
----------
body : DeleteProjectFieldDto
The identity of the ProjectField to delete
fieldId : str
The unique identifier or short ID of this ProjectField
"""
path = "/api/data/projects/fields"
path = f"/api/data/projects/fields/{fieldId}"
queryParams = {}
result = self.client.send_request("DELETE", path, body, queryParams, None)
result = self.client.send_request("DELETE", path, None, queryParams, None)
if result.status_code >= 200 and result.status_code < 300:
return AstroResult[object](None, True, False, result.status_code, object(**json.loads(result.content)['data']))
else:
return AstroResult[object](result.json(), False, True, result.status_code, None)

def update_project_field(self, projectId: str, fieldId: str, body: UpdateProjectFieldValueDto) -> AstroResult[object]:
def update_projectfield_value(self, projectId: str, fieldId: str, body: UpdateProjectFieldValueDto) -> AstroResult[object]:
"""
Updates an existing ProjectField with new information.
Replaces the current value of a ProjectField for a specific
Project within your Workspace.
A ProjectField is a custom field defined within your Workspace.
You can define ProjectFields for any integration purpose that is
Expand All @@ -115,7 +115,7 @@ def update_project_field(self, projectId: str, fieldId: str, body: UpdateProject
The unique identifier of the Project that contains this
ProjectField
fieldId : str
The unique identifier of this ProjectField
The unique identifier or short ID of this ProjectField
body : UpdateProjectFieldValueDto
The new information for this ProjectField
"""
Expand All @@ -132,14 +132,20 @@ def retrieve_projectfield_value(self, projectId: str, fieldId: str) -> AstroResu
Retrieves the current ProjectField value for a particular
Project and ProjectField.
A ProjectField is a custom field defined within your Workspace.
You can define ProjectFields for any integration purpose that is
important to your business. Each ProjectField has a data type as
well as options in how it is handled. ProjectFields can be
edited for each Project within your Workspace.
Parameters
----------
projectId : str
The unique identifier of the Project of the value to
retrieve
fieldId : str
The unique identifier of the ProjectField of the value to
retrieve
The unique identifier or short ID of the ProjectField of the
value to retrieve
"""
path = f"/api/data/projects/{projectId}/fields/{fieldId}"
queryParams = {}
Expand All @@ -153,6 +159,12 @@ def retrieve_all_projectfield_values(self, projectId: str) -> AstroResult[list[P
"""
Retrieves all ProjectField values for a particular Project.
A ProjectField is a custom field defined within your Workspace.
You can define ProjectFields for any integration purpose that is
important to your business. Each ProjectField has a data type as
well as options in how it is handled. ProjectFields can be
edited for each Project within your Workspace.
Parameters
----------
projectId : str
Expand Down
60 changes: 52 additions & 8 deletions src/ProjectManagerSdk/clients/projectmembersclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ def __init__(self, client: ProjectManagerClient):

def retrieve_new_project_members(self) -> AstroResult[list[ProjectMemberDto]]:
"""
Returns a list of membership options for new projects.
Returns a list of users that can be added as members of a new
project, as well as their available project security roles.
A project member is a user who has access to a specific project.
Project members are assigned a project security role, which
controls the level of access they have to the project. Possible
project security roles include manage, edit, collaborate,
creator, and guest.
Parameters
----------
Expand All @@ -45,8 +52,17 @@ def retrieve_new_project_members(self) -> AstroResult[list[ProjectMemberDto]]:

def retrieve_project_members(self, projectId: str, includeAllUsers: bool) -> AstroResult[list[ProjectMemberDto]]:
"""
Returns a list of membership options for existing members.
Optionally include users who are not a member yet.
Returns a list of users that are currently members of a
specified project, as well as their current project security
roles and available project security roles. Optionally include
users who are not currently members of the project, but who are
available to be added.
A project member is a user who has access to a specific project.
Project members are assigned a project security role, which
controls the level of access they have to the project. Possible
project security roles include manage, edit, collaborate,
creator, and guest.
Parameters
----------
Expand All @@ -70,7 +86,14 @@ def retrieve_project_members(self, projectId: str, includeAllUsers: bool) -> Ast

def retrieve_user_project_membership(self, projectId: str, userId: str) -> AstroResult[ProjectMemberDto]:
"""
Return the membership of a project for a user.
Returns the project security role in a specified project for a
current project member.
A project member is a user who has access to a specific project.
Project members are assigned a project security role, which
controls the level of access they have to the project. Possible
project security roles include manage, edit, collaborate,
creator, and guest.
Parameters
----------
Expand All @@ -89,8 +112,15 @@ def retrieve_user_project_membership(self, projectId: str, userId: str) -> Astro

def create_user_project_membership(self, projectId: str, userId: str, body: ProjectMemberRoleDto) -> AstroResult[ProjectMemberDto]:
"""
Creates a membership for a user in a project and assigns the
user appropriate permissions
Creates a membership for a user in a specified project, and
assigns the user the appropriate project access based on the
specified project security role.
A project member is a user who has access to a specific project.
Project members are assigned a project security role, which
controls the level of access they have to the project. Possible
project security roles include manage, edit, collaborate,
creator, and guest.
Parameters
----------
Expand All @@ -111,7 +141,14 @@ def create_user_project_membership(self, projectId: str, userId: str, body: Proj

def update_user_project_membership(self, projectId: str, userId: str, body: ProjectMemberRoleDto) -> AstroResult[ProjectMemberDto]:
"""
Update existing Project Access Control for user for project
Updates the project access for a current member of a specified
project by giving the user a new project security role.
A project member is a user who has access to a specific project.
Project members are assigned a project security role, which
controls the level of access they have to the project. Possible
project security roles include manage, edit, collaborate,
creator, and guest.
Parameters
----------
Expand All @@ -132,7 +169,14 @@ def update_user_project_membership(self, projectId: str, userId: str, body: Proj

def remove_user_project_membership(self, projectId: str, userId: str) -> AstroResult[object]:
"""
Deletes Project Member
Removes a current project member from a specified project. This
removes the user's access to that project.
A project member is a user who has access to a specific project.
Project members are assigned a project security role, which
controls the level of access they have to the project. Possible
project security roles include manage, edit, collaborate,
creator, and guest.
Parameters
----------
Expand Down
7 changes: 3 additions & 4 deletions src/ProjectManagerSdk/clients/taskclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from ProjectManagerSdk.models.astroresult import AstroResult
from ProjectManagerSdk.models.changesetstatusdto import ChangeSetStatusDto
from ProjectManagerSdk.models.taskcreatedto import TaskCreateDto
from ProjectManagerSdk.models.taskdetailsdto import TaskDetailsDto
from ProjectManagerSdk.models.taskdto import TaskDto
from ProjectManagerSdk.models.taskprioritydto import TaskPriorityDto
from ProjectManagerSdk.models.taskupdatedto import TaskUpdateDto
Expand Down Expand Up @@ -78,7 +77,7 @@ def query_tasks(self, top: int, skip: int, filter: str, select: str, orderby: st
else:
return AstroResult[list[TaskDto]](result.json(), False, True, result.status_code, None)

def retrieve_task(self, taskId: str) -> AstroResult[TaskDetailsDto]:
def retrieve_task(self, taskId: str) -> AstroResult[TaskDto]:
"""
Retrieve a Task by its unique identifier or by its short ID. A
Task has both a unique identifier, which is a GUID, and a short
Expand All @@ -99,9 +98,9 @@ def retrieve_task(self, taskId: str) -> AstroResult[TaskDetailsDto]:
queryParams = {}
result = self.client.send_request("GET", path, None, queryParams, None)
if result.status_code >= 200 and result.status_code < 300:
return AstroResult[TaskDetailsDto](None, True, False, result.status_code, TaskDetailsDto(**json.loads(result.content)['data']))
return AstroResult[TaskDto](None, True, False, result.status_code, TaskDto(**json.loads(result.content)['data']))
else:
return AstroResult[TaskDetailsDto](result.json(), False, True, result.status_code, None)
return AstroResult[TaskDto](result.json(), False, True, result.status_code, None)

def update_task(self, taskId: str, body: TaskUpdateDto) -> AstroResult[ChangeSetStatusDto]:
"""
Expand Down
Loading

0 comments on commit 3eb2bed

Please sign in to comment.