UNPKG

testrail-modern-client

Version:
34 lines (33 loc) 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StatusService = void 0; const base_1 = require("./base"); /** * Service for managing TestRail statuses. */ class StatusService extends base_1.BaseService { /** * Returns a list of available test case statuses. * @param offset - Where to start counting the statuses from (the offset) * @param limit - The number of statuses the response should return * @returns A list of case statuses * @throws {Error} 200 - Success (the available case statuses are returned as part of the response) * @since TestRail Enterprise 7.3 */ async listForCase(offset = 0, limit = 250) { const response = await this.client.get('/get_case_statuses', { params: { offset, limit }, }); return response.data.case_statuses; } /** * Returns a list of available test statuses. * @returns A list of all system and custom statuses * @throws {Error} 200 - Success (the available statuses are returned as part of the response) */ async list() { const response = await this.client.get('/get_statuses'); return response.data; } } exports.StatusService = StatusService;