Skip to content

Commit

Permalink
SDK Release 96 (#16)
Browse files Browse the repository at this point in the history
* SDK Release 96

# Patch notes for 96.0.2102

These patch notes summarize the changes from version 11.1.2053.

Added 2 new APIs:
* ProjectMembers.RetrieveNewProjectMembers (GET /api/data/projects/members)
* Resource.RetrieveResource (GET /api/data/resources/{resourceId})

Deprecated 3 old APIs:
* Jira.RetrieveProjectsfromJirawithEpic
* Jira.RetrieveProjectsfromJira
* Jira.RetrieveProjectsfromJira
  • Loading branch information
tspence authored Oct 15, 2023
1 parent f26023f commit 712755d
Show file tree
Hide file tree
Showing 28 changed files with 194 additions and 390 deletions.
21 changes: 11 additions & 10 deletions ProjectManagerClient.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>ProjectManager.SDK</id>
<version>11.1.2053</version>
<version>96.0.2123</version>
<title>ProjectManager.SDK</title>
<authors>ProjectManager.com</authors>
<owners>ProjectManager.com, Inc.</owners>
Expand All @@ -14,18 +14,19 @@
<readme>docs/README.md</readme>
<summary>ProjectManager API for DotNet</summary>
<releaseNotes>
# Patch notes for 11.1.2053
# Patch notes for 96.0.2123

These patch notes summarize the changes from version 11.1.2012.
These patch notes summarize the changes from version 11.1.2053.

Renamed 4 old APIs:
* Renamed 'ApiKey.Createsanapikeyforthecurrentuser' to 'ApiKey.CreateApiKey'
* Renamed 'ApiKey.Returnslistofcreatedapikeysforcurrentworkspace' to 'ApiKey.ListApiKeys'
* Renamed 'ApiKey.Revokesallapikeys' to 'ApiKey.RevokeAllApiKeys'
* Renamed 'ApiKey.Revokesingleapikey' to 'ApiKey.RevokeAPIKey'
Added 3 new APIs:
* ProjectMembers.RetrieveNewProjectMembers (GET /api/data/projects/members)
* ProjectTemplate.RetrieveTemplateCategories (GET /api/data/projects/templates/categories)
* Resource.RetrieveResource (GET /api/data/resources/{resourceId})

Changes to 1 existing APIs:
* Added new parameters to Retrieve Projects from Jira
Deprecated 3 old APIs:
* Jira.RetrieveProjectsfromJirawithEpic
* Jira.RetrieveProjectsfromJira
* Jira.RetrieveProjectsfromJira


</releaseNotes>
Expand Down
79 changes: 0 additions & 79 deletions src/Clients/JiraClient.cs

This file was deleted.

4 changes: 2 additions & 2 deletions src/Clients/ProjectClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ public async Task<AstroResult<ProjectDto[]>> QueryProjects(int? top = null, int?
///
/// </summary>
/// <param name="body">Information about the Project you wish to create</param>
public async Task<AstroResult<ProjectCreateResponseDto>> CreateProject(ProjectCreateRequestDto body)
public async Task<AstroResult<ProjectDto>> CreateProject(ProjectCreateDto body)
{
var url = $"/api/data/projects";
return await _client.Request<ProjectCreateResponseDto>(HttpMethod.Post, url, null, body, null);
return await _client.Request<ProjectDto>(HttpMethod.Post, url, null, body, null);
}

/// <summary>
Expand Down
10 changes: 10 additions & 0 deletions src/Clients/ProjectMembersClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ public ProjectMembersClient(ProjectManagerClient client)
_client = client;
}

/// <summary>
/// Returns a list of membership options for new projects.
///
/// </summary>
public async Task<AstroResult<ProjectMemberDto[]>> RetrieveNewProjectMembers()
{
var url = $"/api/data/projects/members";
return await _client.Request<ProjectMemberDto[]>(HttpMethod.Get, url, null, null, null);
}

/// <summary>
/// Returns a list of membership options for existing members. Optionally include users who are not a member yet.
///
Expand Down
14 changes: 13 additions & 1 deletion src/Clients/ProjectTemplateClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,25 @@ public ProjectTemplateClient(ProjectManagerClient client)
/// <summary>
/// Retrieves all ProjectTemplates defined in the system.
///
/// A ProjectTemplate is a definition of default project related data (eg. Tasks) that can be applied to a new project when it is created.
/// A ProjectTemplate is a definition of default project related data (eg. Tasks) that can be applied to a new project when it is created. ProjectTemplates are categorized using the TemplateCategory system.
///
/// </summary>
public async Task<AstroResult<ProjectTemplateDto[]>> RetrieveProjectTemplates()
{
var url = $"/api/data/projects/templates";
return await _client.Request<ProjectTemplateDto[]>(HttpMethod.Get, url, null, null, null);
}

/// <summary>
/// Retrieves all ProjectTemplate Categories defined in the system.
///
/// A ProjectTemplate is a definition of default project related data (eg. Tasks) that can be applied to a new project when it is created. ProjectTemplates are categorized using the TemplateCategory system.
///
/// </summary>
public async Task<AstroResult<ProjectTemplateCategoryDto[]>> RetrieveTemplateCategories()
{
var url = $"/api/data/projects/templates/categories";
return await _client.Request<ProjectTemplateCategoryDto[]>(HttpMethod.Get, url, null, null, null);
}
}
}
13 changes: 13 additions & 0 deletions src/Clients/ResourceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,18 @@ public async Task<AstroResult<ResourceDto>> UpdateResource(Guid resourceId, Reso
var url = $"/api/data/resources/{resourceId}";
return await _client.Request<ResourceDto>(HttpMethod.Put, url, null, body, null);
}

/// <summary>
/// Retrieve the Resource matching the specified unique ID.
///
/// A Resource represents a person, material, or tool that is used within your Projects. When you attach a Resources to more than one Task, the software will schedule the usage of your Resource so that it is not allocated to more than one Task at the same time. The users in your Workspace are also considered Resources. To invite a new User to your Workspace, create a new Resource for that user.
///
/// </summary>
/// <param name="resourceId">The id of the Resource</param>
public async Task<AstroResult<ResourceDto>> RetrieveResource(Guid resourceId)
{
var url = $"/api/data/resources/{resourceId}";
return await _client.Request<ResourceDto>(HttpMethod.Get, url, null, null, null);
}
}
}
2 changes: 1 addition & 1 deletion src/Clients/TaskClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public async Task<AstroResult<TaskPriorityDto[]>> RetrieveTaskPriorities()
/// </summary>
/// <param name="projectId">The unique identifier of the Project that will contain these Tasks</param>
/// <param name="body">The list of new Tasks to create</param>
public async Task<AstroResult<ChangeSetStatusDto[]>> CreateManyTasks(Guid projectId, BulkTaskCreateDto[] body)
public async Task<AstroResult<ChangeSetStatusDto[]>> CreateManyTasks(Guid projectId, TaskCreateDto[] body)
{
var url = $"/api/data/projects/{projectId}/tasks/bulk";
return await _client.Request<ChangeSetStatusDto[]>(HttpMethod.Post, url, null, body, null);
Expand Down
4 changes: 2 additions & 2 deletions src/Clients/TimesheetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task<AstroResult<TimesheetResponseDto>> Createtimeentry(TimesheetCr
/// <param name="select">Specify which properties should be returned</param>
/// <param name="orderby">Order collection by this field.</param>
/// <param name="expand">Include related data in the response</param>
public async Task<AstroResult<TimesheetGetResponseDto[]>> QueryTimeSheets(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null)
public async Task<AstroResult<TimesheetDto[]>> QueryTimeSheets(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null)
{
var url = $"/api/data/timesheets";
var options = new Dictionary<string, object>();
Expand All @@ -71,7 +71,7 @@ public async Task<AstroResult<TimesheetGetResponseDto[]>> QueryTimeSheets(int? t
if (select != null) { options["$select"] = select; }
if (orderby != null) { options["$orderby"] = orderby; }
if (expand != null) { options["$expand"] = expand; }
return await _client.Request<TimesheetGetResponseDto[]>(HttpMethod.Get, url, options, null, null);
return await _client.Request<TimesheetDto[]>(HttpMethod.Get, url, options, null, null);
}

/// <summary>
Expand Down
6 changes: 1 addition & 5 deletions src/IProjectManagerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author ProjectManager.com <[email protected]>
*
* @copyright 2023-2023 ProjectManager.com, Inc.
* @version 11.1.2053
* @version 96.0.2123
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/

Expand Down Expand Up @@ -60,10 +60,6 @@ public interface IProjectManagerClient
/// </summary>
IIntegrationProviderClient IntegrationProvider { get; }
/// <summary>
/// API methods related to Jira
/// </summary>
IJiraClient Jira { get; }
/// <summary>
/// API methods related to License
/// </summary>
ILicenseClient License { get; }
Expand Down
56 changes: 0 additions & 56 deletions src/Interfaces/IJiraClient.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Interfaces/IProjectClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public interface IProjectClient
///
/// </summary>
/// <param name="body">Information about the Project you wish to create</param>
Task<AstroResult<ProjectCreateResponseDto>> CreateProject(ProjectCreateRequestDto body);
Task<AstroResult<ProjectDto>> CreateProject(ProjectCreateDto body);

/// <summary>
/// Retrieves a project based on its unique identifier.
Expand Down
6 changes: 6 additions & 0 deletions src/Interfaces/IProjectMembersClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ namespace ProjectManager.SDK.Interfaces
public interface IProjectMembersClient
{

/// <summary>
/// Returns a list of membership options for new projects.
///
/// </summary>
Task<AstroResult<ProjectMemberDto[]>> RetrieveNewProjectMembers();

/// <summary>
/// Returns a list of membership options for existing members. Optionally include users who are not a member yet.
///
Expand Down
10 changes: 9 additions & 1 deletion src/Interfaces/IProjectTemplateClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@ public interface IProjectTemplateClient
/// <summary>
/// Retrieves all ProjectTemplates defined in the system.
///
/// A ProjectTemplate is a definition of default project related data (eg. Tasks) that can be applied to a new project when it is created.
/// A ProjectTemplate is a definition of default project related data (eg. Tasks) that can be applied to a new project when it is created. ProjectTemplates are categorized using the TemplateCategory system.
///
/// </summary>
Task<AstroResult<ProjectTemplateDto[]>> RetrieveProjectTemplates();

/// <summary>
/// Retrieves all ProjectTemplate Categories defined in the system.
///
/// A ProjectTemplate is a definition of default project related data (eg. Tasks) that can be applied to a new project when it is created. ProjectTemplates are categorized using the TemplateCategory system.
///
/// </summary>
Task<AstroResult<ProjectTemplateCategoryDto[]>> RetrieveTemplateCategories();
}
}
9 changes: 9 additions & 0 deletions src/Interfaces/IResourceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,14 @@ public interface IResourceClient
/// <param name="resourceId">The id of the resource</param>
/// <param name="body">The information to update the resource</param>
Task<AstroResult<ResourceDto>> UpdateResource(Guid resourceId, ResourceUpdateDto body);

/// <summary>
/// Retrieve the Resource matching the specified unique ID.
///
/// A Resource represents a person, material, or tool that is used within your Projects. When you attach a Resources to more than one Task, the software will schedule the usage of your Resource so that it is not allocated to more than one Task at the same time. The users in your Workspace are also considered Resources. To invite a new User to your Workspace, create a new Resource for that user.
///
/// </summary>
/// <param name="resourceId">The id of the Resource</param>
Task<AstroResult<ResourceDto>> RetrieveResource(Guid resourceId);
}
}
2 changes: 1 addition & 1 deletion src/Interfaces/ITaskClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ public interface ITaskClient
/// </summary>
/// <param name="projectId">The unique identifier of the Project that will contain these Tasks</param>
/// <param name="body">The list of new Tasks to create</param>
Task<AstroResult<ChangeSetStatusDto[]>> CreateManyTasks(Guid projectId, BulkTaskCreateDto[] body);
Task<AstroResult<ChangeSetStatusDto[]>> CreateManyTasks(Guid projectId, TaskCreateDto[] body);
}
}
2 changes: 1 addition & 1 deletion src/Interfaces/ITimesheetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface ITimesheetClient
/// <param name="select">Specify which properties should be returned</param>
/// <param name="orderby">Order collection by this field.</param>
/// <param name="expand">Include related data in the response</param>
Task<AstroResult<TimesheetGetResponseDto[]>> QueryTimeSheets(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null);
Task<AstroResult<TimesheetDto[]>> QueryTimeSheets(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null);

/// <summary>
/// Delete time entry by id.
Expand Down
Loading

0 comments on commit 712755d

Please sign in to comment.