projectmanager-sdk
Version:
Software development kit for the ProjectManager.com API. for TypeScript
65 lines • 2.32 kB
JavaScript
/**
* ProjectManager API for TypeScript
*
* (c) 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 <support@projectmanager.com>
* @copyright ProjectManager.com, Inc.
* @link https://github.com/projectmgr/projectmanager-sdk-typescript
*/
export class ProjectPriorityClient {
client;
/**
* Internal constructor for this client library
*/
constructor(client) {
this.client = client;
}
/**
* Retrieves all ProjectPriorities defined within your Workspace.
*
* A ProjectPriority is a named priority level used by your business to determine how to decide
* which Projects are the most important. You can name your ProjectPriority levels anything you like
* and you can reorganize the order of the ProjectPriority levels at any time.
*
* Note that TaskPriority and ProjectPriority are different classes of priority levels. Even
* if they may have similar names, they are different objects and must be tracked separately.
*
*/
retrieveProjectPriorities() {
const url = `/api/data/projects/priorities`;
return this.client.request("get", url, null, null);
}
/**
* Create a project priority
*
* @param body The data to create the priority
*/
createProjectPriority(body) {
const url = `/api/data/projects/priorities`;
return this.client.request("post", url, null, body);
}
/**
* Updates a project priority
*
* @param priorityId The id of the priority to update
* @param body The data to update
*/
updateProjectPriority(priorityId, body) {
const url = `/api/data/projects/priorities/${priorityId}`;
return this.client.request("put", url, null, body);
}
/**
* Delete a project priority. They will also be removed from any projects they were assigned too.
*
* @param priorityId The id of the priority to remove
*/
deleteProjectPriority(priorityId) {
const url = `/api/data/projects/priorities/${priorityId}`;
return this.client.request("delete", url, null, null);
}
}
//# sourceMappingURL=ProjectPriorityClient.js.map