angles-javascript-client
Version:
This is the javascript client for the Angles Dashboard. It allows you to store your test results.
64 lines • 2.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TeamRequests = void 0;
const BaseRequests_1 = require("./BaseRequests");
class TeamRequests extends BaseRequests_1.BaseRequests {
constructor(axiosInstance) {
super(axiosInstance);
}
/**
* Will create a team based on the details provided.
*
* @param {CreateTeam} request - contains the details for the team you want to create.
*/
createTeam(request) {
return this.post(`team`, request);
}
/**
* Retrieves all the available teams.
*/
getTeams() {
return this.get(`team`);
}
/**
* Retrieves a specific team based on teh id.
* @param {string} teamId - id of the team you want to retrieve.
*/
getTeam(teamId) {
return this.get(`team/${teamId}`);
}
/**
* Before calling this function please make sure you clear all the builds using the
* delete builds method (e.g. with age 0). That will delete all builds, executions and screenshots.
*
* @param {string} teamId - id of the team you want to delete.
*/
deleteTeam(teamId) {
return this.delete(`team/${teamId}`);
}
/**
* This function allows you to update the team name.
*
* @param {string} teamId - id of the team you want to update
* @param {string} name - new name you want to set for the team
*/
updateTeam(teamId, name) {
return this.put(`team/${teamId}`, {
name,
});
}
/**
* Components allow you to "group" your test coverage by area of functionality/application.
* This function allows you to add components to your team.
*
* @param {string} teamId - id of the team you want to add components to.
* @param {string[]} components - list of components you want to add.
*/
addComponentsToTeam(teamId, components) {
return this.put(`team/${teamId}`, {
components,
});
}
}
exports.TeamRequests = TeamRequests;
//# sourceMappingURL=TeamRequests.js.map