"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScanStationService = void 0;
const request_1 = require("../core/request");
class ScanStationService {
/**
* Get all
* Lists all stations.
This includes their associated tracks.
* @returns ResponseScanStation
* @throws ApiError
*/
static async scanStationControllerGetAll() {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/stations`,
});
return result.body;
}
/**
* Post
* Create a new station.
Please remeber to provide the station's track's id.
Please also remember that the station key is only visibe on creation.
* @param requestBody CreateScanStation
* @returns ResponseScanStation
* @throws ApiError
*/
static async scanStationControllerPost(requestBody) {
const result = await (0, request_1.request)({
method: 'POST',
path: `/api/stations`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Lists all information about the station whose id got provided.
This includes it's associated track.
* @param id
* @returns ResponseScanStation
* @throws ApiError
*/
static async scanStationControllerGetOne(id) {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/stations/${id}`,
});
return result.body;
}
/**
* Put
* Update the station whose id you provided.
Please remember that only the description and enabled state can be changed.
* @param id
* @param requestBody UpdateScanStation
* @returns ResponseScanStation
* @throws ApiError
*/
static async scanStationControllerPut(id, requestBody) {
const result = await (0, request_1.request)({
method: 'PUT',
path: `/api/stations/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete the station whose id you provided.
If no station with this id exists it will just return 204(no content).
If the station still has scans associated you have to provide the force=true query param (warning: this deletes all scans associated with/created by this station - please disable it instead).
* @param id
* @param force
* @returns ResponseScanStation
* @returns ResponseEmpty
* @throws ApiError
*/
static async scanStationControllerRemove(id, force) {
const result = await (0, request_1.request)({
method: 'DELETE',
path: `/api/stations/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.ScanStationService = ScanStationService;