"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ImportService = void 0; const request_1 = require("../core/request"); class ImportService { /** * Post json * Create new runners from json and insert them into the provided group.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead. * @param group * @param requestBody ImportRunner * @result ResponseRunner * @throws ApiError */ static async importControllerPostJson(group, requestBody) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/runners/import`, query: { 'group': group, }, body: requestBody, }); return result.body; } /** * Post orgs json * Create new runners from json and insert them into the provided org.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead. * @param id * @param requestBody ImportRunner * @result ResponseRunner * @throws ApiError */ static async importControllerPostOrgsJson(id, requestBody) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/organizations/${id}/import`, body: requestBody, }); return result.body; } /** * Post teams json * Create new runners from json and insert them into the provided team * @param id * @param requestBody ImportRunner * @result ResponseRunner * @throws ApiError */ static async importControllerPostTeamsJson(id, requestBody) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/teams/${id}/import`, body: requestBody, }); return result.body; } /** * Post csv * Create new runners from csv and insert them into the provided group.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead. * @param group * @result ResponseRunner * @throws ApiError */ static async importControllerPostCsv(group) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/runners/import/csv`, query: { 'group': group, }, }); return result.body; } /** * Post orgs csv * Create new runners from csv and insert them into the provided org.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead. * @param id * @result ResponseRunner * @throws ApiError */ static async importControllerPostOrgsCsv(id) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/organizations/${id}/import/csv`, }); return result.body; } /** * Post teams csv * Create new runners from csv and insert them into the provided team * @param id * @result ResponseRunner * @throws ApiError */ static async importControllerPostTeamsCsv(id) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/teams/${id}/import/csv`, }); return result.body; } } exports.ImportService = ImportService;