diff --git a/pom.xml b/pom.xml index fb87d7c..2f3bf8e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.projectmanager projectmanagersdk - 115.0.4328 + 117.0.4438 ProjectManagerSDK Software development kit for the ProjectManager.com API. for Java diff --git a/src/main/java/com/projectmanager/BlobRequest.java b/src/main/java/com/projectmanager/BlobRequest.java index 0b5ed50..fd2ac0f 100644 --- a/src/main/java/com/projectmanager/BlobRequest.java +++ b/src/main/java/com/projectmanager/BlobRequest.java @@ -148,7 +148,7 @@ public void AddBody(Object body) { } request.addHeader("SdkName", "Java"); - request.addHeader("SdkVersion", "115.0.4328.0"); + request.addHeader("SdkVersion", "117.0.4438.0"); String applicationName = this.client.getAppName(); diff --git a/src/main/java/com/projectmanager/ProjectManagerClient.java b/src/main/java/com/projectmanager/ProjectManagerClient.java index 7fe09a9..cf6838a 100644 --- a/src/main/java/com/projectmanager/ProjectManagerClient.java +++ b/src/main/java/com/projectmanager/ProjectManagerClient.java @@ -9,7 +9,7 @@ * @author ProjectManager.com * * @copyright 2023-2024 ProjectManager.com, Inc. - * @version 115.0.4328 + * @version 117.0.4438 * @link https://github.com/projectmgr/projectmanager-sdk-java */ diff --git a/src/main/java/com/projectmanager/RestRequest.java b/src/main/java/com/projectmanager/RestRequest.java index a17dd84..2aa8c4d 100644 --- a/src/main/java/com/projectmanager/RestRequest.java +++ b/src/main/java/com/projectmanager/RestRequest.java @@ -148,7 +148,7 @@ public void AddBody(Object body) { } request.addHeader("SdkName", "Java"); - request.addHeader("SdkVersion", "115.0.4328.0"); + request.addHeader("SdkVersion", "117.0.4438.0"); String applicationName = this.client.getAppName(); diff --git a/src/main/java/com/projectmanager/clients/HomeFileClient.java b/src/main/java/com/projectmanager/clients/HomeFileClient.java index f5376f0..7372fbb 100644 --- a/src/main/java/com/projectmanager/clients/HomeFileClient.java +++ b/src/main/java/com/projectmanager/clients/HomeFileClient.java @@ -55,10 +55,10 @@ public HomeFileClient(@NotNull ProjectManagerClient client) { * * This API returns a JSON response indicating success or failure. * - * @param filename The full path of a file to upload to the API + * @param fileName The full path of a file to upload to the API * @return A {@link com.projectmanager.AstroResult} containing the results */ - public @NotNull AstroResult uploadHomeFile(@NotNull byte[] filename) + public @NotNull AstroResult uploadHomeFile(@NotNull byte[] fileName) { RestRequest r = new RestRequest(this.client, "POST", "/api/data/home/files"); return r.Call(new TypeToken>() {}.getType()); @@ -80,10 +80,10 @@ public HomeFileClient(@NotNull ProjectManagerClient client) { * This API returns a JSON response indicating success or failure. * * @param folderId The reference to the sub folder to put the file into - * @param filename The full path of a file to upload to the API + * @param fileName The full path of a file to upload to the API * @return A {@link com.projectmanager.AstroResult} containing the results */ - public @NotNull AstroResult uploadHomeFileToFolder(@NotNull String folderId, @NotNull byte[] filename) + public @NotNull AstroResult uploadHomeFileToFolder(@NotNull String folderId, @NotNull byte[] fileName) { RestRequest r = new RestRequest(this.client, "POST", "/api/data/home/folders/{folderId}/files"); r.AddPath("{folderId}", folderId == null ? "" : folderId.toString()); diff --git a/src/main/java/com/projectmanager/clients/NptFilesClient.java b/src/main/java/com/projectmanager/clients/NptFilesClient.java index 8f029c6..190f95d 100644 --- a/src/main/java/com/projectmanager/clients/NptFilesClient.java +++ b/src/main/java/com/projectmanager/clients/NptFilesClient.java @@ -56,10 +56,10 @@ public NptFilesClient(@NotNull ProjectManagerClient client) { * This API returns a JSON response indicating success or failure. * * @param taskId The reference to the task - * @param filename The full path of a file to upload to the API + * @param fileName The full path of a file to upload to the API * @return A {@link com.projectmanager.AstroResult} containing the results */ - public @NotNull AstroResult uploadFileToNonProjectTasks(@NotNull String taskId, @NotNull byte[] filename) + public @NotNull AstroResult uploadFileToNonProjectTasks(@NotNull String taskId, @NotNull byte[] fileName) { RestRequest r = new RestRequest(this.client, "POST", "/api/data/non-project-tasks/{taskId}/files"); r.AddPath("{taskId}", taskId == null ? "" : taskId.toString()); diff --git a/src/main/java/com/projectmanager/clients/ProjectFileClient.java b/src/main/java/com/projectmanager/clients/ProjectFileClient.java index 4a42cb1..3f5a660 100644 --- a/src/main/java/com/projectmanager/clients/ProjectFileClient.java +++ b/src/main/java/com/projectmanager/clients/ProjectFileClient.java @@ -56,10 +56,10 @@ public ProjectFileClient(@NotNull ProjectManagerClient client) { * This API returns a JSON response indicating success or failure. * * @param projectId The reference to the project - * @param filename The full path of a file to upload to the API + * @param fileName The full path of a file to upload to the API * @return A {@link com.projectmanager.AstroResult} containing the results */ - public @NotNull AstroResult uploadProjectFile(@NotNull String projectId, @NotNull byte[] filename) + public @NotNull AstroResult uploadProjectFile(@NotNull String projectId, @NotNull byte[] fileName) { RestRequest r = new RestRequest(this.client, "POST", "/api/data/projects/{projectId}/files"); r.AddPath("{projectId}", projectId == null ? "" : projectId.toString()); @@ -83,10 +83,10 @@ public ProjectFileClient(@NotNull ProjectManagerClient client) { * * @param projectId The reference to the project * @param folderId The reference to the sub folder to put the file into - * @param filename The full path of a file to upload to the API + * @param fileName The full path of a file to upload to the API * @return A {@link com.projectmanager.AstroResult} containing the results */ - public @NotNull AstroResult uploadProjectFileToFolder(@NotNull String projectId, @NotNull String folderId, @NotNull byte[] filename) + public @NotNull AstroResult uploadProjectFileToFolder(@NotNull String projectId, @NotNull String folderId, @NotNull byte[] fileName) { RestRequest r = new RestRequest(this.client, "POST", "/api/data/projects/{projectId}/folders/{folderId}/files"); r.AddPath("{projectId}", projectId == null ? "" : projectId.toString()); diff --git a/src/main/java/com/projectmanager/clients/ResourceClient.java b/src/main/java/com/projectmanager/clients/ResourceClient.java index 5971de8..e4bf98f 100644 --- a/src/main/java/com/projectmanager/clients/ResourceClient.java +++ b/src/main/java/com/projectmanager/clients/ResourceClient.java @@ -150,4 +150,21 @@ public ResourceClient(@NotNull ProjectManagerClient client) { if (body != null) { r.AddBody(body); } return r.Call(new TypeToken>() {}.getType()); } + + /** + * Resend Invite Email to a Resource within your Workspace. + * + * When you create a Resource that is a person, ProjectManager sends that person an email inviting them to join + * your Workspace. If that email is accidentally deleted or sent to a spam folder, you can request this email + * be sent again using this API. + * + * @param resourceId The unique identifier of the Resource to send an invitation email + * @return A {@link com.projectmanager.AstroResult} containing the results + */ + public @NotNull AstroResult resendInviteEmail(@NotNull String resourceId) + { + RestRequest r = new RestRequest(this.client, "GET", "/api/data/resources/{resourceId}/resendinvite"); + r.AddPath("{resourceId}", resourceId == null ? "" : resourceId.toString()); + return r.Call(new TypeToken>() {}.getType()); + } } diff --git a/src/main/java/com/projectmanager/clients/TaskFileClient.java b/src/main/java/com/projectmanager/clients/TaskFileClient.java index da431df..30cfefd 100644 --- a/src/main/java/com/projectmanager/clients/TaskFileClient.java +++ b/src/main/java/com/projectmanager/clients/TaskFileClient.java @@ -56,10 +56,10 @@ public TaskFileClient(@NotNull ProjectManagerClient client) { * This API returns a JSON response indicating success or failure. * * @param taskId The reference to the task - * @param filename The full path of a file to upload to the API + * @param fileName The full path of a file to upload to the API * @return A {@link com.projectmanager.AstroResult} containing the results */ - public @NotNull AstroResult uploadTaskFile(@NotNull String taskId, @NotNull byte[] filename) + public @NotNull AstroResult uploadTaskFile(@NotNull String taskId, @NotNull byte[] fileName) { RestRequest r = new RestRequest(this.client, "POST", "/api/data/tasks/{taskId}/files"); r.AddPath("{taskId}", taskId == null ? "" : taskId.toString()); diff --git a/src/main/java/com/projectmanager/models/ResourceCreateDto.java b/src/main/java/com/projectmanager/models/ResourceCreateDto.java index ba335bd..d44b2ed 100644 --- a/src/main/java/com/projectmanager/models/ResourceCreateDto.java +++ b/src/main/java/com/projectmanager/models/ResourceCreateDto.java @@ -39,6 +39,7 @@ public class ResourceCreateDto private @Nullable String roleId; private @Nullable String[] teamIds; private @Nullable String[] skillIds; + private @Nullable String colorName; /** * The first name of the person Resource. @@ -202,4 +203,20 @@ public class ResourceCreateDto * @param value The new value for skillIds */ public void setSkillIds(@Nullable String[] value) { this.skillIds = value; } + /** + * Collaboration Color for this resource. + * + * eg. teal, cyan, lightblue, blurple, purple, pink, orange, gray + * + * @return The field colorName + */ + public @Nullable String getColorName() { return this.colorName; } + /** + * Collaboration Color for this resource. + * + * eg. teal, cyan, lightblue, blurple, purple, pink, orange, gray + * + * @param value The new value for colorName + */ + public void setColorName(@Nullable String value) { this.colorName = value; } }; diff --git a/src/main/java/com/projectmanager/models/ResourceDto.java b/src/main/java/com/projectmanager/models/ResourceDto.java index 199f34b..114a1de 100644 --- a/src/main/java/com/projectmanager/models/ResourceDto.java +++ b/src/main/java/com/projectmanager/models/ResourceDto.java @@ -47,6 +47,8 @@ public class ResourceDto private @NotNull String createdBy; private @NotNull String modifiedDate; private @NotNull String modifiedBy; + private @Nullable String colorName; + private @Nullable String color; /** * The unique identifier of this Resource. @@ -328,4 +330,32 @@ public class ResourceDto * @param value The new value for modifiedBy */ public void setModifiedBy(@NotNull String value) { this.modifiedBy = value; } + /** + * Collaboration Color for this resource. + * + * eg. teal, cyan, lightblue, blurple, purple, pink, orange, gray + * + * @return The field colorName + */ + public @Nullable String getColorName() { return this.colorName; } + /** + * Collaboration Color for this resource. + * + * eg. teal, cyan, lightblue, blurple, purple, pink, orange, gray + * + * @param value The new value for colorName + */ + public void setColorName(@Nullable String value) { this.colorName = value; } + /** + * Read only Hex code of the ColorName + * + * @return The field color + */ + public @Nullable String getColor() { return this.color; } + /** + * Read only Hex code of the ColorName + * + * @param value The new value for color + */ + public void setColor(@Nullable String value) { this.color = value; } }; diff --git a/src/main/java/com/projectmanager/models/ResourceUpdateDto.java b/src/main/java/com/projectmanager/models/ResourceUpdateDto.java index 1756766..5d0c4e9 100644 --- a/src/main/java/com/projectmanager/models/ResourceUpdateDto.java +++ b/src/main/java/com/projectmanager/models/ResourceUpdateDto.java @@ -41,6 +41,7 @@ public class ResourceUpdateDto private @Nullable String[] skillIds; private @Nullable Boolean isActive; private @Nullable String approverId; + private @Nullable String colorName; /** * The first name of the person Resource. @@ -236,4 +237,20 @@ public class ResourceUpdateDto * @param value The new value for approverId */ public void setApproverId(@Nullable String value) { this.approverId = value; } + /** + * Collaboration Color for this resource. + * + * eg. teal, cyan, lightblue, blurple, purple, pink, orange, gray + * + * @return The field colorName + */ + public @Nullable String getColorName() { return this.colorName; } + /** + * Collaboration Color for this resource. + * + * eg. teal, cyan, lightblue, blurple, purple, pink, orange, gray + * + * @param value The new value for colorName + */ + public void setColorName(@Nullable String value) { this.colorName = value; } }; diff --git a/src/main/java/com/projectmanager/models/TaskDto.java b/src/main/java/com/projectmanager/models/TaskDto.java index cb96b89..f89044f 100644 --- a/src/main/java/com/projectmanager/models/TaskDto.java +++ b/src/main/java/com/projectmanager/models/TaskDto.java @@ -44,7 +44,7 @@ public class TaskDto private @NotNull String createDate; private @NotNull Integer percentComplete; private @NotNull Boolean isSummary; - private @NotNull Integer priorityId; + private @Nullable Integer priorityId; private @Nullable String wbs; private @Nullable String color; private @Nullable String theme; @@ -392,13 +392,13 @@ public class TaskDto * * @return The field priorityId */ - public @NotNull Integer getPriorityId() { return this.priorityId; } + public @Nullable Integer getPriorityId() { return this.priorityId; } /** * Return the priority of a task * * @param value The new value for priorityId */ - public void setPriorityId(@NotNull Integer value) { this.priorityId = value; } + public void setPriorityId(@Nullable Integer value) { this.priorityId = value; } /** * 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) diff --git a/src/main/java/com/projectmanager/models/TaskPriorityDto.java b/src/main/java/com/projectmanager/models/TaskPriorityDto.java index 82217ec..a7a39fc 100644 --- a/src/main/java/com/projectmanager/models/TaskPriorityDto.java +++ b/src/main/java/com/projectmanager/models/TaskPriorityDto.java @@ -25,7 +25,7 @@ */ public class TaskPriorityDto { - private @NotNull Integer id; + private @Nullable Integer id; private @Nullable String name; /** @@ -33,13 +33,13 @@ public class TaskPriorityDto * * @return The field id */ - public @NotNull Integer getId() { return this.id; } + public @Nullable Integer getId() { return this.id; } /** * The unique identifier of this TaskPriority. * * @param value The new value for id */ - public void setId(@NotNull Integer value) { this.id = value; } + public void setId(@Nullable Integer value) { this.id = value; } /** * The name of this TaskPriority. * diff --git a/src/main/java/com/projectmanager/models/TimesheetDto.java b/src/main/java/com/projectmanager/models/TimesheetDto.java index 7c6c0bc..bb205b2 100644 --- a/src/main/java/com/projectmanager/models/TimesheetDto.java +++ b/src/main/java/com/projectmanager/models/TimesheetDto.java @@ -19,11 +19,17 @@ import org.jetbrains.annotations.Nullable; /** - * Created Time entry response data + * A Timesheet entry is a single record that contains information about time spent by a person on a task. Each + * Timesheet entry object contains information about one task/day/person combination. A fully completed Timesheet + * will often contain multiple records for the same date range which must be combined to produce a finished + * Timesheet. */ public class TimesheetDto { private @NotNull String id; + private @NotNull String resourceId; + private @NotNull String taskId; + private @NotNull String projectId; private @NotNull String date; private @Nullable String notes; private @NotNull Boolean approved; @@ -36,61 +42,105 @@ public class TimesheetDto private @Nullable TimesheetFileDto[] files; /** - * TimesheetId + * A unique identifier of a timesheet data entry * * @return The field id */ public @NotNull String getId() { return this.id; } /** - * TimesheetId + * A unique identifier of a timesheet data entry * * @param value The new value for id */ public void setId(@NotNull String value) { this.id = value; } /** - * Date of time entry + * The unique identifier of the resource who is preparing this Timesheet. You can filter on this value to measure + * the total work performed by this specific Resource. + * + * @return The field resourceId + */ + public @NotNull String getResourceId() { return this.resourceId; } + /** + * The unique identifier of the resource who is preparing this Timesheet. You can filter on this value to measure + * the total work performed by this specific Resource. + * + * @param value The new value for resourceId + */ + public void setResourceId(@NotNull String value) { this.resourceId = value; } + /** + * The unique identifier of the task worked on for this Timesheet. You can filter on this value to measure the + * total work performed against a specific Task. + * + * @return The field taskId + */ + public @NotNull String getTaskId() { return this.taskId; } + /** + * The unique identifier of the task worked on for this Timesheet. You can filter on this value to measure the + * total work performed against a specific Task. + * + * @param value The new value for taskId + */ + public void setTaskId(@NotNull String value) { this.taskId = value; } + /** + * The unique identifier of the project worked on for this Timesheet. You can filter on this value to measure the + * total work performed against a specific Project. + * + * @return The field projectId + */ + public @NotNull String getProjectId() { return this.projectId; } + /** + * The unique identifier of the project worked on for this Timesheet. You can filter on this value to measure the + * total work performed against a specific Project. + * + * @param value The new value for projectId + */ + public void setProjectId(@NotNull String value) { this.projectId = value; } + /** + * The date of this time entry record. You can filter on this value to obtain Timesheet data for a specific date + * range. * * @return The field date */ public @NotNull String getDate() { return this.date; } /** - * Date of time entry + * The date of this time entry record. You can filter on this value to obtain Timesheet data for a specific date + * range. * * @param value The new value for date */ public void setDate(@NotNull String value) { this.date = value; } /** - * Notes + * Notes associated with this Timesheet, if any * * @return The field notes */ public @Nullable String getNotes() { return this.notes; } /** - * Notes + * Notes associated with this Timesheet, if any * * @param value The new value for notes */ public void setNotes(@Nullable String value) { this.notes = value; } /** - * Shows if timesheet approved + * True if this Timesheet was approved by a person with the role of a Timesheet approver * * @return The field approved */ public @NotNull Boolean getApproved() { return this.approved; } /** - * Shows if timesheet approved + * True if this Timesheet was approved by a person with the role of a Timesheet approver * * @param value The new value for approved */ public void setApproved(@NotNull Boolean value) { this.approved = value; } /** - * Total Hours + * Total Hours spent on this Task by this Resource on this specific Date * * @return The field hours */ public @NotNull Double getHours() { return this.hours; } /** - * Total Hours + * Total Hours spent on this Task by this Resource on this specific Date * * @param value The new value for hours */ diff --git a/src/main/java/com/projectmanager/models/TimesheetTaskDto.java b/src/main/java/com/projectmanager/models/TimesheetTaskDto.java index fbb5828..7c5fd9e 100644 --- a/src/main/java/com/projectmanager/models/TimesheetTaskDto.java +++ b/src/main/java/com/projectmanager/models/TimesheetTaskDto.java @@ -38,7 +38,7 @@ public class TimesheetTaskDto private @NotNull String createDate; private @NotNull Integer percentComplete; private @NotNull Boolean isSummary; - private @NotNull Integer priorityId; + private @Nullable Integer priorityId; private @Nullable String wbs; private @Nullable String color; private @Nullable Double actualCost; @@ -311,13 +311,13 @@ public class TimesheetTaskDto * * @return The field priorityId */ - public @NotNull Integer getPriorityId() { return this.priorityId; } + public @Nullable Integer getPriorityId() { return this.priorityId; } /** * Return the priority of a task * * @param value The new value for priorityId */ - public void setPriorityId(@NotNull Integer value) { this.priorityId = value; } + public void setPriorityId(@Nullable Integer value) { this.priorityId = value; } /** * 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) diff --git a/src/main/java/com/projectmanager/models/UserError.java b/src/main/java/com/projectmanager/models/UserError.java index 7579ba1..176bb1b 100644 --- a/src/main/java/com/projectmanager/models/UserError.java +++ b/src/main/java/com/projectmanager/models/UserError.java @@ -22,6 +22,7 @@ public class UserError { private @Nullable String email; private @Nullable String reason; + private @NotNull String statusCode; /** * @@ -43,4 +44,14 @@ public class UserError * @param value The new value for reason */ public void setReason(@Nullable String value) { this.reason = value; } + /** + * + * @return The field statusCode + */ + public @NotNull String getStatusCode() { return this.statusCode; } + /** + * + * @param value The new value for statusCode + */ + public void setStatusCode(@NotNull String value) { this.statusCode = value; } };