Skip to content

Commit

Permalink
Release 107 (#26)
Browse files Browse the repository at this point in the history
# Patch notes for 107.0.3368

These patch notes summarize the changes from version 104.0.3086.

Deprecated 2 old APIs:
* Changeset.RetrieveProjectChangesByProjectID
* TaskMetadata.GetTaskMetadata
  • Loading branch information
tspence authored Apr 9, 2024
1 parent 948a52f commit 0306084
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 64 deletions.
16 changes: 5 additions & 11 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>104.0.3086</version>
<version>107.0.3368</version>
<title>ProjectManager.SDK</title>
<authors>ProjectManager.com</authors>
<owners>ProjectManager.com, Inc.</owners>
Expand All @@ -14,18 +14,12 @@
<readme>docs/README.md</readme>
<summary>ProjectManager API for DotNet</summary>
<releaseNotes>
# Patch notes for 104.0.3086
# Patch notes for 107.0.3368

These patch notes summarize the changes from version 103.0.3003.
These patch notes summarize the changes from version 104.0.3086.

Added 1 new APIs:
* Changeset.RetrieveProjectChangesByProjectID (GET /api/data/projects/{projectId}/changes)

Renamed 2 old APIs:
* Renamed 'Changeset.RetrieveChangeset' to 'Changeset.RetrieveChangesetStatus'
* Renamed 'Changeset.RetrieveCompletedChangeset' to 'Changeset.RetrieveCompletedChangesetStatus'

Deprecated 1 old APIs:
Deprecated 2 old APIs:
* Changeset.RetrieveProjectChangesByProjectID
* TaskMetadata.GetTaskMetadata


Expand Down
18 changes: 0 additions & 18 deletions src/Clients/ChangesetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,5 @@ public async Task<AstroResult<ProjectChangeStatusDto>> RetrieveCompletedChangese
var url = $"/api/data/changesets/{changeSetId}/poll";
return await _client.Request<ProjectChangeStatusDto>(HttpMethod.Get, url, null, null, null);
}

/// <summary>
/// Retrieve specific Project Changes by Project ID
///
/// </summary>
/// <param name="projectId"></param>
/// <param name="version"></param>
/// <param name="page"></param>
/// <param name="take"></param>
public async Task<AstroResult<ProjectChangeDto[]>> RetrieveProjectChangesByProjectID(Guid projectId, int? version = null, int? page = null, int? take = null)
{
var url = $"/api/data/projects/{projectId}/changes";
var options = new Dictionary<string, object>();
if (version != null) { options["version"] = version; }
if (page != null) { options["page"] = page; }
if (take != null) { options["take"] = take; }
return await _client.Request<ProjectChangeDto[]>(HttpMethod.Get, url, options, null, null);
}
}
}
2 changes: 1 addition & 1 deletion 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-2024 ProjectManager.com, Inc.
* @version 104.0.3086
* @version 107.0.3368
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/

Expand Down
10 changes: 0 additions & 10 deletions src/Interfaces/IChangesetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,5 @@ public interface IChangesetClient
/// </summary>
/// <param name="changeSetId">The unique ID number of the Changeset to retrieve</param>
Task<AstroResult<ProjectChangeStatusDto>> RetrieveCompletedChangesetStatus(Guid changeSetId);

/// <summary>
/// Retrieve specific Project Changes by Project ID
///
/// </summary>
/// <param name="projectId"></param>
/// <param name="version"></param>
/// <param name="page"></param>
/// <param name="take"></param>
Task<AstroResult<ProjectChangeDto[]>> RetrieveProjectChangesByProjectID(Guid projectId, int? version = null, int? page = null, int? take = null);
}
}
34 changes: 34 additions & 0 deletions src/Models/ProjectVersionChangeDataDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/***
* 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
*/



#pragma warning disable CS8618

using System;

namespace ProjectManager.SDK.Models
{

public class ProjectVersionChangeDataDto : ApiModel
{

public string Type { get; set; }

public string Method { get; set; }

public string Property { get; set; }

public string Value { get; set; }
}
}
42 changes: 22 additions & 20 deletions src/Models/ProjectChangeDto.cs → src/Models/ProjectVersionDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,57 @@
namespace ProjectManager.SDK.Models
{

/// <summary>
/// The specific change action made against a project
/// </summary>
public class ProjectChangeDto : ApiModel
public class ProjectVersionDto : ApiModel
{

/// <summary>
/// Project Change ID
/// The unique identifier of the project version.
/// </summary>
public Guid? Id { get; set; }

/// <summary>
/// Workspace ID
/// Version of the Project
/// </summary>
public Guid? BusinessId { get; set; }
public int? Version { get; set; }

/// <summary>
/// Project ID
/// the initials of the user
/// </summary>
public Guid? ProjectId { get; set; }
public string Initials { get; set; }

/// <summary>
/// Version of this Project Change
/// The display name of the user
/// </summary>
public int? Version { get; set; }
public string Name { get; set; }

/// <summary>
/// Avatar URL
/// </summary>
public string AvatarUrl { get; set; }

/// <summary>
/// Created by GUID
/// The color for their avatar
/// </summary>
public Guid? CreateBy { get; set; }
public string Color { get; set; }

/// <summary>
/// Created date
/// Version datetime
/// </summary>
public DateTime? CreateDate { get; set; }

/// <summary>
/// Processed date
/// The unique identifier of user who created backup
/// </summary>
public DateTime? ProcessDate { get; set; }
public Guid? UserId { get; set; }

/// <summary>
/// The status of the Project Change
/// The group version belongs to
/// </summary>
public int? Status { get; set; }
public Guid? GroupId { get; set; }

/// <summary>
/// Project Change as JSON data
/// Subset of the changes related to this ProjectVersion
/// </summary>
public object ChangeData { get; set; }
public ProjectVersionChangeDataDto ChangeData { get; set; }
}
}
15 changes: 15 additions & 0 deletions src/Models/TaskDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ public class TaskDto : ApiModel
/// </summary>
public string ActualFinishDate { get; set; }

/// <summary>
/// The actual effort (in minutes) for this Task.
/// </summary>
public int? ActualEffort { get; set; }

/// <summary>
/// The timestamp in UTC when this Task was most recently modified.
/// </summary>
Expand Down Expand Up @@ -203,11 +208,21 @@ public class TaskDto : ApiModel
/// </summary>
public decimal? ActualCost { get; set; }

/// <summary>
/// The actual resource cost of this Task
/// </summary>
public decimal? ActualResourceCost { get; set; }

/// <summary>
/// The planned cost for this Task. Cannot be negative.
/// </summary>
public decimal? PlannedCost { get; set; }

/// <summary>
/// The planned resource cost of this Task
/// </summary>
public decimal? PlannedResourceCost { get; set; }

/// <summary>
/// The planned duration (in minutes) for this Task.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Models/TimesheetCreateRequestDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class TimesheetCreateRequestDto : ApiModel
public Guid? TaskId { get; set; }

/// <summary>
/// Admin task id that time reportsed to
/// Admin task id that time reported to
/// </summary>
public Guid? AdminTypeId { get; set; }

Expand Down
5 changes: 5 additions & 0 deletions src/Models/TimesheetResourceDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,10 @@ public class TimesheetResourceDto : ApiModel
/// The email address of this Resource.
/// </summary>
public string Email { get; set; }

/// <summary>
/// The default hourly rate of the resource.
/// </summary>
public decimal? HourlyRate { get; set; }
}
}
22 changes: 21 additions & 1 deletion src/Models/TimesheetTaskDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,33 @@ public class TimesheetTaskDto : ApiModel
public string Color { get; set; }

/// <summary>
/// The actual cost of this Task to date, if known.
/// The actual cost of this Task, if known.
/// </summary>
public decimal? ActualCost { get; set; }

/// <summary>
/// The actual resource cost of this Task
/// </summary>
public decimal? ActualResourceCost { get; set; }

/// <summary>
/// The actual effort (in minutes) of this task, if known.
/// </summary>
public int? ActualEffort { get; set; }

/// <summary>
/// The planned cost for this Task. Cannot be negative.
/// </summary>
public decimal? PlannedCost { get; set; }

/// <summary>
/// The planned resource cost of this Task
/// </summary>
public decimal? PlannedResourceCost { get; set; }

/// <summary>
/// The planned effort (in minutes) of this task, if known.
/// </summary>
public int? PlannedEffort { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/ProjectManagerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author ProjectManager.com <[email protected]>
*
* @copyright 2023-2024 ProjectManager.com, Inc.
* @version 104.0.3086
* @version 107.0.3368
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/

Expand Down Expand Up @@ -39,7 +39,7 @@ public class ProjectManagerClient : IProjectManagerClient
/// <summary>
/// The version of the SDK
/// </summary>
public const string SdkVersion = "104.0.3086";
public const string SdkVersion = "107.0.3368";

private readonly string _apiUrl;
private readonly HttpClient _client;
Expand Down

0 comments on commit 0306084

Please sign in to comment.