projectmanager-sdk
Version:
Software development kit for the ProjectManager.com API. for TypeScript
62 lines • 2 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 RiskTagClient {
client;
/**
* Internal constructor for this client library
*/
constructor(client) {
this.client = client;
}
/**
* Replaces the existing tags on a Risk with a newly provided list.
* A tag is a connection between a Risk and a Tag. Each Risk can have zero, one or many tags.
*
* @param riskId The unique identifier of the Risk
* @param body The replacement list of tags for this Risk
*/
replaceRiskTags(riskId, body) {
const url = `/api/data/risks/${riskId}/tags`;
return this.client.request("post", url, null, body);
}
/**
* Add one or more tags to a Risk.
*
* @param riskId The unique identifier of the Risk
* @param body The tags to add
*/
addtagstoRisk(riskId, body) {
const url = `/api/data/risks/${riskId}/tags`;
return this.client.request("put", url, null, body);
}
/**
* Removes one or more tags from a Risk.
*
* @param riskId The unique identifier of the Risk
* @param body The tags to remove
*/
removetagsfromRisk(riskId, body) {
const url = `/api/data/risks/${riskId}/tags`;
return this.client.request("delete", url, null, body);
}
/**
* Returns the list of tags assigned to the specified Risk.
*
* @param riskId The unique identifier of the Risk
*/
retrievetagsforaRisk(riskId) {
const url = `/api/data/risks/${riskId}/tags`;
return this.client.request("get", url, null, null);
}
}
//# sourceMappingURL=RiskTagClient.js.map