"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DonorService = void 0; const request_1 = require("../core/request"); class DonorService { /** * Get all * Lists all runners from all teams/orgs.
This includes the runner's group and distance ran. * @returns ResponseDonor * @throws ApiError */ static async donorControllerGetAll() { const result = await request_1.request({ method: 'GET', path: `/api/donors`, }); return result.body; } /** * Post * Create a new runner.
Please remeber to provide the runner's group's id. * @param requestBody CreateDonor * @returns ResponseDonor * @throws ApiError */ static async donorControllerPost(requestBody) { const result = await request_1.request({ method: 'POST', path: `/api/donors`, body: requestBody, }); return result.body; } /** * Get one * Lists all information about the runner whose id got provided. * @param id * @returns ResponseDonor * @throws ApiError */ static async donorControllerGetOne(id) { const result = await request_1.request({ method: 'GET', path: `/api/donors/${id}`, }); return result.body; } /** * Put * Update the runner whose id you provided.
Please remember that ids can't be changed. * @param id * @param requestBody UpdateDonor * @returns ResponseDonor * @throws ApiError */ static async donorControllerPut(id, requestBody) { const result = await request_1.request({ method: 'PUT', path: `/api/donors/${id}`, body: requestBody, }); return result.body; } /** * Remove * Delete the runner whose id you provided.
If no runner with this id exists it will just return 204(no content). * @param id * @param force * @returns ResponseDonor * @returns ResponseEmpty * @throws ApiError */ static async donorControllerRemove(id, force) { const result = await request_1.request({ method: 'DELETE', path: `/api/donors/${id}`, query: { 'force': force, }, }); return result.body; } } exports.DonorService = DonorService;