projectmanager-sdk
Version:
Software development kit for the ProjectManager.com API. for TypeScript
62 lines • 2.02 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 ProjectStatusClient {
client;
/**
* Internal constructor for this client library
*/
constructor(client) {
this.client = client;
}
/**
* Retrieves all ProjectStatuses defined within your Workspace.
*
* A ProjectStatus is a named condition used by your business to categorize the completion level
* of Tasks and Projects within your Workspace. You can name your ProjectStatus levels anything
* you like and you can reorganize the order of the ProjectPriority levels at any time.
*
*/
retrieveProjectStatuses() {
const url = `/api/data/projects/statuses`;
return this.client.request("get", url, null, null);
}
/**
* Create a project Status
*
* @param body The data to create the Status
*/
createProjectStatus(body) {
const url = `/api/data/projects/statuses`;
return this.client.request("post", url, null, body);
}
/**
* Update a project Status
*
* @param projectStatusId The status Id
* @param body The data to create the Status
*/
updateProjectStatus(projectStatusId, body) {
const url = `/api/data/projects/statuses/${projectStatusId}`;
return this.client.request("put", url, null, body);
}
/**
* Delete a project Status
*
* @param projectStatusId The status Id
*/
deleteProjectStatus(projectStatusId) {
const url = `/api/data/projects/statuses/${projectStatusId}`;
return this.client.request("delete", url, null, null);
}
}
//# sourceMappingURL=ProjectStatusClient.js.map