Skip to content

Commit

Permalink
Merge pull request #22 from projectmgr/tspence/fix-capitalization
Browse files Browse the repository at this point in the history
Fix capitalization
  • Loading branch information
whuman authored Jan 31, 2024
2 parents e23b423 + c628201 commit daf6132
Show file tree
Hide file tree
Showing 91 changed files with 443 additions and 360 deletions.
43 changes: 13 additions & 30 deletions ProjectManagerClient.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,36 @@
<package >
<metadata>
<id>ProjectManager.SDK</id>
<version>102.0.2887</version>
<version>102.0.2949</version>
<title>ProjectManager.SDK</title>
<authors>ProjectManager.com</authors>
<owners>ProjectManager.com, Inc.</owners>
<license type="file">docs/LICENSE</license>
<projectUrl>https://github.com/projectmgr/projectmanager-sdk-csharp</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description> for DotNet</description>
<description>Software development kit for the ProjectManager.com API. for DotNet</description>
<icon>docs/logo.png</icon>
<readme>docs/README.md</readme>
<summary>ProjectManager API for DotNet</summary>
<releaseNotes>
# Patch notes for 102.0.2887

Added XMLDOC to the automated SDK build-and-publish process.

# Patch notes for 102.0.2886
# Patch notes for 102.0.2949

These patch notes summarize the changes from version 99.0.2550.
These patch notes summarize the changes from version 102.0.2886.

Added 8 new APIs:
* File.DeleteFile (DELETE /api/data/files/{fileId})
* Holiday.QueryResourceHolidays (GET /api/data/holidays/resource)
* Holiday.QueryCountryHolidays (GET /api/data/holidays/country)
* Holiday.QueryGlobalHolidays (GET /api/data/holidays/global)
* IntegrationProvider.DisconnectUserIntegrationProviderConnection (DELETE /api/data/integrations/providers/{providerId}/user-connection)
* NptFiles.UploadFileToNonProjectTasks (POST /api/data/non-project-tasks/{taskId}/files)
* TaskMetadata.AddMetadata (PUT /api/data/tasks/{taskId}/metadata)
* TaskMetadata.GetTasksByProjectIdAndForeignKeyId (GET /api/data/projects/{projectId}/tasks/metadata)
Added 2 new APIs:
* Changeset.RetrieveChangesetsByProjectID (GET /api/data/changesets/{projectId}/changesets)
* Project.DeleteProject (DELETE /api/data/projects/{projectId})

Changes to existing APIs:
* Discussion.CreateTaskComments changed [body].Value.DataType from DiscussionCommentCreateDto to DiscussionCreateDto
* Discussion.CreateTaskComments changed [body].Value.DataTypeRef from /docs/discussioncommentcreatedto to /docs/discussioncreatedto
* Project.QueryProjects removed query parameter `$select`
* Resource.QueryResources removed query parameter `$select`
* ResourceSkill.RetrieveResourceSkills removed query parameter `$select`
* ResourceTeam.RetrieveResourceTeams removed query parameter `$select`
* Tag.QueryTags removed query parameter `$select`
* Task.QueryTasks removed query parameter `$select`
* TaskField.QueryTaskFields removed query parameter `$select`
* TaskField.QueryTaskFieldValues removed query parameter `$select`
* Timesheet.QueryTimesheets removed query parameter `$select`
Deprecated 1 old APIs:
* TaskMetadata.GetTaskMetadata

Fixed capitalization for data schema models and API methods - the previous build caused some items
to be incorrectly lowercased when they were already in PascalCase form.


</releaseNotes>
<copyright>Copyright 2023 - 2024</copyright>
<tags></tags>
<tags>projectmanager project management task tracking projects tasks</tags>
<repository type="git" url="https://github.com/projectmgr/projectmanager-sdk-csharp" />
<dependencies>
<group targetFramework=".NETStandard2.0">
Expand Down
2 changes: 1 addition & 1 deletion src/Clients/ApiKeyClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public async Task<AstroResult<string>> RevokeAllApiKeys()
///
/// </summary>
/// <param name="id">The unique identifier of the API key to revoke</param>
public async Task<AstroResult<string>> RevokeApiKey(Guid id)
public async Task<AstroResult<string>> RevokeAPIKey(Guid id)
{
var url = $"/api/data/api-keys/{id}/revoke";
return await _client.Request<string>(HttpMethod.Delete, url, null, null, null);
Expand Down
18 changes: 18 additions & 0 deletions src/Clients/ChangesetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,23 @@ public async Task<AstroResult<ChangesetGetResponseDto>> RetrieveCompletedChanges
var url = $"/api/data/changesets/{changeSetId}/poll";
return await _client.Request<ChangesetGetResponseDto>(HttpMethod.Get, url, null, null, null);
}

/// <summary>
/// Retrieve Changesets by Project ID
///
/// </summary>
/// <param name="projectId"></param>
/// <param name="version"></param>
/// <param name="page"></param>
/// <param name="take"></param>
public async Task<AstroResult<ChangeSetResponseDto[]>> RetrieveChangesetsByProjectID(Guid projectId, int? version = null, int? page = null, int? take = null)
{
var url = $"/api/data/changesets/{projectId}/changesets";
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<ChangeSetResponseDto[]>(HttpMethod.Get, url, options, null, null);
}
}
}
16 changes: 16 additions & 0 deletions src/Clients/ProjectClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,21 @@ public async Task<AstroResult<string>> UpdateProject(Guid projectId, ProjectUpda
var url = $"/api/data/projects/{projectId}";
return await _client.Request<string>(HttpMethod.Put, url, null, body, null);
}

/// <summary>
/// Delete a project based on the details provided.
///
/// A Project is a collection of Tasks that contributes towards a goal. Within a Project, Tasks represent individual items of work that team members must complete. The sum total of Tasks within a Project represents the work to be completed for that Project.
///
/// </summary>
/// <param name="projectId">The unique identifier of the Project to delete</param>
/// <param name="hardDelete">Hard delete project true or false</param>
public async Task<AstroResult<string>> DeleteProject(Guid projectId, bool? hardDelete = null)
{
var url = $"/api/data/projects/{projectId}";
var options = new Dictionary<string, object>();
if (hardDelete != null) { options["hardDelete"] = hardDelete; }
return await _client.Request<string>(HttpMethod.Delete, url, options, null, null);
}
}
}
6 changes: 3 additions & 3 deletions src/Clients/ProjectFieldClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async Task<AstroResult<string>> DeleteProjectField(string fieldId)
/// <param name="projectId">The unique identifier of the Project that contains this ProjectField</param>
/// <param name="fieldId">The unique identifier or short ID of this ProjectField</param>
/// <param name="body">The new information for this ProjectField</param>
public async Task<AstroResult<string>> UpdateProjectfieldValue(Guid projectId, string fieldId, UpdateProjectFieldValueDto body)
public async Task<AstroResult<string>> UpdateProjectFieldValue(Guid projectId, string fieldId, UpdateProjectFieldValueDto body)
{
var url = $"/api/data/projects/{projectId}/fields/{fieldId}";
return await _client.Request<string>(HttpMethod.Put, url, null, body, null);
Expand All @@ -99,7 +99,7 @@ public async Task<AstroResult<string>> UpdateProjectfieldValue(Guid projectId, s
/// </summary>
/// <param name="projectId">The unique identifier of the Project of the value to retrieve</param>
/// <param name="fieldId">The unique identifier or short ID of the ProjectField of the value to retrieve</param>
public async Task<AstroResult<ProjectFieldValueDto>> RetrieveProjectfieldValue(Guid projectId, string fieldId)
public async Task<AstroResult<ProjectFieldValueDto>> RetrieveProjectFieldValue(Guid projectId, string fieldId)
{
var url = $"/api/data/projects/{projectId}/fields/{fieldId}";
return await _client.Request<ProjectFieldValueDto>(HttpMethod.Get, url, null, null, null);
Expand All @@ -112,7 +112,7 @@ public async Task<AstroResult<ProjectFieldValueDto>> RetrieveProjectfieldValue(G
///
/// </summary>
/// <param name="projectId">The unique identifier of the Project for which we want ProjectField values</param>
public async Task<AstroResult<ProjectFieldValueDto[]>> RetrieveAllProjectfieldValues(Guid projectId)
public async Task<AstroResult<ProjectFieldValueDto[]>> RetrieveAllProjectFieldValues(Guid projectId)
{
var url = $"/api/data/projects/{projectId}/fields";
return await _client.Request<ProjectFieldValueDto[]>(HttpMethod.Get, url, null, null, null);
Expand Down
2 changes: 1 addition & 1 deletion src/Clients/TaskAssigneeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public async Task<AstroResult<ChangeSetStatusDto>> ReplaceTaskAssignees(Guid tas
/// </summary>
/// <param name="taskId">The unique identifier of the Task to add or update an assignment</param>
/// <param name="body">List of Assignee data</param>
public async Task<AstroResult<ChangeSetStatusDto>> CreateOrUpdateTaskassignee(Guid taskId, AssigneeUpsertDto[] body)
public async Task<AstroResult<ChangeSetStatusDto>> CreateOrUpdateTaskAssignee(Guid taskId, AssigneeUpsertDto[] body)
{
var url = $"/api/data/tasks/{taskId}/assignees";
return await _client.Request<ChangeSetStatusDto>(HttpMethod.Put, url, null, body, null);
Expand Down
2 changes: 1 addition & 1 deletion src/Clients/TaskFieldClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public async Task<AstroResult<string>> DeleteTaskField(Guid projectId, Guid fiel
///
/// </summary>
/// <param name="taskId">The unique identifier of the Task for which we want TaskField values</param>
public async Task<AstroResult<TaskFieldValueDto[]>> RetrieveAllTaskfieldValues(Guid taskId)
public async Task<AstroResult<TaskFieldValueDto[]>> RetrieveAllTaskFieldValues(Guid taskId)
{
var url = $"/api/data/tasks/{taskId}/fields/values";
return await _client.Request<TaskFieldValueDto[]>(HttpMethod.Get, url, null, null, null);
Expand Down
9 changes: 1 addition & 8 deletions src/Clients/TaskMetadataClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,7 @@ public async Task<AstroResult<string>> AddMetadata(Guid taskId, TaskMetadataUpda
return await _client.Request<string>(HttpMethod.Put, url, options, body, null);
}

/// <summary>
/// Retrieve metadata about tasks for a project
/// </summary>
/// <param name="projectId">The unique ID of the project</param>
/// <param name="foreignKey">The foreign key of the project</param>
/// <param name="isSystem">A flag indicating whether this is a system call</param>
/// <returns></returns>
public async Task<AstroResult<TaskMetadataSearchDto[]>> GetTasksByProjectIdAndForeignKeyId(Guid projectId, string foreignKey = null, bool? isSystem = null)
public async Task<AstroResult<TaskMetadataSearchDto[]>> GetTasksByProjectIDAndForeignKeyID(Guid projectId, string foreignKey = null, bool? isSystem = null)

Check warning on line 58 in src/Clients/TaskMetadataClient.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'TaskMetadataClient.GetTasksByProjectIDAndForeignKeyID(Guid, string, bool?)'
{
var url = $"/api/data/projects/{projectId}/tasks/metadata";
var options = new Dictionary<string, object>();
Expand Down
6 changes: 3 additions & 3 deletions src/Clients/TaskStatusClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async Task<AstroResult<TaskStatusDto[]>> RetrieveTaskStatuses(Guid projec
/// </summary>
/// <param name="projectId">The unique identifier of the Project for the new TaskStatus</param>
/// <param name="body">Information about the new TaskStatus level to create within this Project</param>
public async Task<AstroResult<TaskStatusDto>> CreateTaskstatus(Guid projectId, TaskStatusCreateDto body)
public async Task<AstroResult<TaskStatusDto>> CreateTaskStatus(Guid projectId, TaskStatusCreateDto body)
{
var url = $"/api/data/projects/{projectId}/tasks/statuses";
return await _client.Request<TaskStatusDto>(HttpMethod.Post, url, null, body, null);
Expand All @@ -73,7 +73,7 @@ public async Task<AstroResult<TaskStatusDto>> CreateTaskstatus(Guid projectId, T
/// </summary>
/// <param name="projectId">The unique identifier of the Project for the new TaskStatus</param>
/// <param name="body">Information about the existing TaskStatus level to update within this Project</param>
public async Task<AstroResult<TaskStatusDto>> UpdateTaskstatus(Guid projectId, TaskStatusUpdateDto body)
public async Task<AstroResult<TaskStatusDto>> UpdateTaskStatus(Guid projectId, TaskStatusUpdateDto body)
{
var url = $"/api/data/projects/{projectId}/tasks/statuses";
return await _client.Request<TaskStatusDto>(HttpMethod.Put, url, null, body, null);
Expand All @@ -87,7 +87,7 @@ public async Task<AstroResult<TaskStatusDto>> UpdateTaskstatus(Guid projectId, T
/// </summary>
/// <param name="projectId">The unique identifier of the Project for the TaskStatus level to delete</param>
/// <param name="taskStatusId">The Id of the TaskStatus level to be removed.</param>
public async Task<AstroResult<string>> DeleteTaskstatus(Guid projectId, Guid taskStatusId)
public async Task<AstroResult<string>> DeleteTaskStatus(Guid projectId, Guid taskStatusId)
{
var url = $"/api/data/projects/{projectId}/tasks/statuses/{taskStatusId}";
return await _client.Request<string>(HttpMethod.Delete, url, null, null, null);
Expand Down
6 changes: 3 additions & 3 deletions src/Clients/TaskTagClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public TaskTagClient(ProjectManagerClient client)
/// </summary>
/// <param name="taskId">The unique identifier of the Task for which we will replace TaskTags</param>
/// <param name="body">The replacement list of TaskTags for this Task</param>
public async Task<AstroResult<ChangeSetStatusDto>> ReplaceTasktags(Guid taskId, NameDto[] body)
public async Task<AstroResult<ChangeSetStatusDto>> ReplaceTaskTags(Guid taskId, NameDto[] body)
{
var url = $"/api/data/tasks/{taskId}/tags";
return await _client.Request<ChangeSetStatusDto>(HttpMethod.Post, url, null, body, null);
Expand All @@ -60,7 +60,7 @@ public async Task<AstroResult<ChangeSetStatusDto>> ReplaceTasktags(Guid taskId,
/// </summary>
/// <param name="taskId">The unique identifier of the Task for which we will add TaskTags</param>
/// <param name="body">The new TaskTags to add to this Task</param>
public async Task<AstroResult<ChangeSetStatusDto>> AddTasktagToTask(Guid taskId, NameDto[] body)
public async Task<AstroResult<ChangeSetStatusDto>> AddTaskTagToTask(Guid taskId, NameDto[] body)
{
var url = $"/api/data/tasks/{taskId}/tags";
return await _client.Request<ChangeSetStatusDto>(HttpMethod.Put, url, null, body, null);
Expand All @@ -74,7 +74,7 @@ public async Task<AstroResult<ChangeSetStatusDto>> AddTasktagToTask(Guid taskId,
/// </summary>
/// <param name="taskId">The unique identifier of the Task for which we will remove existing TaskTags</param>
/// <param name="body">The TaskTags to remove from this Task</param>
public async Task<AstroResult<ChangeSetStatusDto>> RemoveTasktagFromTask(Guid taskId, NameDto[] body)
public async Task<AstroResult<ChangeSetStatusDto>> RemoveTaskTagFromTask(Guid taskId, NameDto[] body)
{
var url = $"/api/data/tasks/{taskId}/tags";
return await _client.Request<ChangeSetStatusDto>(HttpMethod.Delete, url, null, body, null);
Expand Down
2 changes: 1 addition & 1 deletion src/Clients/TimesheetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public async Task<AstroResult<TimesheetResponseDto>> CreateTimeEntry(TimesheetCr
/// <param name="filter">Filter the expression according to oData queries</param>
/// <param name="orderby">Order collection by this field.</param>
/// <param name="expand">Include related data in the response</param>
public async Task<AstroResult<TimesheetDto[]>> QueryTimesheets(int? top = null, int? skip = null, string filter = null, string orderby = null, string expand = null)
public async Task<AstroResult<TimesheetDto[]>> QueryTimeSheets(int? top = null, int? skip = null, string filter = null, string orderby = null, string expand = null)
{
var url = $"/api/data/timesheets";
var options = new Dictionary<string, object>();
Expand Down
2 changes: 1 addition & 1 deletion src/Clients/UserRoleClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public UserRoleClient(ProjectManagerClient client)
/// A UserRole is a name for a privilege level granted to a specific User. The &#39;Global Admin&#39; UserRole is granted to the owner of the Workspace, and this UserRole cannot be changed. You can choose which UserRole applies to a User within your Workspace.
///
/// </summary>
public async Task<AstroResult<UserRoleDto[]>> RetrieveUserroles()
public async Task<AstroResult<UserRoleDto[]>> RetrieveUserRoles()
{
var url = $"/api/data/users/roles";
return await _client.Request<UserRoleDto[]>(HttpMethod.Get, url, null, null, null);
Expand Down
37 changes: 0 additions & 37 deletions src/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ namespace ProjectManager.SDK
/// </summary>
public static class DashboardTypeValues
{
/// <summary>
/// The "My Summary" dashboard
/// </summary>
public const string MySummary = "MySummary";

Check warning on line 24 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'DashboardTypeValues.MySummary'

/// <summary>
/// The portfolio summary dashboard
/// </summary>
public const string PortfolioSummary = "PortfolioSummary";

Check warning on line 25 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'DashboardTypeValues.PortfolioSummary'
}

Expand All @@ -37,24 +30,9 @@ public static class DashboardTypeValues
/// </summary>
public static class ProjectPermissionValues
{
/// <summary>
/// Represents a guest user within the project
/// </summary>
public const string Guest = "Guest";

Check warning on line 33 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'ProjectPermissionValues.Guest'

/// <summary>
/// Represents a collaborator who can make some changes to a project
/// </summary>
public const string Collaborate = "Collaborate";

Check warning on line 34 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'ProjectPermissionValues.Collaborate'

/// <summary>
/// Represents an editor who can make most changes to a project
/// </summary>
public const string Editor = "Editor";

Check warning on line 35 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'ProjectPermissionValues.Editor'

/// <summary>
/// Represents a manager who can make all changes to a project
/// </summary>
public const string Manager = "Manager";

Check warning on line 36 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'ProjectPermissionValues.Manager'
}

Expand All @@ -63,24 +41,9 @@ public static class ProjectPermissionValues
/// </summary>
public static class StateValues
{
/// <summary>
/// Indicates that work has not yet started
/// </summary>
public const string NotStarted = "NotStarted";

Check warning on line 44 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'StateValues.NotStarted'

/// <summary>
/// Some work has started, but it is not yet completed
/// </summary>
public const string InProgress = "InProgress";

Check warning on line 45 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'StateValues.InProgress'

/// <summary>
/// Completed successfully
/// </summary>
public const string Success = "Success";

Check warning on line 46 in src/Enums.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Missing XML comment for publicly visible type or member 'StateValues.Success'

/// <summary>
/// Failed
/// </summary>
public const string Fail = "Fail";
}
}
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 102.0.2886
* @version 102.0.2949
* @link https://github.com/projectmgr/projectmanager-sdk-csharp
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/IApiKeyClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public interface IApiKeyClient
///
/// </summary>
/// <param name="id">The unique identifier of the API key to revoke</param>
Task<AstroResult<string>> RevokeApiKey(Guid id);
Task<AstroResult<string>> RevokeAPIKey(Guid id);
}
}
10 changes: 10 additions & 0 deletions src/Interfaces/IChangesetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,15 @@ public interface IChangesetClient
/// </summary>
/// <param name="changeSetId">The unique ID number of the Changeset to retrieve</param>
Task<AstroResult<ChangesetGetResponseDto>> RetrieveCompletedChangeset(Guid changeSetId);

/// <summary>
/// Retrieve Changesets by Project ID
///
/// </summary>
/// <param name="projectId"></param>
/// <param name="version"></param>
/// <param name="page"></param>
/// <param name="take"></param>
Task<AstroResult<ChangeSetResponseDto[]>> RetrieveChangesetsByProjectID(Guid projectId, int? version = null, int? page = null, int? take = null);
}
}
Loading

0 comments on commit daf6132

Please sign in to comment.