From 323c1500a67bc87622480de6304be2fa5a4ce244 Mon Sep 17 00:00:00 2001 From: Ted Spence Date: Mon, 11 Dec 2023 09:23:43 -0800 Subject: [PATCH] Release 99 (#19) # Patch notes for 99.0.2541 These patch notes summarize the changes from version 98.0.2363. Added 2 new APIs: * TaskField.QueryTaskFields (GET /api/data/projects/tasks/fields) * TaskField.QueryTaskFieldValues (GET /api/data/tasks/fields/values) Renamed 2 old APIs: * Renamed 'ProjectField.UpdateProjectField' to 'ProjectField.UpdateProjectFieldValue' * Renamed 'ProjectMembers.RetrieveUserProjectMemberShip' to 'ProjectMembers.RetrieveUserProjectMembership' --- ProjectManagerClient.nuspec | 131 ++++++++++++-- src/Clients/FileClient.cs | 17 ++ src/Clients/ProjectCustomerClient.cs | 2 +- src/Clients/ProjectFieldClient.cs | 22 ++- src/Clients/ProjectMembersClient.cs | 26 ++- src/Clients/TaskClient.cs | 4 +- src/Clients/TaskFieldClient.cs | 94 +++++++--- src/Clients/TeamsClient.cs | 53 ++++++ src/IProjectManagerClient.cs | 6 +- src/Interfaces/IFileClient.cs | 13 ++ src/Interfaces/IProjectCustomerClient.cs | 2 +- src/Interfaces/IProjectFieldClient.cs | 18 +- src/Interfaces/IProjectMembersClient.cs | 26 ++- src/Interfaces/ITaskClient.cs | 2 +- src/Interfaces/ITaskFieldClient.cs | 56 ++++-- src/Interfaces/ITeamsClient.cs | 38 ++++ src/Models/ConnectionSchemaDto.cs | 5 + ...dsResponseDto.cs => CreateTaskFieldDto.cs} | 23 +-- src/Models/GetProjectFieldsResponseDto.cs | 5 + .../IntegrationConnectionSchemeObjectDto.cs | 44 +++++ src/Models/IntegrationDto.cs | 5 + src/Models/IntegrationProviderDto.cs | 5 + src/Models/MasterConnectionSchemeDto.cs | 44 +++++ src/Models/ProjectFieldsValueResponseDto.cs | 19 +- src/Models/TaskDetailsDto.cs | 166 ------------------ src/Models/TaskDto.cs | 2 +- src/Models/TaskFieldDto.cs | 58 +++++- ...jectFieldDto.cs => TaskFieldProjectDto.cs} | 16 +- ...lueResponseDto.cs => TaskFieldValueDto.cs} | 33 ++-- ...RequestDto.cs => TaskFieldValueTaskDto.cs} | 25 +-- src/Models/TimesheetDto.cs | 5 + src/Models/WorkSpaceLinksDto.cs | 6 +- src/Models/WorkSpaceUserInfoDto.cs | 30 +++- src/ProjectManagerClient.cs | 10 +- 34 files changed, 690 insertions(+), 321 deletions(-) create mode 100644 src/Clients/TeamsClient.cs create mode 100644 src/Interfaces/ITeamsClient.cs rename src/Models/{GetTaskFieldsResponseDto.cs => CreateTaskFieldDto.cs} (79%) create mode 100644 src/Models/IntegrationConnectionSchemeObjectDto.cs create mode 100644 src/Models/MasterConnectionSchemeDto.cs delete mode 100644 src/Models/TaskDetailsDto.cs rename src/Models/{DeleteProjectFieldDto.cs => TaskFieldProjectDto.cs} (58%) rename src/Models/{TaskFieldsValueResponseDto.cs => TaskFieldValueDto.cs} (52%) rename src/Models/{CreateTaskFieldRequestDto.cs => TaskFieldValueTaskDto.cs} (50%) diff --git a/ProjectManagerClient.nuspec b/ProjectManagerClient.nuspec index 61536d1..ad545e7 100644 --- a/ProjectManagerClient.nuspec +++ b/ProjectManagerClient.nuspec @@ -2,7 +2,7 @@ ProjectManager.SDK - 98.0.2363 + 99.0.2548 ProjectManager.SDK ProjectManager.com ProjectManager.com, Inc. @@ -14,21 +14,130 @@ docs/README.md ProjectManager API for DotNet - # Patch notes for 98.0.2363 + # Patch notes for 99.0.2548 - These patch notes summarize the changes from version 97.0.2178. + These patch notes summarize the changes from version 98.0.2363. Added 2 new APIs: - * ProjectField.RetrieveProjectFieldValue (GET /api/data/projects/{projectId}/fields/{fieldId}) - * ProjectField.RetrieveAllProjectFieldValues (GET /api/data/projects/{projectId}/fields) + * TaskField.QueryTaskFields (GET /api/data/projects/tasks/fields) + * TaskField.QueryTaskFieldValues (GET /api/data/tasks/fields/values) - Changes to existing APIs: - * IntegrationProvider.UpdateIntegrationProvider changed [body].Value.DataType from AuthenticationDto to AuthenticationStatusDto - * IntegrationProvider.UpdateIntegrationProvider changed [body].Value.DataTypeRef from /docs/authenticationdto to /docs/authenticationstatusdto + Renamed 2 old APIs: + * Renamed 'ProjectField.UpdateProjectField' to 'ProjectField.UpdateProjectFieldValue' + * Renamed 'ProjectMembers.RetrieveUserProjectMemberShip' to 'ProjectMembers.RetrieveUserProjectMembership' - Deprecated 2 old APIs: - * Integration.AddIntegrationInstance - * Integration.RemoveIntegrationInstance + Changes to existing APIs: + * ApiKey.CreateApiKey removed header parameter `x-integration-name` + * ApiKey.ListApiKeys removed header parameter `x-integration-name` + * ApiKey.RevokeAllApiKeys removed header parameter `x-integration-name` + * ApiKey.RevokeAPIKey removed header parameter `x-integration-name` + * Changeset.RetrieveChangeset removed header parameter `x-integration-name` + * Changeset.RetrieveCompletedChangeset removed header parameter `x-integration-name` + * Dashboard.RetrieveDashboardUserSettings removed header parameter `x-integration-name` + * Dashboard.CreateorUpdateUserDashboardSettings removed header parameter `x-integration-name` + * Discussion.RetrieveTaskComments removed header parameter `x-integration-name` + * Discussion.CreateTaskComments removed header parameter `x-integration-name` + * File.DownloadFile removed header parameter `x-integration-name` + * File.DownloadaThumbnailImage removed header parameter `x-integration-name` + * File.UpdateFile removed header parameter `x-integration-name` + * HomeFile.UploadHomeFile removed header parameter `x-integration-name` + * HomeFile.UploadHomeFileToFolder removed header parameter `x-integration-name` + * Integration.RetrieveIntegration removed header parameter `x-integration-name` + * Integration.EnableIntegration removed header parameter `x-integration-name` + * Integration.DisableIntegration removed header parameter `x-integration-name` + * Integration.RetrieveAllIntegrations removed header parameter `x-integration-name` + * IntegrationCategory.RetrieveProviderCategories removed header parameter `x-integration-name` + * IntegrationProvider.ListProviders removed header parameter `x-integration-name` + * IntegrationProvider.ActivateIntegrationProvider removed header parameter `x-integration-name` + * IntegrationProvider.UpdateIntegrationProvider removed header parameter `x-integration-name` + * IntegrationProvider.DeactivateIntegrationProvider removed header parameter `x-integration-name` + * IntegrationProvider.CreateUserIntegrationProviderConnection removed header parameter `x-integration-name` + * IntegrationProvider.UpdateUserIntegrationProviderConnection removed header parameter `x-integration-name` + * License.RetrieveLicenses removed header parameter `x-integration-name` + * License.AddLicense removed header parameter `x-integration-name` + * Me.RetrieveMe removed header parameter `x-integration-name` + * Project.QueryProjects removed header parameter `x-integration-name` + * Project.CreateProject removed header parameter `x-integration-name` + * Project.RetrieveProject removed header parameter `x-integration-name` + * Project.UpdateProject removed header parameter `x-integration-name` + * ProjectChargeCode.RetrieveChargeCodes removed header parameter `x-integration-name` + * ProjectCustomer.RetrieveProjectCustomers removed header parameter `x-integration-name` + * ProjectField.RetrieveProjectFields removed header parameter `x-integration-name` + * ProjectField.CreateProjectField removed header parameter `x-integration-name` + * ProjectField.DeleteProjectField added path parameter `fieldId` + * ProjectField.DeleteProjectField removed header parameter `x-integration-name` + * ProjectField.DeleteProjectField removed body parameter `body` + * ProjectField.UpdateProjectFieldValue changed [fieldId].Value.DataType from string to uuid + * ProjectField.UpdateProjectFieldValue removed header parameter `x-integration-name` + * ProjectField.RetrieveProjectFieldValue changed [fieldId].Value.DataType from string to uuid + * ProjectField.RetrieveProjectFieldValue removed header parameter `x-integration-name` + * ProjectField.RetrieveAllProjectFieldValues removed header parameter `x-integration-name` + * ProjectFile.UploadProjectFile removed header parameter `x-integration-name` + * ProjectFile.UploadProjectFileToFolder removed header parameter `x-integration-name` + * ProjectFolder.RetrieveProjectFolders removed header parameter `x-integration-name` + * ProjectMembers.RetrieveNewProjectMembers removed header parameter `x-integration-name` + * ProjectMembers.RetrieveProjectMembers removed header parameter `x-integration-name` + * ProjectMembers.RetrieveUserProjectMembership removed header parameter `x-integration-name` + * ProjectMembers.CreateUserProjectMembership removed header parameter `x-integration-name` + * ProjectMembers.UpdateUserProjectMembership removed header parameter `x-integration-name` + * ProjectMembers.RemoveUserProjectMembership removed header parameter `x-integration-name` + * ProjectPriority.RetrieveProjectPriorities removed header parameter `x-integration-name` + * ProjectStatus.RetrieveProjectStatuses removed header parameter `x-integration-name` + * ProjectTemplate.RetrieveProjectTemplates removed header parameter `x-integration-name` + * ProjectTemplate.RetrieveTemplateCategories removed header parameter `x-integration-name` + * Resource.CreateResource removed header parameter `x-integration-name` + * Resource.QueryResources removed header parameter `x-integration-name` + * Resource.UpdateResource removed header parameter `x-integration-name` + * Resource.RetrieveResource removed header parameter `x-integration-name` + * ResourceSkill.RetrieveResourceSkills removed header parameter `x-integration-name` + * ResourceSkill.CreateResourceSkill removed header parameter `x-integration-name` + * ResourceSkill.UpdateResourceSkill removed header parameter `x-integration-name` + * ResourceSkill.DeleteResourceSkill removed header parameter `x-integration-name` + * ResourceTeam.RetrieveResourceTeams removed header parameter `x-integration-name` + * ResourceTeam.CreateResourceTeam removed header parameter `x-integration-name` + * ResourceTeam.DeleteResourceTeam removed header parameter `x-integration-name` + * ResourceTeam.UpdateResourceTeam removed header parameter `x-integration-name` + * Tag.QueryTags removed header parameter `x-integration-name` + * Tag.CreateTag removed header parameter `x-integration-name` + * Tag.UpdateTag removed header parameter `x-integration-name` + * Task.QueryTasks removed header parameter `x-integration-name` + * Task.RetrieveTask removed header parameter `x-integration-name` + * Task.UpdateTask removed header parameter `x-integration-name` + * Task.DeleteTask removed header parameter `x-integration-name` + * Task.CreateTask removed header parameter `x-integration-name` + * Task.RetrieveTaskPriorities removed header parameter `x-integration-name` + * Task.CreateManyTasks removed header parameter `x-integration-name` + * Task.AddParentTask removed header parameter `x-integration-name` + * Task.UpdateParentTask removed header parameter `x-integration-name` + * Task.RemoveParentTask removed header parameter `x-integration-name` + * TaskAssignee.ReplaceTaskAssignees removed header parameter `x-integration-name` + * TaskAssignee.CreateOrUpdateTaskAssignee removed header parameter `x-integration-name` + * TaskAssignee.DeleteTaskAssignees removed header parameter `x-integration-name` + * TaskField.RetrieveTaskFields removed header parameter `x-integration-name` + * TaskField.CreateTaskField changed [body].Value.DataType from CreateTaskFieldDto to CreateTaskFieldRequestDto + * TaskField.CreateTaskField changed [body].Value.DataTypeRef from /docs/createtaskfielddto to /docs/createtaskfieldrequestdto + * TaskField.CreateTaskField removed header parameter `x-integration-name` + * TaskField.DeleteTaskField removed header parameter `x-integration-name` + * TaskField.RetrieveAllTaskFieldValues removed header parameter `x-integration-name` + * TaskField.RetrieveTaskFieldValue removed header parameter `x-integration-name` + * TaskField.UpdateTaskFieldValue removed header parameter `x-integration-name` + * TaskFile.UploadTaskFile removed header parameter `x-integration-name` + * TaskStatus.RetrieveTaskStatuses removed header parameter `x-integration-name` + * TaskStatus.CreateTaskStatus removed header parameter `x-integration-name` + * TaskStatus.UpdateTaskStatus removed header parameter `x-integration-name` + * TaskStatus.DeleteTaskStatus removed header parameter `x-integration-name` + * TaskTag.ReplaceTaskTags removed header parameter `x-integration-name` + * TaskTag.AddTaskTagtoTask removed header parameter `x-integration-name` + * TaskTag.RemoveTaskTagfromTask removed header parameter `x-integration-name` + * Teams.RetrievezipfileforTeamsIntegrations removed header parameter `x-integration-name` + * Timesheet.Createtimeentry removed header parameter `x-integration-name` + * Timesheet.QueryTimeSheets removed header parameter `x-integration-name` + * Timesheet.Deletetimeentry removed header parameter `x-integration-name` + * Timesheet.Updatetimeentry removed header parameter `x-integration-name` + * Timesheet.Returnsactiveadmintasksthatareusedtoreporttime removed header parameter `x-integration-name` + * UserRole.RetrieveUserRoles removed header parameter `x-integration-name` + * WorkSpace.RetrieveWorkspaces removed header parameter `x-integration-name` + * WorkSpace.InvitetoWorkspace removed header parameter `x-integration-name` diff --git a/src/Clients/FileClient.cs b/src/Clients/FileClient.cs index 346c8db..761f9bb 100644 --- a/src/Clients/FileClient.cs +++ b/src/Clients/FileClient.cs @@ -56,6 +56,23 @@ public async Task> DownloadFile(Guid documentId, string type return await _client.Request(HttpMethod.Get, url, options, null, null); } + /// + /// Downloads a thumbnail image associated with a document that was previously uploaded to ProjectManager.com. + /// + /// ProjectManager allows you to store files linked to various elements within your Workspace, + /// such as Projects, Tasks, or your Home. Files are organized based on their storage location. + /// + /// When uploading a file, please allow some time for the file to undergo processing and verification. + /// ProjectManager may reject file uploads containing issues such as malware. Once a file has + /// completed the upload process, you can retrieve its associated thumbnail using the DownloadThumbnail API. + /// + /// The unique identifier of the document for which to download the thumbnail. + public async Task> DownloadaThumbnailImage(Guid documentId) + { + var url = $"/api/data/files/{documentId}/thumbnail"; + return await _client.Request(HttpMethod.Get, url, null, null, null); + } + /// /// Updates information about a File uploaded to your Workspace. /// diff --git a/src/Clients/ProjectCustomerClient.cs b/src/Clients/ProjectCustomerClient.cs index 085f91e..060812d 100644 --- a/src/Clients/ProjectCustomerClient.cs +++ b/src/Clients/ProjectCustomerClient.cs @@ -41,7 +41,7 @@ public ProjectCustomerClient(ProjectManagerClient client) /// /// Retrieves all ProjectCustomers defined within your Workspace. /// - /// A ProjectCustomer is a code used to identify costs within your Projects. Each ProjectCustomer has a name and a unique identifier. ProjectCustomers are defined per Workspace and are shared among Projects. + /// A ProjectCustomer is a code used to identify customers associated with your Projects. Each ProjectCustomer has a name and a unique identifier. ProjectCustomers are defined per Workspace and are shared among Projects. /// /// public async Task> RetrieveProjectCustomers() diff --git a/src/Clients/ProjectFieldClient.cs b/src/Clients/ProjectFieldClient.cs index f531553..85784db 100644 --- a/src/Clients/ProjectFieldClient.cs +++ b/src/Clients/ProjectFieldClient.cs @@ -69,23 +69,23 @@ public async Task> CreateProjectField /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. /// /// - /// The identity of the ProjectField to delete - public async Task> DeleteProjectField(DeleteProjectFieldDto body) + /// The unique identifier or short ID of this ProjectField + public async Task> DeleteProjectField(string fieldId) { - var url = $"/api/data/projects/fields"; - return await _client.Request(HttpMethod.Delete, url, null, body, null); + var url = $"/api/data/projects/fields/{fieldId}"; + return await _client.Request(HttpMethod.Delete, url, null, null, null); } /// - /// Updates an existing ProjectField with new information. + /// Replaces the current value of a ProjectField for a specific Project within your Workspace. /// /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. /// /// /// The unique identifier of the Project that contains this ProjectField - /// The unique identifier of this ProjectField + /// The unique identifier or short ID of this ProjectField /// The new information for this ProjectField - public async Task> UpdateProjectField(Guid projectId, Guid fieldId, UpdateProjectFieldValueDto body) + public async Task> UpdateProjectFieldValue(Guid projectId, string fieldId, UpdateProjectFieldValueDto body) { var url = $"/api/data/projects/{projectId}/fields/{fieldId}"; return await _client.Request(HttpMethod.Put, url, null, body, null); @@ -94,10 +94,12 @@ public async Task> UpdateProjectField(Guid projectId, Guid f /// /// Retrieves the current ProjectField value for a particular Project and ProjectField. /// + /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. + /// /// /// The unique identifier of the Project of the value to retrieve - /// The unique identifier of the ProjectField of the value to retrieve - public async Task> RetrieveProjectFieldValue(Guid projectId, Guid fieldId) + /// The unique identifier or short ID of the ProjectField of the value to retrieve + public async Task> RetrieveProjectFieldValue(Guid projectId, string fieldId) { var url = $"/api/data/projects/{projectId}/fields/{fieldId}"; return await _client.Request(HttpMethod.Get, url, null, null, null); @@ -106,6 +108,8 @@ public async Task> RetrieveProjectFie /// /// Retrieves all ProjectField values for a particular Project. /// + /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. + /// /// /// The unique identifier of the Project for which we want ProjectField values public async Task> RetrieveAllProjectFieldValues(Guid projectId) diff --git a/src/Clients/ProjectMembersClient.cs b/src/Clients/ProjectMembersClient.cs index 39e4dbc..0325a88 100644 --- a/src/Clients/ProjectMembersClient.cs +++ b/src/Clients/ProjectMembersClient.cs @@ -39,7 +39,9 @@ public ProjectMembersClient(ProjectManagerClient client) } /// - /// Returns a list of membership options for new projects. + /// Returns a list of users that can be added as members of a new project, as well as their available project security roles. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// public async Task> RetrieveNewProjectMembers() @@ -49,7 +51,9 @@ public async Task> RetrieveNewProjectMembers() } /// - /// Returns a list of membership options for existing members. Optionally include users who are not a member yet. + /// Returns a list of users that are currently members of a specified project, as well as their current project security roles and available project security roles. Optionally include users who are not currently members of the project, but who are available to be added. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to the project @@ -63,19 +67,23 @@ public async Task> RetrieveProjectMembers(Guid p } /// - /// Return the membership of a project for a user. + /// Returns the project security role in a specified project for a current project member. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference of Project /// Reference of User - public async Task> RetrieveUserProjectMemberShip(Guid projectId, Guid userId) + public async Task> RetrieveUserProjectMembership(Guid projectId, Guid userId) { var url = $"/api/data/projects/{projectId}/members/{userId}"; return await _client.Request(HttpMethod.Get, url, null, null, null); } /// - /// Creates a membership for a user in a project and assigns the user appropriate permissions + /// Creates a membership for a user in a specified project, and assigns the user the appropriate project access based on the specified project security role. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to Project @@ -88,7 +96,9 @@ public async Task> CreateUserProjectMembership(Gui } /// - /// Update existing Project Access Control for user for project + /// Updates the project access for a current member of a specified project by giving the user a new project security role. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to Project @@ -101,7 +111,9 @@ public async Task> UpdateUserProjectMembership(Gui } /// - /// Deletes Project Member + /// Removes a current project member from a specified project. This removes the user's access to that project. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to Project diff --git a/src/Clients/TaskClient.cs b/src/Clients/TaskClient.cs index 293ce43..e790251 100644 --- a/src/Clients/TaskClient.cs +++ b/src/Clients/TaskClient.cs @@ -70,10 +70,10 @@ public async Task> QueryTasks(int? top = null, int? skip /// /// /// The unique identifier or short ID of the Task to retrieve - public async Task> RetrieveTask(string taskId) + public async Task> RetrieveTask(string taskId) { var url = $"/api/data/tasks/{taskId}"; - return await _client.Request(HttpMethod.Get, url, null, null, null); + return await _client.Request(HttpMethod.Get, url, null, null, null); } /// diff --git a/src/Clients/TaskFieldClient.cs b/src/Clients/TaskFieldClient.cs index 9cedd70..e0d358c 100644 --- a/src/Clients/TaskFieldClient.cs +++ b/src/Clients/TaskFieldClient.cs @@ -45,26 +45,51 @@ public TaskFieldClient(ProjectManagerClient client) /// /// /// The unique identifier of the Project to retrieve TaskFields - public async Task> RetrieveTaskFields(Guid projectId) + public async Task> RetrieveTaskFields(Guid projectId) { var url = $"/api/data/projects/{projectId}/tasks/fields"; - return await _client.Request(HttpMethod.Get, url, null, null, null); + return await _client.Request(HttpMethod.Get, url, null, null, null); } /// - /// Creates a new TaskFields for a specific Project within your Workspace. + /// Creates a new TaskField for a specific Project within your Workspace. /// /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. /// /// /// The unique identifier of the Project within which to create this TaskField /// Information about the TaskField to create - public async Task> CreateTaskField(Guid projectId, CreateTaskFieldRequestDto body) + public async Task> CreateTaskField(Guid projectId, CreateTaskFieldDto body) { var url = $"/api/data/projects/{projectId}/tasks/fields"; return await _client.Request(HttpMethod.Post, url, null, body, null); } + /// + /// Retrieve a list of TaskFields that match an [OData formatted query](https://www.odata.org/). + /// + /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside a Project. + /// + /// + /// The number of records to return + /// Skips the given number of records and then returns $top records + /// Filter the expression according to oData queries + /// Specify which properties should be returned + /// Order collection by this field. + /// Include related data in the response + public async Task> QueryTaskFields(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null) + { + var url = $"/api/data/projects/tasks/fields"; + var options = new Dictionary(); + if (top != null) { options["$top"] = top; } + if (skip != null) { options["$skip"] = skip; } + if (filter != null) { options["$filter"] = filter; } + if (select != null) { options["$select"] = select; } + if (orderby != null) { options["$orderby"] = orderby; } + if (expand != null) { options["$expand"] = expand; } + return await _client.Request(HttpMethod.Get, url, options, null, null); + } + /// /// Deletes a TaskField for a specific Project within your Workspace. /// @@ -80,45 +105,70 @@ public async Task> DeleteTaskField(Guid projectId, Guid fiel } /// - /// Retrieves the current TaskField value for a particular Task and TaskField. + /// Retrieves all TaskField values for a particular Task. /// /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. /// /// - /// The unique identifier of the Task of the value to retrieve - /// The unique identifier of the TaskField of the value to retrieve - public async Task> RetrieveTaskFieldValue(Guid taskId, Guid fieldId) + /// The unique identifier of the Task for which we want TaskField values + public async Task> RetrieveAllTaskFieldValues(Guid taskId) { - var url = $"/api/data/tasks/{taskId}/fields/{fieldId}"; - return await _client.Request(HttpMethod.Get, url, null, null, null); + var url = $"/api/data/tasks/{taskId}/fields/values"; + return await _client.Request(HttpMethod.Get, url, null, null, null); } /// - /// Replaces the current value of a TaskFields for a specific Task within your Workspace. + /// Retrieve a list of TaskFieldValues that match an [OData formatted query](https://www.odata.org/). /// /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. /// /// - /// The unique identifier of the Task whose value you wish to update - /// The unique identifier of the TaskField whose value you wish to update - /// The new value for this TaskField for this Task - public async Task> UpdateTaskFieldValue(Guid taskId, Guid fieldId, UpdateTaskFieldValueDto body) + /// The number of records to return + /// Skips the given number of records and then returns $top records + /// Filter the expression according to oData queries + /// Specify which properties should be returned + /// Order collection by this field. + /// Include related data in the response + public async Task> QueryTaskFieldValues(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null) { - var url = $"/api/data/tasks/{taskId}/fields/{fieldId}"; - return await _client.Request(HttpMethod.Put, url, null, body, null); + var url = $"/api/data/tasks/fields/values"; + var options = new Dictionary(); + if (top != null) { options["$top"] = top; } + if (skip != null) { options["$skip"] = skip; } + if (filter != null) { options["$filter"] = filter; } + if (select != null) { options["$select"] = select; } + if (orderby != null) { options["$orderby"] = orderby; } + if (expand != null) { options["$expand"] = expand; } + return await _client.Request(HttpMethod.Get, url, options, null, null); } /// - /// Retrieves all TaskField values for a particular Task. + /// Retrieves the current TaskField value for a particular Task and TaskField. /// /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. /// /// - /// The unique identifier of the Task for which we want TaskField values - public async Task> RetrieveAllTaskFieldValues(Guid taskId) + /// The unique identifier of the Task of the value to retrieve + /// The unique identifier of the TaskField of the value to retrieve + public async Task> RetrieveTaskFieldValue(Guid taskId, Guid fieldId) { - var url = $"/api/data/tasks/{taskId}/fields"; - return await _client.Request(HttpMethod.Get, url, null, null, null); + var url = $"/api/data/tasks/{taskId}/fields/{fieldId}/values"; + return await _client.Request(HttpMethod.Get, url, null, null, null); + } + + /// + /// Replaces the current value of a TaskField for a specific Task within your Workspace. + /// + /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. + /// + /// + /// The unique identifier of the Task whose value you wish to update + /// The unique identifier of the TaskField whose value you wish to update + /// The new value for this TaskField for this Task + public async Task> UpdateTaskFieldValue(Guid taskId, Guid fieldId, UpdateTaskFieldValueDto body) + { + var url = $"/api/data/tasks/{taskId}/fields/{fieldId}/values"; + return await _client.Request(HttpMethod.Put, url, null, body, null); } } } diff --git a/src/Clients/TeamsClient.cs b/src/Clients/TeamsClient.cs new file mode 100644 index 0000000..6f3186a --- /dev/null +++ b/src/Clients/TeamsClient.cs @@ -0,0 +1,53 @@ +/*** + * ProjectManager API for C# + * + * (c) 2023-2023 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 + * @copyright 2023-2023 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 +{ + /// + /// API methods related to Teams + /// + public class TeamsClient : ITeamsClient + { + private readonly ProjectManagerClient _client; + + /// + /// Constructor + /// + public TeamsClient(ProjectManagerClient client) + { + _client = client; + } + + /// + /// Retrieves zip file for teams integrations. + /// + /// The Teams API is intended for use by ProjectManager and its business development partners. Please + /// contact ProjectManager's sales team to request use of this API. + /// + public async Task> RetrievezipfileforTeamsIntegrations() + { + var url = $"/api/data/integrations/teams/application"; + return await _client.Request(HttpMethod.Get, url, null, null, null); + } + } +} diff --git a/src/IProjectManagerClient.cs b/src/IProjectManagerClient.cs index 40fe0f0..ac13a71 100644 --- a/src/IProjectManagerClient.cs +++ b/src/IProjectManagerClient.cs @@ -9,7 +9,7 @@ * @author ProjectManager.com * * @copyright 2023-2023 ProjectManager.com, Inc. - * @version 98.0.2363 + * @version 99.0.2548 * @link https://github.com/projectmgr/projectmanager-sdk-csharp */ @@ -148,6 +148,10 @@ public interface IProjectManagerClient /// ITaskTagClient TaskTag { get; } /// + /// API methods related to Teams + /// + ITeamsClient Teams { get; } + /// /// API methods related to Timesheet /// ITimesheetClient Timesheet { get; } diff --git a/src/Interfaces/IFileClient.cs b/src/Interfaces/IFileClient.cs index 51e10fd..38d1da5 100644 --- a/src/Interfaces/IFileClient.cs +++ b/src/Interfaces/IFileClient.cs @@ -39,6 +39,19 @@ public interface IFileClient /// If you specify a type of `html`, processes the file using text encoding, otherwise binary Task> DownloadFile(Guid documentId, string type = null); + /// + /// Downloads a thumbnail image associated with a document that was previously uploaded to ProjectManager.com. + /// + /// ProjectManager allows you to store files linked to various elements within your Workspace, + /// such as Projects, Tasks, or your Home. Files are organized based on their storage location. + /// + /// When uploading a file, please allow some time for the file to undergo processing and verification. + /// ProjectManager may reject file uploads containing issues such as malware. Once a file has + /// completed the upload process, you can retrieve its associated thumbnail using the DownloadThumbnail API. + /// + /// The unique identifier of the document for which to download the thumbnail. + Task> DownloadaThumbnailImage(Guid documentId); + /// /// Updates information about a File uploaded to your Workspace. /// diff --git a/src/Interfaces/IProjectCustomerClient.cs b/src/Interfaces/IProjectCustomerClient.cs index d432428..a15ff5e 100644 --- a/src/Interfaces/IProjectCustomerClient.cs +++ b/src/Interfaces/IProjectCustomerClient.cs @@ -30,7 +30,7 @@ public interface IProjectCustomerClient /// /// Retrieves all ProjectCustomers defined within your Workspace. /// - /// A ProjectCustomer is a code used to identify costs within your Projects. Each ProjectCustomer has a name and a unique identifier. ProjectCustomers are defined per Workspace and are shared among Projects. + /// A ProjectCustomer is a code used to identify customers associated with your Projects. Each ProjectCustomer has a name and a unique identifier. ProjectCustomers are defined per Workspace and are shared among Projects. /// /// Task> RetrieveProjectCustomers(); diff --git a/src/Interfaces/IProjectFieldClient.cs b/src/Interfaces/IProjectFieldClient.cs index 4717ccf..0e4bb77 100644 --- a/src/Interfaces/IProjectFieldClient.cs +++ b/src/Interfaces/IProjectFieldClient.cs @@ -50,31 +50,35 @@ public interface IProjectFieldClient /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. /// /// - /// The identity of the ProjectField to delete - Task> DeleteProjectField(DeleteProjectFieldDto body); + /// The unique identifier or short ID of this ProjectField + Task> DeleteProjectField(string fieldId); /// - /// Updates an existing ProjectField with new information. + /// Replaces the current value of a ProjectField for a specific Project within your Workspace. /// /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. /// /// /// The unique identifier of the Project that contains this ProjectField - /// The unique identifier of this ProjectField + /// The unique identifier or short ID of this ProjectField /// The new information for this ProjectField - Task> UpdateProjectField(Guid projectId, Guid fieldId, UpdateProjectFieldValueDto body); + Task> UpdateProjectFieldValue(Guid projectId, string fieldId, UpdateProjectFieldValueDto body); /// /// Retrieves the current ProjectField value for a particular Project and ProjectField. /// + /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. + /// /// /// The unique identifier of the Project of the value to retrieve - /// The unique identifier of the ProjectField of the value to retrieve - Task> RetrieveProjectFieldValue(Guid projectId, Guid fieldId); + /// The unique identifier or short ID of the ProjectField of the value to retrieve + Task> RetrieveProjectFieldValue(Guid projectId, string fieldId); /// /// Retrieves all ProjectField values for a particular Project. /// + /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields for any integration purpose that is important to your business. Each ProjectField has a data type as well as options in how it is handled. ProjectFields can be edited for each Project within your Workspace. + /// /// /// The unique identifier of the Project for which we want ProjectField values Task> RetrieveAllProjectFieldValues(Guid projectId); diff --git a/src/Interfaces/IProjectMembersClient.cs b/src/Interfaces/IProjectMembersClient.cs index e65a723..78729cf 100644 --- a/src/Interfaces/IProjectMembersClient.cs +++ b/src/Interfaces/IProjectMembersClient.cs @@ -28,13 +28,17 @@ public interface IProjectMembersClient { /// - /// Returns a list of membership options for new projects. + /// Returns a list of users that can be added as members of a new project, as well as their available project security roles. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// Task> RetrieveNewProjectMembers(); /// - /// Returns a list of membership options for existing members. Optionally include users who are not a member yet. + /// Returns a list of users that are currently members of a specified project, as well as their current project security roles and available project security roles. Optionally include users who are not currently members of the project, but who are available to be added. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to the project @@ -42,15 +46,19 @@ public interface IProjectMembersClient Task> RetrieveProjectMembers(Guid projectId, bool? includeAllUsers = null); /// - /// Return the membership of a project for a user. + /// Returns the project security role in a specified project for a current project member. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference of Project /// Reference of User - Task> RetrieveUserProjectMemberShip(Guid projectId, Guid userId); + Task> RetrieveUserProjectMembership(Guid projectId, Guid userId); /// - /// Creates a membership for a user in a project and assigns the user appropriate permissions + /// Creates a membership for a user in a specified project, and assigns the user the appropriate project access based on the specified project security role. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to Project @@ -59,7 +67,9 @@ public interface IProjectMembersClient Task> CreateUserProjectMembership(Guid projectId, Guid userId, ProjectMemberRoleDto body); /// - /// Update existing Project Access Control for user for project + /// Updates the project access for a current member of a specified project by giving the user a new project security role. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to Project @@ -68,7 +78,9 @@ public interface IProjectMembersClient Task> UpdateUserProjectMembership(Guid projectId, Guid userId, ProjectMemberRoleDto body); /// - /// Deletes Project Member + /// Removes a current project member from a specified project. This removes the user's access to that project. + /// + /// A project member is a user who has access to a specific project. Project members are assigned a project security role, which controls the level of access they have to the project. Possible project security roles include manage, edit, collaborate, creator, and guest. /// /// /// Reference to Project diff --git a/src/Interfaces/ITaskClient.cs b/src/Interfaces/ITaskClient.cs index a089674..f96be8b 100644 --- a/src/Interfaces/ITaskClient.cs +++ b/src/Interfaces/ITaskClient.cs @@ -48,7 +48,7 @@ public interface ITaskClient /// /// /// The unique identifier or short ID of the Task to retrieve - Task> RetrieveTask(string taskId); + Task> RetrieveTask(string taskId); /// /// Update an existing Task and replace the values of fields specified. diff --git a/src/Interfaces/ITaskFieldClient.cs b/src/Interfaces/ITaskFieldClient.cs index c0eeb1a..ef229f2 100644 --- a/src/Interfaces/ITaskFieldClient.cs +++ b/src/Interfaces/ITaskFieldClient.cs @@ -34,17 +34,31 @@ public interface ITaskFieldClient /// /// /// The unique identifier of the Project to retrieve TaskFields - Task> RetrieveTaskFields(Guid projectId); + Task> RetrieveTaskFields(Guid projectId); /// - /// Creates a new TaskFields for a specific Project within your Workspace. + /// Creates a new TaskField for a specific Project within your Workspace. /// /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. /// /// /// The unique identifier of the Project within which to create this TaskField /// Information about the TaskField to create - Task> CreateTaskField(Guid projectId, CreateTaskFieldRequestDto body); + Task> CreateTaskField(Guid projectId, CreateTaskFieldDto body); + + /// + /// Retrieve a list of TaskFields that match an [OData formatted query](https://www.odata.org/). + /// + /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside a Project. + /// + /// + /// The number of records to return + /// Skips the given number of records and then returns $top records + /// Filter the expression according to oData queries + /// Specify which properties should be returned + /// Order collection by this field. + /// Include related data in the response + Task> QueryTaskFields(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null); /// /// Deletes a TaskField for a specific Project within your Workspace. @@ -56,6 +70,29 @@ public interface ITaskFieldClient /// The unique identifier of the TaskField to delete Task> DeleteTaskField(Guid projectId, Guid fieldId); + /// + /// Retrieves all TaskField values for a particular Task. + /// + /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. + /// + /// + /// The unique identifier of the Task for which we want TaskField values + Task> RetrieveAllTaskFieldValues(Guid taskId); + + /// + /// Retrieve a list of TaskFieldValues that match an [OData formatted query](https://www.odata.org/). + /// + /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. + /// + /// + /// The number of records to return + /// Skips the given number of records and then returns $top records + /// Filter the expression according to oData queries + /// Specify which properties should be returned + /// Order collection by this field. + /// Include related data in the response + Task> QueryTaskFieldValues(int? top = null, int? skip = null, string filter = null, string select = null, string orderby = null, string expand = null); + /// /// Retrieves the current TaskField value for a particular Task and TaskField. /// @@ -64,10 +101,10 @@ public interface ITaskFieldClient /// /// The unique identifier of the Task of the value to retrieve /// The unique identifier of the TaskField of the value to retrieve - Task> RetrieveTaskFieldValue(Guid taskId, Guid fieldId); + Task> RetrieveTaskFieldValue(Guid taskId, Guid fieldId); /// - /// Replaces the current value of a TaskFields for a specific Task within your Workspace. + /// Replaces the current value of a TaskField for a specific Task within your Workspace. /// /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. /// @@ -76,14 +113,5 @@ public interface ITaskFieldClient /// The unique identifier of the TaskField whose value you wish to update /// The new value for this TaskField for this Task Task> UpdateTaskFieldValue(Guid taskId, Guid fieldId, UpdateTaskFieldValueDto body); - - /// - /// Retrieves all TaskField values for a particular Task. - /// - /// A TaskField is a custom field defined within your Workspace for a specific Project. You can define TaskFields for any integration purpose that is important to your business. Each TaskField has a data type as well as options in how it is handled. TaskFields can be edited for each Task inside this Project. - /// - /// - /// The unique identifier of the Task for which we want TaskField values - Task> RetrieveAllTaskFieldValues(Guid taskId); } } diff --git a/src/Interfaces/ITeamsClient.cs b/src/Interfaces/ITeamsClient.cs new file mode 100644 index 0000000..98338e7 --- /dev/null +++ b/src/Interfaces/ITeamsClient.cs @@ -0,0 +1,38 @@ +/*** + * ProjectManager API for C# + * + * (c) 2023-2023 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 + * @copyright 2023-2023 ProjectManager.com, Inc. + * @link https://github.com/projectmgr/projectmanager-sdk-csharp + */ + + + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using ProjectManager.SDK.Models; + + +namespace ProjectManager.SDK.Interfaces +{ + /// + /// API methods related to Teams + /// + public interface ITeamsClient + { + + /// + /// Retrieves zip file for teams integrations. + /// + /// The Teams API is intended for use by ProjectManager and its business development partners. Please + /// contact ProjectManager's sales team to request use of this API. + /// + Task> RetrievezipfileforTeamsIntegrations(); + } +} diff --git a/src/Models/ConnectionSchemaDto.cs b/src/Models/ConnectionSchemaDto.cs index c28b157..8df3de1 100644 --- a/src/Models/ConnectionSchemaDto.cs +++ b/src/Models/ConnectionSchemaDto.cs @@ -26,6 +26,11 @@ namespace ProjectManager.SDK.Models public class ConnectionSchemaDto : ApiModel { + /// + /// Whether or not the Integration Provider is connected. + /// + public bool? Connected { get; set; } + /// /// The URL to use to authenticate with the Integration Provider. /// diff --git a/src/Models/GetTaskFieldsResponseDto.cs b/src/Models/CreateTaskFieldDto.cs similarity index 79% rename from src/Models/GetTaskFieldsResponseDto.cs rename to src/Models/CreateTaskFieldDto.cs index 3f19053..283facc 100644 --- a/src/Models/GetTaskFieldsResponseDto.cs +++ b/src/Models/CreateTaskFieldDto.cs @@ -26,16 +26,11 @@ namespace ProjectManager.SDK.Models /// TaskField has a data type as well as options in how it is handled. TaskFields can be edited /// for each Task inside this Project. /// - public class GetTaskFieldsResponseDto : ApiModel + public class CreateTaskFieldDto : ApiModel { /// - /// The unique identifier of this TaskField - /// - public Guid? Id { get; set; } - - /// - /// The name of this TaskField + /// The name of the TaskField /// public string Name { get; set; } @@ -46,13 +41,8 @@ public class GetTaskFieldsResponseDto : ApiModel /// * Date /// * Checkbox /// * Currency - /// * Dropdown - /// - /// Attempting to create a field with any Type other than these will - /// return an error. - /// - /// For Dropdown TaskFields, specify the list of choices in the `Options` - /// field. + /// * DropdownSingle + /// * DropdownMulti /// public string Type { get; set; } @@ -65,5 +55,10 @@ public class GetTaskFieldsResponseDto : ApiModel /// list. /// public string[] Options { get; set; } + + /// + /// The short Id of this field - human readable identity + /// + public string ShortId { get; set; } } } diff --git a/src/Models/GetProjectFieldsResponseDto.cs b/src/Models/GetProjectFieldsResponseDto.cs index a193005..7e440a6 100644 --- a/src/Models/GetProjectFieldsResponseDto.cs +++ b/src/Models/GetProjectFieldsResponseDto.cs @@ -77,5 +77,10 @@ public class GetProjectFieldsResponseDto : ApiModel /// list. /// public string[] Options { get; set; } + + /// + /// The short Id of this field - human readable identity + /// + public string ShortId { get; set; } } } diff --git a/src/Models/IntegrationConnectionSchemeObjectDto.cs b/src/Models/IntegrationConnectionSchemeObjectDto.cs new file mode 100644 index 0000000..1d9a3a1 --- /dev/null +++ b/src/Models/IntegrationConnectionSchemeObjectDto.cs @@ -0,0 +1,44 @@ +/*** + * ProjectManager API for C# + * + * (c) 2023-2023 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 + * @copyright 2023-2023 ProjectManager.com, Inc. + * @link https://github.com/projectmgr/projectmanager-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace ProjectManager.SDK.Models +{ + + /// + /// Master Connection Scheme for Providers + /// + public class IntegrationConnectionSchemeObjectDto : ApiModel + { + + /// + /// The value of the property + /// + public string Value { get; set; } + + /// + /// The type of the property + /// + public string Type { get; set; } + + /// + /// Send to the client true/false + /// + public bool? SendToClient { get; set; } + } +} diff --git a/src/Models/IntegrationDto.cs b/src/Models/IntegrationDto.cs index 04c056f..00b36f6 100644 --- a/src/Models/IntegrationDto.cs +++ b/src/Models/IntegrationDto.cs @@ -79,5 +79,10 @@ public class IntegrationDto : ApiModel /// True if the user has authenticated /// public bool? Authenticated { get; set; } + + /// + /// True if the integration is auto-enabled + /// + public bool? AutoEnabled { get; set; } } } diff --git a/src/Models/IntegrationProviderDto.cs b/src/Models/IntegrationProviderDto.cs index a6a7922..d050e27 100644 --- a/src/Models/IntegrationProviderDto.cs +++ b/src/Models/IntegrationProviderDto.cs @@ -81,5 +81,10 @@ public class IntegrationProviderDto : ApiModel /// The list of available AuthSetup for this Provider. /// public IntegrationAuthSetupDto AuthSetup { get; set; } + + /// + /// Flag whether user/workspace needs to be setup in Workato + /// + public bool? CreateInWorkato { get; set; } } } diff --git a/src/Models/MasterConnectionSchemeDto.cs b/src/Models/MasterConnectionSchemeDto.cs new file mode 100644 index 0000000..f07efd3 --- /dev/null +++ b/src/Models/MasterConnectionSchemeDto.cs @@ -0,0 +1,44 @@ +/*** + * ProjectManager API for C# + * + * (c) 2023-2023 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 + * @copyright 2023-2023 ProjectManager.com, Inc. + * @link https://github.com/projectmgr/projectmanager-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace ProjectManager.SDK.Models +{ + + /// + /// Master Connection Scheme for Providers + /// + public class MasterConnectionSchemeDto : ApiModel + { + + /// + /// The value of the property + /// + public string Value { get; set; } + + /// + /// The type of the property + /// + public string Type { get; set; } + + /// + /// Send to the client true/false + /// + public bool? SendToClient { get; set; } + } +} diff --git a/src/Models/ProjectFieldsValueResponseDto.cs b/src/Models/ProjectFieldsValueResponseDto.cs index e5a6cd9..cc6ca6d 100644 --- a/src/Models/ProjectFieldsValueResponseDto.cs +++ b/src/Models/ProjectFieldsValueResponseDto.cs @@ -21,8 +21,8 @@ namespace ProjectManager.SDK.Models { /// - /// A Project Field is a custom field defined within your Workspace for each Project. Each - /// Project Field has a data type as well as options in how it is handled. + /// A ProjectField is a custom field defined within your Workspace for each Project. Each + /// ProjectField has a data type as well as options in how it is handled. /// public class ProjectFieldsValueResponseDto : ApiModel { @@ -52,5 +52,20 @@ public class ProjectFieldsValueResponseDto : ApiModel /// * Dropdown /// public string Type { get; set; } + + /// + /// The short Id of this field - human readable identity + /// + public string ShortId { get; set; } + + /// + /// Date and time (in UTC) that this TaskField was created. + /// + public DateTime? CreatedDate { get; set; } + + /// + /// Date and time (in UTC) that this TaskField was last modified. + /// + public DateTime? ModifiedDate { get; set; } } } diff --git a/src/Models/TaskDetailsDto.cs b/src/Models/TaskDetailsDto.cs deleted file mode 100644 index a9f6f68..0000000 --- a/src/Models/TaskDetailsDto.cs +++ /dev/null @@ -1,166 +0,0 @@ -/*** - * ProjectManager API for C# - * - * (c) 2023-2023 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 - * @copyright 2023-2023 ProjectManager.com, Inc. - * @link https://github.com/projectmgr/projectmanager-sdk-csharp - */ - - - -#pragma warning disable CS8618 - -using System; - -namespace ProjectManager.SDK.Models -{ - - /// - /// A Task is an individual element of work that must be performed to complete a Project. A - /// Task can have one or more Resources assigned to it. Tasks can be linked to other Tasks to - /// indicate whether they have a dependency or a connection. - /// - public class TaskDetailsDto : ApiModel - { - - /// - /// The unique identifier of this Task. - /// - public Guid? Id { get; set; } - - /// - /// The Project to which this Task belongs. - /// - public TaskProjectDto Project { get; set; } - - /// - /// The TaskTags that apply to this Task. - /// - public TaskTagDto[] Tags { get; set; } - - /// - /// The list of assignees who are to work on this Task, if any. - /// - public TaskAssigneeDto[] Assignees { get; set; } - - /// - /// A list of TaskTodo items, which are sub-tasks within this Task. - /// - public TaskTodoDto[] Todos { get; set; } - - /// - /// A short ID that can be used to refer to this Task. This short ID is - /// guaranteed to be unique within your Workspace. - /// - public string ShortId { get; set; } - - /// - /// The common name of this Task. - /// - public string Name { get; set; } - - /// - /// A description of the work to be performed in this Task. - /// - public string Description { get; set; } - - /// - /// The TaskStatus assigned to this Task. - /// - public TaskStatusDto Status { get; set; } - - /// - /// The unique identifier of the TaskPriority - /// - public int? PriorityId { get; set; } - - /// - /// The date when work on this Task is planned to begin. - /// - /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. - /// - public string PlannedStartDate { get; set; } - - /// - /// The date when work on this Task is expected to complete. - /// - /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. - /// - public string PlannedFinishDate { get; set; } - - /// - /// If set, this is the actual date when work began on the Task. - /// - /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. - /// - public string ActualStartDate { get; set; } - - /// - /// If set, this is the actual date when work was completed on this Task. - /// - /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. - /// - public string ActualFinishDate { get; set; } - - /// - /// The timestamp in UTC when this Task was most recently modified. - /// - public DateTime? ModifyDate { get; set; } - - /// - /// The timestamp in UTC when this Task was created. - /// - public DateTime? CreateDate { get; set; } - - /// - /// The numerical percentage, from 0-100, representing the percentage completion - /// for this Task. Any numbers below zero or above 100 will be clamped to the - /// minimum or maximum value. - /// - /// This value can be edited manually in the Gantt chart view of the application, - /// or can be selected on the Task Detail page within the Kanban board. - /// - public int? PercentComplete { get; set; } - - /// - /// True if this Task is the parent of multiple Tasks underneath it. A parent Task - /// is a "rolled-up" view of multiple children that allows you to view a section of - /// work at a glance. - /// - /// You can create a summary Task in the Gantt chart view of the application by - /// adding child tasks underneath a parent Task. - /// - public bool? IsSummary { get; set; } - - /// - /// The WBS (Work Breakdown Structure) number for this task within the Gantt chart hierarchy. See [What - /// Is a Work Breakdown Structure (WBS)?](https://www.projectmanager.com/guides/work-breakdown-structure) - /// on Project Manager for more information. The WBS number is an outline number in the form `#.#.#.#` - /// which indicates how tasks are organized and sorted. - /// - /// The WBS value is only available to users at certain edition levels. This value can only be changed - /// if you are a Project Editor. - /// - public string Wbs { get; set; } - - /// - /// The actual cost of this Task to date, if known. - /// - public decimal? ActualCost { get; set; } - - /// - /// The planned cost for this Task. Cannot be negative. - /// - public decimal? PlannedCost { get; set; } - - /// - /// Task fields array with values - /// - public object Fields { get; set; } - } -} diff --git a/src/Models/TaskDto.cs b/src/Models/TaskDto.cs index ee7465e..1de717f 100644 --- a/src/Models/TaskDto.cs +++ b/src/Models/TaskDto.cs @@ -221,6 +221,6 @@ public class TaskDto : ApiModel /// /// Task fields array with values /// - public TaskFieldDto[] Fields { get; set; } + public TaskFieldValueDto[] Fields { get; set; } } } diff --git a/src/Models/TaskFieldDto.cs b/src/Models/TaskFieldDto.cs index fbf50f5..9b24861 100644 --- a/src/Models/TaskFieldDto.cs +++ b/src/Models/TaskFieldDto.cs @@ -21,19 +21,69 @@ namespace ProjectManager.SDK.Models { /// - /// A model that contains the value for a TaskField. + /// A TaskField is a custom field defined within your Workspace for a specific Project. You can + /// define TaskFields for any integration purpose that is important to your business. Each + /// TaskField has a data type as well as options in how it is handled. TaskFields can be edited + /// for each Task inside this Project. /// public class TaskFieldDto : ApiModel { /// - /// The unique Short Id of this TaskField. + /// The unique identifier of this TaskField + /// + public Guid? Id { get; set; } + + /// + /// The name of this TaskField + /// + public string Name { get; set; } + + /// + /// The type of this TaskField. Valid types are the following: + /// * Text + /// * Number + /// * Date + /// * Checkbox + /// * Currency + /// * Dropdown + /// + /// Attempting to create a field with any Type other than these will + /// return an error. + /// + /// For Dropdown TaskFields, specify the list of choices in the `Options` + /// field. + /// + public string Type { get; set; } + + /// + /// A list of options for use of this TaskField. This is only valid if + /// the `Type` value is set to `Dropdown`. + /// + /// When a custom TaskField of type `DropDown` is shown to a user in the + /// application, they will be able to choose one of the `Options` in this + /// list. + /// + public string[] Options { get; set; } + + /// + /// The short Id of this TaskField - human readable identity /// public string ShortId { get; set; } /// - /// The value currently set for this TaskField for this Task. + /// The Project to which this TaskField belongs. + /// + public TaskFieldProjectDto Project { get; set; } + + /// + /// Date and time (in UTC) that this TaskField was created. + /// + public DateTime? CreatedDate { get; set; } + + /// + /// Date and time (in UTC) that this TaskField was last modified. /// - public string Value { get; set; } + public DateTime? ModifiedDate { get; set; } } } diff --git a/src/Models/DeleteProjectFieldDto.cs b/src/Models/TaskFieldProjectDto.cs similarity index 58% rename from src/Models/DeleteProjectFieldDto.cs rename to src/Models/TaskFieldProjectDto.cs index 8813d6e..3f25d3e 100644 --- a/src/Models/DeleteProjectFieldDto.cs +++ b/src/Models/TaskFieldProjectDto.cs @@ -21,21 +21,23 @@ namespace ProjectManager.SDK.Models { /// - /// A ProjectField is a custom field defined within your Workspace. You can define ProjectFields - /// for any integration purpose that is important to your business. Each ProjectField has a data - /// type as well as options in how it is handled. ProjectFields can be edited for each Project - /// within your Workspace. + /// The TaskFieldProject is a summary of the Project that this TaskField relates to. /// - public class DeleteProjectFieldDto : ApiModel + public class TaskFieldProjectDto : ApiModel { /// - /// The unique identifier of the ProjectField being deleted + /// The unique identifier of this Project. /// public Guid? Id { get; set; } /// - /// The name of the ProjectField being deleted + /// The ShortId of this Project. + /// + public string ShortId { get; set; } + + /// + /// The common name of this Project. /// public string Name { get; set; } } diff --git a/src/Models/TaskFieldsValueResponseDto.cs b/src/Models/TaskFieldValueDto.cs similarity index 52% rename from src/Models/TaskFieldsValueResponseDto.cs rename to src/Models/TaskFieldValueDto.cs index 4eac165..d7ce980 100644 --- a/src/Models/TaskFieldsValueResponseDto.cs +++ b/src/Models/TaskFieldValueDto.cs @@ -21,12 +21,9 @@ namespace ProjectManager.SDK.Models { /// - /// A TaskField is a custom field defined within your Workspace for a specific Project. You can - /// define TaskFields for any integration purpose that is important to your business. Each - /// TaskField has a data type as well as options in how it is handled. TaskFields can be edited - /// for each Task inside this Project. + /// A model that contains the value for a TaskField. /// - public class TaskFieldsValueResponseDto : ApiModel + public class TaskFieldValueDto : ApiModel { /// @@ -35,24 +32,28 @@ public class TaskFieldsValueResponseDto : ApiModel public Guid? Id { get; set; } /// - /// The value currently set for this TaskField for this Task. + /// The unique Short Id of this TaskField. + /// + public string ShortId { get; set; } + + /// + /// The value currently set for this TaskFieldValue. /// public string Value { get; set; } /// - /// The name of this TaskField. + /// Date and time (in UTC) that this TaskField was created. + /// + public DateTime? CreatedDate { get; set; } + + /// + /// Date and time (in UTC) that this TaskField was last modified. /// - public string Name { get; set; } + public DateTime? ModifiedDate { get; set; } /// - /// The type of this TaskField. Valid types are the following: - /// * Text - /// * Number - /// * Date - /// * Checkbox - /// * Currency - /// * Dropdown + /// The Task to which this Value belongs. /// - public string Type { get; set; } + public TaskFieldValueTaskDto Task { get; set; } } } diff --git a/src/Models/CreateTaskFieldRequestDto.cs b/src/Models/TaskFieldValueTaskDto.cs similarity index 50% rename from src/Models/CreateTaskFieldRequestDto.cs rename to src/Models/TaskFieldValueTaskDto.cs index efb8080..181e89b 100644 --- a/src/Models/CreateTaskFieldRequestDto.cs +++ b/src/Models/TaskFieldValueTaskDto.cs @@ -21,33 +21,24 @@ namespace ProjectManager.SDK.Models { /// - /// A TaskField is a custom field defined within your Workspace for a specific Project. You can - /// define TaskFields for any integration purpose that is important to your business. Each - /// TaskField has a data type as well as options in how it is handled. TaskFields can be edited - /// for each Task inside this Project. + /// The TaskFieldTask is a summary of the Task that this TaskFieldValue relates to. /// - public class CreateTaskFieldRequestDto : ApiModel + public class TaskFieldValueTaskDto : ApiModel { /// - /// The name of the TaskField + /// The unique identifier of this Task. /// - public string Name { get; set; } + public Guid? Id { get; set; } /// - /// The type of this TaskField. Valid types are the following: - /// * Text - /// * Number - /// * Date - /// * Checkbox - /// * Currency - /// * Dropdown + /// The unique Short Id of this Task. /// - public string Type { get; set; } + public string ShortId { get; set; } /// - /// The short Id of this field - human readable identity + /// The common name of this Task. /// - public string ShortId { get; set; } + public string Name { get; set; } } } diff --git a/src/Models/TimesheetDto.cs b/src/Models/TimesheetDto.cs index 2296219..3af0be9 100644 --- a/src/Models/TimesheetDto.cs +++ b/src/Models/TimesheetDto.cs @@ -70,5 +70,10 @@ public class TimesheetDto : ApiModel /// The resource associated with this timesheet entry /// public TimesheetResourceDto Resource { get; set; } + + /// + /// The administration type associated with this timesheet entry + /// + public TimesheetAdminTypeDto AdminType { get; set; } } } diff --git a/src/Models/WorkSpaceLinksDto.cs b/src/Models/WorkSpaceLinksDto.cs index 4c8b4fc..449784f 100644 --- a/src/Models/WorkSpaceLinksDto.cs +++ b/src/Models/WorkSpaceLinksDto.cs @@ -21,18 +21,18 @@ namespace ProjectManager.SDK.Models { /// - /// TODO - What is this? + /// A shortcut link within the currently logged in Workspace. /// public class WorkSpaceLinksDto : ApiModel { /// - /// TODO - What is this? + /// The name of the project for this link. /// public string Project { get; set; } /// - /// This is the link to the api for this business, some legacy endpoints may need this. + /// This is the link to the api for this business. Some endpoints may need this value. /// public string WorkSpaceApi { get; set; } } diff --git a/src/Models/WorkSpaceUserInfoDto.cs b/src/Models/WorkSpaceUserInfoDto.cs index 2fe25fb..b5cb211 100644 --- a/src/Models/WorkSpaceUserInfoDto.cs +++ b/src/Models/WorkSpaceUserInfoDto.cs @@ -21,34 +21,52 @@ namespace ProjectManager.SDK.Models { /// - /// TODO - What is this? + /// Information about a currently logged in user. + /// + /// You can call the RetrieveMe API to gather information about the current user. /// public class WorkSpaceUserInfoDto : ApiModel { /// - /// TODO - What is this? + /// A collection of shortcut links for the currently logged in Workspace. /// public WorkSpaceLinksDto Links { get; set; } /// - /// TODO - What is this? + /// The email address of the currently logged in user. /// public string EmailAddress { get; set; } /// - /// TODO - What is this? + /// The unique identity of the currently logged in user. /// public Guid? Id { get; set; } /// - /// TODO - What is this? + /// The full name of the currently logged in user. /// public string FullName { get; set; } /// - /// TODO - What is this? + /// The name of the Workspace that the current user has logged onto. For most companies, the workspace + /// name will be the name of the business. /// public string WorkSpaceName { get; set; } + + /// + /// The user's role within the current Workspace. + /// + public string RoleName { get; set; } + + /// + /// True if this user is considered a global administrator of the current Workspace. + /// + public bool? IsGlobalAdmin { get; set; } + + /// + /// True if this user is considered an account administrator of the current Workspace. + /// + public bool? IsAccountAdministrator { get; set; } } } diff --git a/src/ProjectManagerClient.cs b/src/ProjectManagerClient.cs index 93594d5..5aea105 100644 --- a/src/ProjectManagerClient.cs +++ b/src/ProjectManagerClient.cs @@ -9,7 +9,7 @@ * @author ProjectManager.com * * @copyright 2023-2023 ProjectManager.com, Inc. - * @version 98.0.2363 + * @version 99.0.2548 * @link https://github.com/projectmgr/projectmanager-sdk-csharp */ @@ -39,7 +39,7 @@ public class ProjectManagerClient : IProjectManagerClient /// /// The version of the SDK /// - public const string SdkVersion = "98.0.2363"; + public const string SdkVersion = "99.0.2548"; private readonly string _apiUrl; private readonly HttpClient _client; @@ -204,6 +204,11 @@ public class ProjectManagerClient : IProjectManagerClient /// public ITaskTagClient TaskTag { get; } + /// + /// API methods related to Teams + /// + public ITeamsClient Teams { get; } + /// /// API methods related to Timesheet /// @@ -267,6 +272,7 @@ private ProjectManagerClient(string url, HttpClientHandler clientHandler) TaskFile = new TaskFileClient(this); TaskStatus = new TaskStatusClient(this); TaskTag = new TaskTagClient(this); + Teams = new TeamsClient(this); Timesheet = new TimesheetClient(this); UserRole = new UserRoleClient(this); WorkSpace = new WorkSpaceClient(this);