Skip to content

Commit

Permalink
Compliance requests - Release 117 (projectmgr#38)
Browse files Browse the repository at this point in the history
# Patch notes for 117.0.4438

These patch notes summarize the changes from version 115.0.4330.

One partner has requested a version of the SDK that excludes the method `System.IO.File.ReadAllBytes`.  We've updated the API call surface to make these calls optional.

Added 1 new APIs:
* Resource.ResendInviteEmail (GET /api/data/resources/{resourceId}/resendinvite)

Changes to data models:
* ResourceCreateDto: Added new field `colorName`
* ResourceDto: Added new field `colorName`
* ResourceDto: Added new field `color`
* ResourceUpdateDto: Added new field `colorName`
* TimesheetDto: Added new field `resourceId`
* TimesheetDto: Added new field `taskId`
* TimesheetDto: Added new field `projectId`
* UserError: Added new field `statusCode`

* Update ProjectManagerClient.nuspec

* Remove duplicate endpoint

* Update patch notes for 116 -> 117
  • Loading branch information
tspence authored Sep 3, 2024
1 parent f0c614e commit bbe7387
Show file tree
Hide file tree
Showing 51 changed files with 14,497 additions and 185 deletions.
17 changes: 7 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>116.0.4391</version>
<version>117.0.4438</version>
<title>ProjectManager.SDK</title>
<authors>ProjectManager.com</authors>
<owners>ProjectManager.com, Inc.</owners>
Expand All @@ -14,18 +14,15 @@
<readme>docs/README.md</readme>
<summary>ProjectManager API for DotNet</summary>
<releaseNotes>
# Patch notes for 116.0.4391
# Patch notes for 117.0.4438

These patch notes summarize the changes from version 115.0.4330.

Added 1 new APIs:
* Resource.ResendInviteEmail (GET /api/data/resources/{resourceId}/resendinvite)
These patch notes summarize the changes from version 116.0.4391.

Changes to data models:
* TimesheetDto: Added new field `resourceId`
* TimesheetDto: Added new field `taskId`
* TimesheetDto: Added new field `projectId`
* UserError: Added new field `statusCode`
* ResourceCreateDto: Added new field `colorName`
* ResourceDto: Added new field `colorName`
* ResourceDto: Added new field `color`
* ResourceUpdateDto: Added new field `colorName`


</releaseNotes>
Expand Down
8 changes: 4 additions & 4 deletions src/Clients/ApiKeyClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public ApiKeyClient(ProjectManagerClient client)
public async Task<AstroResult<ApiKeyDto>> CreateApiKey(ApiKeyCreateDto body)
{
var url = $"/api/data/api-keys";
return await _client.Request<ApiKeyDto>(HttpMethod.Post, url, null, body, null);
return await _client.RequestWithBody<ApiKeyDto>(HttpMethod.Post, url, null, body);
}

/// <summary>
Expand All @@ -76,7 +76,7 @@ public async Task<AstroResult<ApiKeyDto>> CreateApiKey(ApiKeyCreateDto body)
public async Task<AstroResult<ApiKeyDto[]>> ListApiKeys()
{
var url = $"/api/data/api-keys";
return await _client.Request<ApiKeyDto[]>(HttpMethod.Get, url, null, null, null);
return await _client.Request<ApiKeyDto[]>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -98,7 +98,7 @@ public async Task<AstroResult<ApiKeyDto[]>> ListApiKeys()
public async Task<AstroResult<string>> RevokeAllApiKeys()
{
var url = $"/api/data/api-keys/revoke-all";
return await _client.Request<string>(HttpMethod.Delete, url, null, null, null);
return await _client.Request<string>(HttpMethod.Delete, url, null);
}

/// <summary>
Expand All @@ -119,7 +119,7 @@ public async Task<AstroResult<string>> RevokeAllApiKeys()
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);
return await _client.Request<string>(HttpMethod.Delete, url, null);
}
}
}
4 changes: 2 additions & 2 deletions src/Clients/ChangesetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public ChangesetClient(ProjectManagerClient client)
public async Task<AstroResult<ProjectChangeStatusDto>> RetrieveChangesetStatus(Guid changeSetId)
{
var url = $"/api/data/changesets/{changeSetId}";
return await _client.Request<ProjectChangeStatusDto>(HttpMethod.Get, url, null, null, null);
return await _client.Request<ProjectChangeStatusDto>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -81,7 +81,7 @@ public async Task<AstroResult<ProjectChangeStatusDto>> RetrieveChangesetStatus(G
public async Task<AstroResult<ProjectChangeStatusDto>> RetrieveCompletedChangesetStatus(Guid changeSetId)
{
var url = $"/api/data/changesets/{changeSetId}/poll";
return await _client.Request<ProjectChangeStatusDto>(HttpMethod.Get, url, null, null, null);
return await _client.Request<ProjectChangeStatusDto>(HttpMethod.Get, url, null);
}
}
}
4 changes: 2 additions & 2 deletions src/Clients/DashboardClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public DashboardClient(ProjectManagerClient client)
public async Task<AstroResult<DashboardSettingDto>> RetrieveDashboardUserSettings(string type)
{
var url = $"/api/data/dashboards/settings/{type}";
return await _client.Request<DashboardSettingDto>(HttpMethod.Get, url, null, null, null);
return await _client.Request<DashboardSettingDto>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -55,7 +55,7 @@ public async Task<AstroResult<DashboardSettingDto>> RetrieveDashboardUserSetting
public async Task<AstroResult<DashboardSettingDto>> CreateOrUpdateUserDashboardSettings(DashboardSettingCreateDto body)
{
var url = $"/api/data/dashboards/settings";
return await _client.Request<DashboardSettingDto>(HttpMethod.Post, url, null, body, null);
return await _client.RequestWithBody<DashboardSettingDto>(HttpMethod.Post, url, null, body);
}
}
}
4 changes: 2 additions & 2 deletions src/Clients/DiscussionClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public DiscussionClient(ProjectManagerClient client)
public async Task<AstroResult<DiscussionCommentDto[]>> RetrieveTaskComments(Guid taskId)
{
var url = $"/api/data/tasks/{taskId}/comments";
return await _client.Request<DiscussionCommentDto[]>(HttpMethod.Get, url, null, null, null);
return await _client.Request<DiscussionCommentDto[]>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -61,7 +61,7 @@ public async Task<AstroResult<DiscussionCommentDto[]>> RetrieveTaskComments(Guid
public async Task<AstroResult<DiscussionCommentCreateResponseDto>> CreateTaskComments(Guid taskId, DiscussionCommentCreateDto body)
{
var url = $"/api/data/tasks/{taskId}/comments";
return await _client.Request<DiscussionCommentCreateResponseDto>(HttpMethod.Post, url, null, body, null);
return await _client.RequestWithBody<DiscussionCommentCreateResponseDto>(HttpMethod.Post, url, null, body);
}
}
}
8 changes: 4 additions & 4 deletions src/Clients/FileClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async Task<AstroResult<byte[]>> DownloadFile(Guid documentId, string type
var url = $"/api/data/files/{documentId}/download";
var options = new Dictionary<string, object>();
if (type != null) { options["type"] = type; }
return await _client.Request<byte[]>(HttpMethod.Get, url, options, null, null);
return await _client.Request<byte[]>(HttpMethod.Get, url, options);
}

/// <summary>
Expand All @@ -79,7 +79,7 @@ public async Task<AstroResult<byte[]>> DownloadFile(Guid documentId, string type
public async Task<AstroResult<byte[]>> DownloadAThumbnailImage(Guid documentId)
{
var url = $"/api/data/files/{documentId}/thumbnail";
return await _client.Request<byte[]>(HttpMethod.Get, url, null, null, null);
return await _client.Request<byte[]>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -100,7 +100,7 @@ public async Task<AstroResult<byte[]>> DownloadAThumbnailImage(Guid documentId)
public async Task<AstroResult<string>> UpdateFile(Guid fileId, UpdateRequestDto body)
{
var url = $"/api/data/files/{fileId}";
return await _client.Request<string>(HttpMethod.Put, url, null, body, null);
return await _client.RequestWithBody<string>(HttpMethod.Put, url, null, body);
}

/// <summary>
Expand All @@ -116,7 +116,7 @@ public async Task<AstroResult<string>> DeleteFile(Guid fileId, bool? hard = null
var url = $"/api/data/files/{fileId}";
var options = new Dictionary<string, object>();
if (hard != null) { options["hard"] = hard; }
return await _client.Request<string>(HttpMethod.Delete, url, options, null, null);
return await _client.Request<string>(HttpMethod.Delete, url, options);
}
}
}
6 changes: 3 additions & 3 deletions src/Clients/HolidayClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task<AstroResult<ResourceHolidayDto[]>> QueryResourceHolidays(int?
if (filter != null) { options["$filter"] = filter; }
if (orderby != null) { options["$orderby"] = orderby; }
if (expand != null) { options["$expand"] = expand; }
return await _client.Request<ResourceHolidayDto[]>(HttpMethod.Get, url, options, null, null);
return await _client.Request<ResourceHolidayDto[]>(HttpMethod.Get, url, options);
}

/// <summary>
Expand All @@ -75,7 +75,7 @@ public async Task<AstroResult<CountryHolidayDto[]>> QueryCountryHolidays(int? to
if (filter != null) { options["$filter"] = filter; }
if (orderby != null) { options["$orderby"] = orderby; }
if (expand != null) { options["$expand"] = expand; }
return await _client.Request<CountryHolidayDto[]>(HttpMethod.Get, url, options, null, null);
return await _client.Request<CountryHolidayDto[]>(HttpMethod.Get, url, options);
}

/// <summary>
Expand All @@ -95,7 +95,7 @@ public async Task<AstroResult<GlobalHolidayDto[]>> QueryGlobalHolidays(int? top
if (filter != null) { options["$filter"] = filter; }
if (orderby != null) { options["$orderby"] = orderby; }
if (expand != null) { options["$expand"] = expand; }
return await _client.Request<GlobalHolidayDto[]>(HttpMethod.Get, url, options, null, null);
return await _client.Request<GlobalHolidayDto[]>(HttpMethod.Get, url, options);
}
}
}
12 changes: 6 additions & 6 deletions src/Clients/HomeFileClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public HomeFileClient(ProjectManagerClient client)
///
/// This API returns a JSON response indicating success or failure.
/// </summary>
/// <param name="filename">The full path of a file to upload to the API</param>
public async Task<AstroResult<FileDto>> UploadHomeFile(string filename)
/// <param name="fileName">The full path of a file to upload to the API</param>
public async Task<AstroResult<FileDto>> UploadHomeFile(string fileName, byte[] fileBytes)

Check warning on line 55 in src/Clients/HomeFileClient.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Parameter 'fileBytes' has no matching param tag in the XML comment for 'HomeFileClient.UploadHomeFile(string, byte[])' (but other parameters do)
{
var url = $"/api/data/home/files";
return await _client.Request<FileDto>(HttpMethod.Post, url, null, null, filename);
return await _client.RequestWithFile<FileDto>(HttpMethod.Post, url, null, fileBytes, fileName);
}

/// <summary>
Expand All @@ -74,11 +74,11 @@ public async Task<AstroResult<FileDto>> UploadHomeFile(string filename)
/// This API returns a JSON response indicating success or failure.
/// </summary>
/// <param name="folderId">The reference to the sub folder to put the file into</param>
/// <param name="filename">The full path of a file to upload to the API</param>
public async Task<AstroResult<FileDto>> UploadHomeFileToFolder(Guid folderId, string filename)
/// <param name="fileName">The full path of a file to upload to the API</param>
public async Task<AstroResult<FileDto>> UploadHomeFileToFolder(Guid folderId, string fileName, byte[] fileBytes)

Check warning on line 78 in src/Clients/HomeFileClient.cs

View workflow job for this annotation

GitHub Actions / Update NuGet package

Parameter 'fileBytes' has no matching param tag in the XML comment for 'HomeFileClient.UploadHomeFileToFolder(Guid, string, byte[])' (but other parameters do)
{
var url = $"/api/data/home/folders/{folderId}/files";
return await _client.Request<FileDto>(HttpMethod.Post, url, null, null, filename);
return await _client.RequestWithFile<FileDto>(HttpMethod.Post, url, null, fileBytes, fileName);
}
}
}
2 changes: 1 addition & 1 deletion src/Clients/IntegrationCategoryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public IntegrationCategoryClient(ProjectManagerClient client)
public async Task<AstroResult<IntegrationCategoryDto[]>> RetrieveProviderCategories()
{
var url = $"/api/data/integrations/categories";
return await _client.Request<IntegrationCategoryDto[]>(HttpMethod.Get, url, null, null, null);
return await _client.Request<IntegrationCategoryDto[]>(HttpMethod.Get, url, null);
}
}
}
8 changes: 4 additions & 4 deletions src/Clients/IntegrationClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public IntegrationClient(ProjectManagerClient client)
public async Task<AstroResult<IntegrationDto>> RetrieveIntegration(Guid integrationId)
{
var url = $"/api/data/integrations/{integrationId}";
return await _client.Request<IntegrationDto>(HttpMethod.Get, url, null, null, null);
return await _client.Request<IntegrationDto>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -61,7 +61,7 @@ public async Task<AstroResult<IntegrationDto>> RetrieveIntegration(Guid integrat
public async Task<AstroResult<IntegrationDto>> EnableIntegration(Guid integrationId)
{
var url = $"/api/data/integrations/{integrationId}";
return await _client.Request<IntegrationDto>(HttpMethod.Post, url, null, null, null);
return await _client.Request<IntegrationDto>(HttpMethod.Post, url, null);
}

/// <summary>
Expand All @@ -74,7 +74,7 @@ public async Task<AstroResult<IntegrationDto>> EnableIntegration(Guid integratio
public async Task<AstroResult<string>> DisableIntegration(Guid integrationId)
{
var url = $"/api/data/integrations/{integrationId}";
return await _client.Request<string>(HttpMethod.Delete, url, null, null, null);
return await _client.Request<string>(HttpMethod.Delete, url, null);
}

/// <summary>
Expand All @@ -86,7 +86,7 @@ public async Task<AstroResult<string>> DisableIntegration(Guid integrationId)
public async Task<AstroResult<IntegrationDto[]>> RetrieveAllIntegrations()
{
var url = $"/api/data/integrations";
return await _client.Request<IntegrationDto[]>(HttpMethod.Get, url, null, null, null);
return await _client.Request<IntegrationDto[]>(HttpMethod.Get, url, null);
}
}
}
14 changes: 7 additions & 7 deletions src/Clients/IntegrationProviderClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public IntegrationProviderClient(ProjectManagerClient client)
public async Task<AstroResult<IntegrationProviderDto[]>> ListProviders()
{
var url = $"/api/data/integrations/providers";
return await _client.Request<IntegrationProviderDto[]>(HttpMethod.Get, url, null, null, null);
return await _client.Request<IntegrationProviderDto[]>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -62,7 +62,7 @@ public async Task<AstroResult<IntegrationProviderDto[]>> ListProviders()
public async Task<AstroResult<ConnectionSchemaDto>> ActivateIntegrationProvider(Guid providerId)
{
var url = $"/api/data/integrations/providers/{providerId}";
return await _client.Request<ConnectionSchemaDto>(HttpMethod.Post, url, null, null, null);
return await _client.Request<ConnectionSchemaDto>(HttpMethod.Post, url, null);
}

/// <summary>
Expand All @@ -77,7 +77,7 @@ public async Task<AstroResult<ConnectionSchemaDto>> ActivateIntegrationProvider(
public async Task<AstroResult<string>> UpdateIntegrationProvider(Guid providerId, AuthenticationDto body)
{
var url = $"/api/data/integrations/providers/{providerId}";
return await _client.Request<string>(HttpMethod.Put, url, null, body, null);
return await _client.RequestWithBody<string>(HttpMethod.Put, url, null, body);
}

/// <summary>
Expand All @@ -91,7 +91,7 @@ public async Task<AstroResult<string>> UpdateIntegrationProvider(Guid providerId
public async Task<AstroResult<string>> DeactivateIntegrationProvider(Guid providerId)
{
var url = $"/api/data/integrations/providers/{providerId}";
return await _client.Request<string>(HttpMethod.Delete, url, null, null, null);
return await _client.Request<string>(HttpMethod.Delete, url, null);
}

/// <summary>
Expand All @@ -107,7 +107,7 @@ public async Task<AstroResult<string>> DeactivateIntegrationProvider(Guid provid
public async Task<AstroResult<DirectLinkDto>> CreateUserIntegrationProviderConnection(Guid providerId)
{
var url = $"/api/data/integrations/providers/{providerId}/user-connection";
return await _client.Request<DirectLinkDto>(HttpMethod.Post, url, null, null, null);
return await _client.Request<DirectLinkDto>(HttpMethod.Post, url, null);
}

/// <summary>
Expand All @@ -122,7 +122,7 @@ public async Task<AstroResult<DirectLinkDto>> CreateUserIntegrationProviderConne
public async Task<AstroResult<string>> UpdateUserIntegrationProviderConnection(Guid providerId, AuthenticationStatusDto body)
{
var url = $"/api/data/integrations/providers/{providerId}/user-connection";
return await _client.Request<string>(HttpMethod.Put, url, null, body, null);
return await _client.RequestWithBody<string>(HttpMethod.Put, url, null, body);
}

/// <summary>
Expand All @@ -136,7 +136,7 @@ public async Task<AstroResult<string>> UpdateUserIntegrationProviderConnection(G
public async Task<AstroResult<string>> DisconnectUserIntegrationProviderConnection(Guid providerId)
{
var url = $"/api/data/integrations/providers/{providerId}/user-connection";
return await _client.Request<string>(HttpMethod.Delete, url, null, null, null);
return await _client.Request<string>(HttpMethod.Delete, url, null);
}
}
}
4 changes: 2 additions & 2 deletions src/Clients/LicenseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public LicenseClient(ProjectManagerClient client)
public async Task<AstroResult<LicenseDto[]>> RetrieveLicenses()
{
var url = $"/api/data/license";
return await _client.Request<LicenseDto[]>(HttpMethod.Get, url, null, null, null);
return await _client.Request<LicenseDto[]>(HttpMethod.Get, url, null);
}

/// <summary>
Expand All @@ -64,7 +64,7 @@ public async Task<AstroResult<LicenseDto[]>> RetrieveLicenses()
public async Task<AstroResult<LicenseDto[]>> AddLicense(string bundleSku)
{
var url = $"/api/data/license/{bundleSku}/try";
return await _client.Request<LicenseDto[]>(HttpMethod.Post, url, null, null, null);
return await _client.Request<LicenseDto[]>(HttpMethod.Post, url, null);
}
}
}
2 changes: 1 addition & 1 deletion src/Clients/MeClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public MeClient(ProjectManagerClient client)
public async Task<AstroResult<WorkSpaceUserInfoDto>> RetrieveMe()
{
var url = $"/api/data/me";
return await _client.Request<WorkSpaceUserInfoDto>(HttpMethod.Get, url, null, null, null);
return await _client.Request<WorkSpaceUserInfoDto>(HttpMethod.Get, url, null);
}
}
}
Loading

0 comments on commit bbe7387

Please sign in to comment.