UNPKG

angles-javascript-client

Version:

This is the javascript client for the Angles Dashboard. It allows you to store your test results.

46 lines (45 loc) 1.88 kB
import { AxiosInstance } from 'axios'; import { BaseRequests } from './BaseRequests'; import { Team } from '../models/Team'; import { CreateTeam } from '../models/requests/CreateTeam'; import { DefaultResponse } from '../models/response/DefaultResponse'; export declare class TeamRequests extends BaseRequests { constructor(axiosInstance: 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: CreateTeam): Promise<Team>; /** * Retrieves all the available teams. */ getTeams(): Promise<Team[]>; /** * Retrieves a specific team based on teh id. * @param {string} teamId - id of the team you want to retrieve. */ getTeam(teamId: string): Promise<Team>; /** * 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: string): Promise<DefaultResponse>; /** * 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: string, name: string): Promise<Team>; /** * 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: string, components: string[]): Promise<Team>; }