This commit is contained in:
58
dist/services/ScanService.d.ts
vendored
Normal file
58
dist/services/ScanService.d.ts
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
import type { CreateScan } from '../models/CreateScan';
|
||||
import type { CreateTrackScan } from '../models/CreateTrackScan';
|
||||
import type { ResponseEmpty } from '../models/ResponseEmpty';
|
||||
import type { ResponseScan } from '../models/ResponseScan';
|
||||
import type { ResponseTrackScan } from '../models/ResponseTrackScan';
|
||||
import type { UpdateScan } from '../models/UpdateScan';
|
||||
export declare class ScanService {
|
||||
/**
|
||||
* Get all
|
||||
* Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran.
|
||||
* @returns any
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanControllerGetAll(): Promise<(Array<ResponseScan> | Array<ResponseTrackScan>)>;
|
||||
/**
|
||||
* Post
|
||||
* Create a new scan. <br> Please remeber to provide the scan's runner's id and distance for normal scans.
|
||||
* @param requestBody CreateScan
|
||||
* @returns ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanControllerPost(requestBody?: CreateScan): Promise<ResponseScan>;
|
||||
/**
|
||||
* Get one
|
||||
* Lists all information about the scan whose id got provided. This includes the scan's runner's distance ran.
|
||||
* @param id
|
||||
* @returns any
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanControllerGetOne(id: number): Promise<(ResponseScan | ResponseTrackScan)>;
|
||||
/**
|
||||
* Put
|
||||
* Update the scan whose id you provided. <br> Please remember that ids can't be changed and distances must be positive.
|
||||
* @param id
|
||||
* @param requestBody UpdateScan
|
||||
* @returns ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanControllerPut(id: number, requestBody?: UpdateScan): Promise<ResponseScan>;
|
||||
/**
|
||||
* Remove
|
||||
* Delete the scan whose id you provided. <br> If no scan with this id exists it will just return 204(no content).
|
||||
* @param id
|
||||
* @param force
|
||||
* @returns ResponseScan
|
||||
* @returns ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanControllerRemove(id: number, force?: boolean): Promise<ResponseScan | ResponseEmpty>;
|
||||
/**
|
||||
* Post track scans
|
||||
* Create a new track scan. <br> This is just a alias for posting /scans
|
||||
* @param requestBody CreateTrackScan
|
||||
* @returns ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanControllerPostTrackScans(requestBody?: CreateTrackScan): Promise<ResponseScan>;
|
||||
}
|
||||
99
dist/services/ScanService.js
vendored
Normal file
99
dist/services/ScanService.js
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ScanService = void 0;
|
||||
const request_1 = require("../core/request");
|
||||
class ScanService {
|
||||
/**
|
||||
* Get all
|
||||
* Lists all scans (normal or track) from all runners. <br> This includes the scan's runner's distance ran.
|
||||
* @returns any
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerGetAll() {
|
||||
const result = await request_1.request({
|
||||
method: 'GET',
|
||||
path: `/api/scans`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post
|
||||
* Create a new scan. <br> Please remeber to provide the scan's runner's id and distance for normal scans.
|
||||
* @param requestBody CreateScan
|
||||
* @returns ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerPost(requestBody) {
|
||||
const result = await request_1.request({
|
||||
method: 'POST',
|
||||
path: `/api/scans`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Get one
|
||||
* Lists all information about the scan whose id got provided. This includes the scan's runner's distance ran.
|
||||
* @param id
|
||||
* @returns any
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerGetOne(id) {
|
||||
const result = await request_1.request({
|
||||
method: 'GET',
|
||||
path: `/api/scans/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Put
|
||||
* Update the scan whose id you provided. <br> Please remember that ids can't be changed and distances must be positive.
|
||||
* @param id
|
||||
* @param requestBody UpdateScan
|
||||
* @returns ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerPut(id, requestBody) {
|
||||
const result = await request_1.request({
|
||||
method: 'PUT',
|
||||
path: `/api/scans/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Remove
|
||||
* Delete the scan whose id you provided. <br> If no scan with this id exists it will just return 204(no content).
|
||||
* @param id
|
||||
* @param force
|
||||
* @returns ResponseScan
|
||||
* @returns ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerRemove(id, force) {
|
||||
const result = await request_1.request({
|
||||
method: 'DELETE',
|
||||
path: `/api/scans/${id}`,
|
||||
query: {
|
||||
'force': force,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post track scans
|
||||
* Create a new track scan. <br> This is just a alias for posting /scans
|
||||
* @param requestBody CreateTrackScan
|
||||
* @returns ResponseScan
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanControllerPostTrackScans(requestBody) {
|
||||
const result = await request_1.request({
|
||||
method: 'POST',
|
||||
path: `/api/scans/trackscans`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
}
|
||||
exports.ScanService = ScanService;
|
||||
48
dist/services/ScanStationService.d.ts
vendored
Normal file
48
dist/services/ScanStationService.d.ts
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { CreateScanStation } from '../models/CreateScanStation';
|
||||
import type { ResponseEmpty } from '../models/ResponseEmpty';
|
||||
import type { ResponseScanStation } from '../models/ResponseScanStation';
|
||||
import type { UpdateScanStation } from '../models/UpdateScanStation';
|
||||
export declare class ScanStationService {
|
||||
/**
|
||||
* Get all
|
||||
* Lists all stations. <br> This includes their associated tracks.
|
||||
* @returns ResponseScanStation
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanStationControllerGetAll(): Promise<Array<ResponseScanStation>>;
|
||||
/**
|
||||
* Post
|
||||
* Create a new station. <br> Please remeber to provide the station's track's id. <br> Please also remember that the station key is only visibe on creation.
|
||||
* @param requestBody CreateScanStation
|
||||
* @returns ResponseScanStation
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanStationControllerPost(requestBody?: CreateScanStation): Promise<ResponseScanStation>;
|
||||
/**
|
||||
* Get one
|
||||
* Lists all information about the station whose id got provided. <br> This includes it's associated track.
|
||||
* @param id
|
||||
* @returns ResponseScanStation
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanStationControllerGetOne(id: number): Promise<ResponseScanStation>;
|
||||
/**
|
||||
* Put
|
||||
* Update the station whose id you provided. <br> Please remember that only the description and enabled state can be changed.
|
||||
* @param id
|
||||
* @param requestBody UpdateScanStation
|
||||
* @returns ResponseScanStation
|
||||
* @throws ApiError
|
||||
*/
|
||||
static scanStationControllerPut(id: number, requestBody?: UpdateScanStation): Promise<ResponseScanStation>;
|
||||
/**
|
||||
* Remove
|
||||
* Delete the station whose id you provided. <br> If no station with this id exists it will just return 204(no content). <br> 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 scanStationControllerRemove(id: number, force?: boolean): Promise<ResponseScanStation | ResponseEmpty>;
|
||||
}
|
||||
84
dist/services/ScanStationService.js
vendored
Normal file
84
dist/services/ScanStationService.js
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"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. <br> This includes their associated tracks.
|
||||
* @returns ResponseScanStation
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanStationControllerGetAll() {
|
||||
const result = await request_1.request({
|
||||
method: 'GET',
|
||||
path: `/api/stations`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post
|
||||
* Create a new station. <br> Please remeber to provide the station's track's id. <br> 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 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. <br> This includes it's associated track.
|
||||
* @param id
|
||||
* @returns ResponseScanStation
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async scanStationControllerGetOne(id) {
|
||||
const result = await request_1.request({
|
||||
method: 'GET',
|
||||
path: `/api/stations/${id}`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Put
|
||||
* Update the station whose id you provided. <br> 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 request_1.request({
|
||||
method: 'PUT',
|
||||
path: `/api/stations/${id}`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Remove
|
||||
* Delete the station whose id you provided. <br> If no station with this id exists it will just return 204(no content). <br> 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 request_1.request({
|
||||
method: 'DELETE',
|
||||
path: `/api/stations/${id}`,
|
||||
query: {
|
||||
'force': force,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
}
|
||||
exports.ScanStationService = ScanStationService;
|
||||
3
dist/services/TrackService.d.ts
vendored
3
dist/services/TrackService.d.ts
vendored
@@ -39,9 +39,10 @@ export declare class TrackService {
|
||||
* Remove
|
||||
* Delete the track whose id you provided. <br> If no track with this id exists it will just return 204(no content).
|
||||
* @param id
|
||||
* @param force
|
||||
* @returns ResponseTrack
|
||||
* @returns ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
static trackControllerRemove(id: number): Promise<ResponseTrack | ResponseEmpty>;
|
||||
static trackControllerRemove(id: number, force?: boolean): Promise<ResponseTrack | ResponseEmpty>;
|
||||
}
|
||||
|
||||
6
dist/services/TrackService.js
vendored
6
dist/services/TrackService.js
vendored
@@ -65,14 +65,18 @@ class TrackService {
|
||||
* Remove
|
||||
* Delete the track whose id you provided. <br> If no track with this id exists it will just return 204(no content).
|
||||
* @param id
|
||||
* @param force
|
||||
* @returns ResponseTrack
|
||||
* @returns ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async trackControllerRemove(id) {
|
||||
static async trackControllerRemove(id, force) {
|
||||
const result = await request_1.request({
|
||||
method: 'DELETE',
|
||||
path: `/api/tracks/${id}`,
|
||||
query: {
|
||||
'force': force,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user