UNPKG

projectmanager-sdk

Version:

Software development kit for the ProjectManager.com API. for TypeScript

77 lines 2.79 kB
/** * 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 ResourceSkillClient { client; /** * Internal constructor for this client library */ constructor(client) { this.client = client; } /** * Retrieves all ResourceSkills defined within your Workspace. * * A ResourceSkill is a capability possessed by a Resource that can be used to distinguish * different classes of Resources suitable for use by a Task. You can specify that a Task * requires a Resource with a particular set of ResourceSkills and then allocate Resources * based on whether or not they have the suitable ResourceSkills. * * @param top The number of records to return * @param skip Skips the given number of records and then returns $top records * @param filter Filter the expression according to oData queries * @param orderby Order collection by this field. * @param expand Include related data in the response */ retrieveResourceSkills(top, skip, filter, orderby, expand) { const url = `/api/data/resources/skills`; const options = { params: { '$top': top, '$skip': skip, '$filter': filter, '$orderby': orderby, '$expand': expand, }, }; return this.client.request("get", url, options, null); } /** * Create a Resource Skill. * * @param body The name of the skill to create. */ createResourceSkill(body) { const url = `/api/data/resources/skills`; return this.client.request("post", url, null, body); } /** * Update a Resource Skill. * * @param skillId The id of the skill to update. * @param body The data of the skill to update. */ updateResourceSkill(skillId, body) { const url = `/api/data/resources/skills/${skillId}`; return this.client.request("put", url, null, body); } /** * The endpoint is used to delete a resource skill. Users assigned to this skill will no longer be assigned thereafter. * * @param resourceSkillId The Id of the skill to be removed. */ deleteResourceSkill(resourceSkillId) { const url = `/api/data/resources/skills/${resourceSkillId}`; return this.client.request("delete", url, null, null); } } //# sourceMappingURL=ResourceSkillClient.js.map