Skip to content

Commit

Permalink
# Patch notes for 122.0.216
Browse files Browse the repository at this point in the history
These patch notes summarize the changes from version 117.0.4438.

Added 15 new APIs:
* Discussion.LikeAComment (POST /api/data/comments/{commentId}/like)
* Discussion.RemovesAThumbsupFromAComment (DELETE /api/data/comments/{commentId}/like)
* Discussion.RemoveAComment (DELETE /api/data/comments/{commentId})
* ProjectCustomer.CreateProjectCustomer (POST /api/data/projects/customers)
* ProjectCustomer.UpdateProjectCustomer (PUT /api/data/projects/customers/{customerId})
* ProjectCustomer.DeleteProjectCustomer (DELETE /api/data/projects/customers/{customerId})
* ProjectVersion.RetrieveProjectVersions (GET /api/data/projects/{projectId}/versions)
* ProjectVersion.DownloadMSProjectXml (GET /api/data/projects/{projectChangeId}/version/download)
* ProjectVersion.RestoreProjectVersion (POST /api/data/projects/{projectId}/version/{version}/restore)
* ProjectVersion.CopyProjectVersion (POST /api/data/projects/{projectId}/version/{version}/copy)
* Risk.CreateRiskExport (POST /api/data/projects/{projectId}/risks/export)
* TaskTodo.GetTodosForATask (GET /api/data/tasks/{taskId}/todos)
* TaskTodo.CreateATodoForATask (POST /api/data/tasks/{taskId}/todos)
* TaskTodo.UpdateATodo (PUT /api/data/tasks/todos/{todoId})
* TaskTodo.DeleteATodo (DELETE /api/data/tasks/todos/{todoId})

Renamed 1 old APIs:
* Renamed 'TaskMetadata.GetTasksByProjectIDAndForeignKeyID' to 'TaskMetadata.TaskMetadataSearch'

Changes to existing APIs:
* Notification.RetrieveNotifications added query parameter `senderId`
* Notification.RetrieveNotifications added query parameter `notificationTypes`
* Notification.RetrieveNotifications added query parameter `asFlatList`

Changes to data models:
* ResourceDto: Added new field `initials`
* ResourceDto: Added new field `countryName`
* ResourceDto: Added new field `avatarUrl`
* TaskCreateDto: Added new field `isLocked`
* TaskCreateDto: Added new field `isMilestone`
* TaskDto: Added new field `isLocked`
* TaskDto: Added new field `isMilestone`
* TaskUpdateDto: Added new field `isLocked`
* TaskUpdateDto: Added new field `isMilestone`
* TimesheetCreateRequestDto: Added new field `minutes`
* TimesheetDto: Added new field `minutes`
* TimesheetResponseDto: Added new field `minutes`
* TimesheetUpdateRequestDto: Added new field `minutes`
  • Loading branch information
jeremy-hornback-eis authored and github-actions[bot] committed Nov 24, 2024
1 parent bbe7387 commit 8d42649
Show file tree
Hide file tree
Showing 41 changed files with 15,712 additions and 40 deletions.
48 changes: 41 additions & 7 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>117.0.4438</version>
<version>122.0.216</version>
<title>ProjectManager.SDK</title>
<authors>ProjectManager.com</authors>
<owners>ProjectManager.com, Inc.</owners>
Expand All @@ -14,15 +14,49 @@
<readme>docs/README.md</readme>
<summary>ProjectManager API for DotNet</summary>
<releaseNotes>
# Patch notes for 117.0.4438
# Patch notes for 122.0.216

These patch notes summarize the changes from version 116.0.4391.
These patch notes summarize the changes from version 117.0.4438.

Added 15 new APIs:
* Discussion.LikeAComment (POST /api/data/comments/{commentId}/like)
* Discussion.RemovesAThumbsupFromAComment (DELETE /api/data/comments/{commentId}/like)
* Discussion.RemoveAComment (DELETE /api/data/comments/{commentId})
* ProjectCustomer.CreateProjectCustomer (POST /api/data/projects/customers)
* ProjectCustomer.UpdateProjectCustomer (PUT /api/data/projects/customers/{customerId})
* ProjectCustomer.DeleteProjectCustomer (DELETE /api/data/projects/customers/{customerId})
* ProjectVersion.RetrieveProjectVersions (GET /api/data/projects/{projectId}/versions)
* ProjectVersion.DownloadMSProjectXml (GET /api/data/projects/{projectChangeId}/version/download)
* ProjectVersion.RestoreProjectVersion (POST /api/data/projects/{projectId}/version/{version}/restore)
* ProjectVersion.CopyProjectVersion (POST /api/data/projects/{projectId}/version/{version}/copy)
* Risk.CreateRiskExport (POST /api/data/projects/{projectId}/risks/export)
* TaskTodo.GetTodosForATask (GET /api/data/tasks/{taskId}/todos)
* TaskTodo.CreateATodoForATask (POST /api/data/tasks/{taskId}/todos)
* TaskTodo.UpdateATodo (PUT /api/data/tasks/todos/{todoId})
* TaskTodo.DeleteATodo (DELETE /api/data/tasks/todos/{todoId})

Renamed 1 old APIs:
* Renamed 'TaskMetadata.GetTasksByProjectIDAndForeignKeyID' to 'TaskMetadata.TaskMetadataSearch'

Changes to existing APIs:
* Notification.RetrieveNotifications added query parameter `senderId`
* Notification.RetrieveNotifications added query parameter `notificationTypes`
* Notification.RetrieveNotifications added query parameter `asFlatList`

Changes to data models:
* ResourceCreateDto: Added new field `colorName`
* ResourceDto: Added new field `colorName`
* ResourceDto: Added new field `color`
* ResourceUpdateDto: Added new field `colorName`
* ResourceDto: Added new field `initials`
* ResourceDto: Added new field `countryName`
* ResourceDto: Added new field `avatarUrl`
* TaskCreateDto: Added new field `isLocked`
* TaskCreateDto: Added new field `isMilestone`
* TaskDto: Added new field `isLocked`
* TaskDto: Added new field `isMilestone`
* TaskUpdateDto: Added new field `isLocked`
* TaskUpdateDto: Added new field `isMilestone`
* TimesheetCreateRequestDto: Added new field `minutes`
* TimesheetDto: Added new field `minutes`
* TimesheetResponseDto: Added new field `minutes`
* TimesheetUpdateRequestDto: Added new field `minutes`


</releaseNotes>
Expand Down
30 changes: 30 additions & 0 deletions src/Clients/DiscussionClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,35 @@ public async Task<AstroResult<DiscussionCommentCreateResponseDto>> CreateTaskCom
var url = $"/api/data/tasks/{taskId}/comments";
return await _client.RequestWithBody<DiscussionCommentCreateResponseDto>(HttpMethod.Post, url, null, body);
}

/// <summary>
/// Puts a thumbsup on a comment
/// </summary>
/// <param name="commentId">the id of the comment</param>
public async Task<AstroResult<string>> LikeAComment(Guid commentId)
{
var url = $"/api/data/comments/{commentId}/like";
return await _client.Request<string>(HttpMethod.Post, url, null);
}

/// <summary>
/// Unlike a comment that was previously liked
/// </summary>
/// <param name="commentId">the id of the comment</param>
public async Task<AstroResult<string>> RemovesAThumbsupFromAComment(Guid commentId)
{
var url = $"/api/data/comments/{commentId}/like";
return await _client.Request<string>(HttpMethod.Delete, url, null);
}

/// <summary>
/// Removes a comment by it&#39;s id
/// </summary>
/// <param name="commentId">Remove a comment</param>
public async Task<AstroResult<string>> RemoveAComment(Guid commentId)
{
var url = $"/api/data/comments/{commentId}";
return await _client.Request<string>(HttpMethod.Delete, url, null);
}
}
}
14 changes: 10 additions & 4 deletions src/Clients/NotificationClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ public NotificationClient(ProjectManagerClient client)
/// using the parameter `lastId` of the oldest notification from each batch to fetch the next 500 notifications.
/// </summary>
/// <param name="lastId">To continue loading more notifications in a series of requests, provide the ID of the oldest notification from the currently loaded batch as the `lastId` parameter</param>
public async Task<AstroResult<NotificationResponseDto>> RetrieveNotifications(Guid? lastId = null)
/// <param name="senderId">Filter the notifications to only those sent by the user with the specified ID</param>
/// <param name="notificationTypes">Specifies the types of notifications to return. If not provided, all notifications will be returned.</param>
/// <param name="asFlatList">If set to true all notifications will be returned as a flat list, otherwise they will be grouped by parent in the same manner as displayed in the UI.</param>
public async Task<AstroResult<NotificationResponseDto>> RetrieveNotifications(Guid? lastId = null, Guid? senderId = null, string[] notificationTypes = null, bool? asFlatList = null)
{
var url = $"/api/data/notifications";
var options = new Dictionary<string, object>();
if (lastId != null) { options["lastId"] = lastId; }
if (senderId != null) { options["senderId"] = senderId; }
if (notificationTypes != null) { options["notificationTypes"] = notificationTypes; }
if (asFlatList != null) { options["asFlatList"] = asFlatList; }
return await _client.Request<NotificationResponseDto>(HttpMethod.Get, url, options);
}

Expand Down Expand Up @@ -103,7 +109,7 @@ public async Task<AstroResult<string>> DeleteAllNotifications()
/// workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
/// than 1,000 pending notifications some old notifications will be deleted automatically.
/// </summary>
/// <param name="id"></param>
/// <param name="id">The unique identifier of the notification to mark read</param>
public async Task<AstroResult<NotificationTimestampDto>> MarkNotificationRead(Guid id)
{
var url = $"/api/data/notifications/{id}/markread";
Expand All @@ -130,7 +136,7 @@ public async Task<AstroResult<NotificationTimestampDto>> ReadAllNotifications()
/// workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
/// than 1,000 pending notifications some old notifications will be deleted automatically.
/// </summary>
/// <param name="id"></param>
/// <param name="id">The unique identifier of the notification to mark read</param>
public async Task<AstroResult<string>> DeleteNotification(Guid id)
{
var url = $"/api/data/notifications/delete/{id}";
Expand All @@ -144,7 +150,7 @@ public async Task<AstroResult<string>> DeleteNotification(Guid id)
/// workspace. Notifications are ephemeral and may be deleted when they are no longer needed. When a user has more
/// than 1,000 pending notifications some old notifications will be deleted automatically.
/// </summary>
/// <param name="id"></param>
/// <param name="id">The unique identifier of the notification to mark read</param>
public async Task<AstroResult<string>> MarkNotificationUnread(Guid id)
{
var url = $"/api/data/notifications/{id}/markunread";
Expand Down
31 changes: 31 additions & 0 deletions src/Clients/ProjectCustomerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,36 @@ public async Task<AstroResult<ProjectCustomerDto[]>> RetrieveProjectCustomers()
var url = $"/api/data/projects/customers";
return await _client.Request<ProjectCustomerDto[]>(HttpMethod.Get, url, null);
}

/// <summary>
/// Create a project customer
/// </summary>
/// <param name="body">The data to create the customer</param>
public async Task<AstroResult<ProjectCustomerDto>> CreateProjectCustomer(ProjectCustomerCreateDto body)
{
var url = $"/api/data/projects/customers";
return await _client.RequestWithBody<ProjectCustomerDto>(HttpMethod.Post, url, null, body);
}

/// <summary>
/// Updates a project customer
/// </summary>
/// <param name="customerId">The id of the customer to update</param>
/// <param name="body">The data to update</param>
public async Task<AstroResult<ProjectCustomerDto>> UpdateProjectCustomer(Guid customerId, ProjectCustomerCreateDto body)
{
var url = $"/api/data/projects/customers/{customerId}";
return await _client.RequestWithBody<ProjectCustomerDto>(HttpMethod.Put, url, null, body);
}

/// <summary>
/// Delete a project customer. They will also be removed from any projects they were assigned too.
/// </summary>
/// <param name="customerId">The id of the customer to remove</param>
public async Task<AstroResult<string>> DeleteProjectCustomer(Guid customerId)
{
var url = $"/api/data/projects/customers/{customerId}";
return await _client.Request<string>(HttpMethod.Delete, url, null);
}
}
}
89 changes: 89 additions & 0 deletions src/Clients/ProjectVersionClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/***
* ProjectManager API for C#
*
* (c) 2023-2024 ProjectManager.com, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author ProjectManager.com <[email protected]>
* @copyright 2023-2024 ProjectManager.com, Inc.
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/



using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using ProjectManager.SDK.Interfaces;
using ProjectManager.SDK.Models;


namespace ProjectManager.SDK.Clients
{
/// <summary>
/// API methods related to ProjectVersion
/// </summary>
public class ProjectVersionClient : IProjectVersionClient
{
private readonly ProjectManagerClient _client;

/// <summary>
/// Constructor
/// </summary>
public ProjectVersionClient(ProjectManagerClient client)
{
_client = client;
}

/// <summary>
/// Returns projects versions including version, user who made changes
/// </summary>
/// <param name="projectId">The unique identifier of the Project</param>
public async Task<AstroResult<ProjectVersionDto[]>> RetrieveProjectVersions(Guid projectId)
{
var url = $"/api/data/projects/{projectId}/versions";
return await _client.Request<ProjectVersionDto[]>(HttpMethod.Get, url, null);
}

/// <summary>
/// Exports and returns project version as an MS Project XML attachment
/// </summary>
/// <param name="projectChangeId">Project change Guid</param>
public async Task<AstroResult<byte[]>> DownloadMSProjectXml(Guid projectChangeId)
{
var url = $"/api/data/projects/{projectChangeId}/version/download";
return await _client.Request<byte[]>(HttpMethod.Get, url, null);
}

/// <summary>
/// Restores a Project to the state it was in at a specific Version in time.
///
/// If successful, all changes made to the Project since this Version will be undone and the Project will
/// return to its former state.
/// </summary>
/// <param name="projectId">The unique identifier of the Project to restore</param>
/// <param name="version">The version number to restore to</param>
public async Task<AstroResult<string>> RestoreProjectVersion(Guid projectId, int version)
{
var url = $"/api/data/projects/{projectId}/version/{version}/restore";
return await _client.Request<string>(HttpMethod.Post, url, null);
}

/// <summary>
/// Create a Copy of a Project as of a specific Version, optionally moving it to a new Timezone.
/// </summary>
/// <param name="projectId">The unique identifier of the Project to copy</param>
/// <param name="version">The version number of the Project to copy</param>
/// <param name="timezoneOffset">If specified, sets the default timezone of the newly copied Project to this specified timezone</param>
public async Task<AstroResult<string>> CopyProjectVersion(Guid projectId, int version, int? timezoneOffset = null)
{
var url = $"/api/data/projects/{projectId}/version/{version}/copy";
var options = new Dictionary<string, object>();
if (timezoneOffset != null) { options["timezoneOffset"] = timezoneOffset; }
return await _client.Request<string>(HttpMethod.Post, url, options);
}
}
}
54 changes: 54 additions & 0 deletions src/Clients/RiskClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/***
* ProjectManager API for C#
*
* (c) 2023-2024 ProjectManager.com, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author ProjectManager.com <[email protected]>
* @copyright 2023-2024 ProjectManager.com, Inc.
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/



using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using ProjectManager.SDK.Interfaces;
using ProjectManager.SDK.Models;


namespace ProjectManager.SDK.Clients
{
/// <summary>
/// API methods related to Risk
/// </summary>
public class RiskClient : IRiskClient
{
private readonly ProjectManagerClient _client;

/// <summary>
/// Constructor
/// </summary>
public RiskClient(ProjectManagerClient client)
{
_client = client;
}

/// <summary>
/// Initiates a new Export action for Risks.
///
/// Returns the identifier of this Risk Export.
/// </summary>
/// <param name="projectId">The unique identifier of the Project for which to export Risks</param>
/// <param name="body">The settings to use for this export action</param>
public async Task<AstroResult<ExportDto>> CreateRiskExport(Guid projectId, RiskExportSettingsDto body)
{
var url = $"/api/data/projects/{projectId}/risks/export";
return await _client.RequestWithBody<ExportDto>(HttpMethod.Post, url, null, body);
}
}
}
8 changes: 7 additions & 1 deletion src/Clients/TaskMetadataClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ public async Task<AstroResult<string>> AddMetadata(Guid taskId, TaskMetadataUpda
return await _client.RequestWithBody<string>(HttpMethod.Put, url, options, body);
}

public async Task<AstroResult<TaskMetadataSearchDto[]>> GetTasksByProjectIDAndForeignKeyID(Guid projectId, string foreignKey = null, bool? isSystem = null)
/// <summary>
/// Get tasks by project ID and foreign key ID
/// </summary>
/// <param name="foreignKey">Foreign Key ID</param>
/// <param name="projectId">Project ID</param>
/// <param name="isSystem">If metadata is for system or customer, isSystem = true is only of ProjectManager</param>
public async Task<AstroResult<TaskMetadataSearchDto[]>> TaskMetadataSearch(Guid projectId, string foreignKey = null, bool? isSystem = null)
{
var url = $"/api/data/projects/{projectId}/tasks/metadata";
var options = new Dictionary<string, object>();
Expand Down
Loading

0 comments on commit 8d42649

Please sign in to comment.