"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RunnerCardService = void 0; const request_1 = require("../core/request"); class RunnerCardService { /** * Get all * Lists all card. * @result ResponseRunnerCard * @throws ApiError */ static async runnerCardControllerGetAll() { const result = await (0, request_1.request)({ method: 'GET', path: `/api/cards`, }); return result.body; } /** * Post * Create a new card.
You can provide a associated runner by id but you don't have to. * @param requestBody CreateRunnerCard * @result ResponseRunnerCard * @throws ApiError */ static async runnerCardControllerPost(requestBody) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/cards`, body: requestBody, }); return result.body; } /** * Get one * Lists all information about the card whose id got provided. * @param id * @result ResponseRunnerCard * @throws ApiError */ static async runnerCardControllerGetOne(id) { const result = await (0, request_1.request)({ method: 'GET', path: `/api/cards/${id}`, }); return result.body; } /** * Put * Update the card whose id you provided.
Scans created via this card will still be associated with the old runner.
Please remember that ids can't be changed. * @param id * @param requestBody UpdateRunnerCard * @result ResponseRunnerCard * @throws ApiError */ static async runnerCardControllerPut(id, requestBody) { const result = await (0, request_1.request)({ method: 'PUT', path: `/api/cards/${id}`, body: requestBody, }); return result.body; } /** * Remove * Delete the card whose id you provided.
If no card with this id exists it will just return 204(no content).
If the card still has scans associated you have to provide the force=true query param (warning: this deletes all scans associated with by this card - please disable it instead or just remove the runner association). * @param id * @param force * @result ResponseRunnerCard * @result ResponseEmpty * @throws ApiError */ static async runnerCardControllerRemove(id, force) { const result = await (0, request_1.request)({ method: 'DELETE', path: `/api/cards/${id}`, query: { 'force': force, }, }); return result.body; } /** * Post blanco bulk * Create blank cards in bulk.
Just provide the count as a query param and wait for the 200 response.
You can provide the 'returnCards' query param if you want to receive the RESPONSERUNNERCARD objects in the response. * @param count * @param returnCards * @result ResponseEmpty * @throws ApiError */ static async runnerCardControllerPostBlancoBulk(count, returnCards) { const result = await (0, request_1.request)({ method: 'POST', path: `/api/cards/bulk`, query: { 'count': count, 'returnCards': returnCards, }, }); return result.body; } } exports.RunnerCardService = RunnerCardService;