UNPKG

testrail-modern-client

Version:
31 lines (30 loc) 943 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CaseFieldService = void 0; const base_1 = require("./base"); /** * Service for managing test case custom fields in TestRail */ class CaseFieldService extends base_1.BaseService { /** * Returns a list of available test case custom fields * @returns List of case fields * @throws {Error} 403 - No access */ async list() { const response = await this.client.get('/get_case_fields'); return response.data; } /** * Creates a new test case custom field * @param field - The field to create * @returns The created field * @throws {Error} 400 - Invalid field data * @throws {Error} 403 - No access */ async add(field) { const response = await this.client.post('/add_case_field', field); return response.data; } } exports.CaseFieldService = CaseFieldService;