new lib version [CI SKIP]

This commit is contained in:
Nicolai Ort 2021-01-10 17:19:49 +00:00
parent 21e8396e8e
commit bdb046f969
45 changed files with 302 additions and 38 deletions

View File

@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.OpenAPI = void 0; exports.OpenAPI = void 0;
exports.OpenAPI = { exports.OpenAPI = {
BASE: '', BASE: '',
VERSION: '0.0.8', VERSION: '0.0.11',
WITH_CREDENTIALS: false, WITH_CREDENTIALS: false,
TOKEN: undefined, TOKEN: undefined,
USERNAME: undefined, USERNAME: undefined,

12
dist/index.d.ts vendored
View File

@ -3,13 +3,13 @@ export { OpenAPI } from './core/OpenAPI';
export type { Address } from './models/Address'; export type { Address } from './models/Address';
export type { AddressNotFoundError } from './models/AddressNotFoundError'; export type { AddressNotFoundError } from './models/AddressNotFoundError';
export type { AddressWrongTypeError } from './models/AddressWrongTypeError'; export type { AddressWrongTypeError } from './models/AddressWrongTypeError';
export type { Auth } from './models/Auth';
export type { CreateAuth } from './models/CreateAuth'; export type { CreateAuth } from './models/CreateAuth';
export type { CreateDonor } from './models/CreateDonor'; export type { CreateDonor } from './models/CreateDonor';
export type { CreateParticipant } from './models/CreateParticipant'; export type { CreateParticipant } from './models/CreateParticipant';
export { CreatePermission } from './models/CreatePermission'; export { CreatePermission } from './models/CreatePermission';
export type { CreateResetToken } from './models/CreateResetToken'; export type { CreateResetToken } from './models/CreateResetToken';
export type { CreateRunner } from './models/CreateRunner'; export type { CreateRunner } from './models/CreateRunner';
export type { CreateRunnerCard } from './models/CreateRunnerCard';
export type { CreateRunnerGroup } from './models/CreateRunnerGroup'; export type { CreateRunnerGroup } from './models/CreateRunnerGroup';
export type { CreateRunnerOrganisation } from './models/CreateRunnerOrganisation'; export type { CreateRunnerOrganisation } from './models/CreateRunnerOrganisation';
export type { CreateRunnerTeam } from './models/CreateRunnerTeam'; export type { CreateRunnerTeam } from './models/CreateRunnerTeam';
@ -51,12 +51,14 @@ export type { RefreshAuth } from './models/RefreshAuth';
export type { RefreshTokenCountInvalidError } from './models/RefreshTokenCountInvalidError'; export type { RefreshTokenCountInvalidError } from './models/RefreshTokenCountInvalidError';
export type { ResetAlreadyRequestedError } from './models/ResetAlreadyRequestedError'; export type { ResetAlreadyRequestedError } from './models/ResetAlreadyRequestedError';
export type { ResetPassword } from './models/ResetPassword'; export type { ResetPassword } from './models/ResetPassword';
export type { ResponseAuth } from './models/ResponseAuth';
export type { ResponseDonor } from './models/ResponseDonor'; export type { ResponseDonor } from './models/ResponseDonor';
export type { ResponseEmpty } from './models/ResponseEmpty'; export type { ResponseEmpty } from './models/ResponseEmpty';
export type { ResponseParticipant } from './models/ResponseParticipant'; export type { ResponseParticipant } from './models/ResponseParticipant';
export { ResponsePermission } from './models/ResponsePermission'; export { ResponsePermission } from './models/ResponsePermission';
export type { ResponsePrincipal } from './models/ResponsePrincipal'; export type { ResponsePrincipal } from './models/ResponsePrincipal';
export type { ResponseRunner } from './models/ResponseRunner'; export type { ResponseRunner } from './models/ResponseRunner';
export type { ResponseRunnerCard } from './models/ResponseRunnerCard';
export type { ResponseRunnerGroup } from './models/ResponseRunnerGroup'; export type { ResponseRunnerGroup } from './models/ResponseRunnerGroup';
export type { ResponseRunnerOrganisation } from './models/ResponseRunnerOrganisation'; export type { ResponseRunnerOrganisation } from './models/ResponseRunnerOrganisation';
export type { ResponseRunnerTeam } from './models/ResponseRunnerTeam'; export type { ResponseRunnerTeam } from './models/ResponseRunnerTeam';
@ -73,6 +75,10 @@ export type { ResponseUser } from './models/ResponseUser';
export type { ResponseUserGroup } from './models/ResponseUserGroup'; export type { ResponseUserGroup } from './models/ResponseUserGroup';
export type { Runner } from './models/Runner'; export type { Runner } from './models/Runner';
export type { RunnerCard } from './models/RunnerCard'; export type { RunnerCard } from './models/RunnerCard';
export type { RunnerCardHasScansError } from './models/RunnerCardHasScansError';
export type { RunnerCardIdOutOfRangeError } from './models/RunnerCardIdOutOfRangeError';
export type { RunnerCardIdsNotMatchingError } from './models/RunnerCardIdsNotMatchingError';
export type { RunnerCardNotFoundError } from './models/RunnerCardNotFoundError';
export type { RunnerGroup } from './models/RunnerGroup'; export type { RunnerGroup } from './models/RunnerGroup';
export type { RunnerGroupNeededError } from './models/RunnerGroupNeededError'; export type { RunnerGroupNeededError } from './models/RunnerGroupNeededError';
export type { RunnerGroupNotFoundError } from './models/RunnerGroupNotFoundError'; export type { RunnerGroupNotFoundError } from './models/RunnerGroupNotFoundError';
@ -108,12 +114,15 @@ export type { TrackScan } from './models/TrackScan';
export type { UpdateDonor } from './models/UpdateDonor'; export type { UpdateDonor } from './models/UpdateDonor';
export type { UpdatePermission } from './models/UpdatePermission'; export type { UpdatePermission } from './models/UpdatePermission';
export type { UpdateRunner } from './models/UpdateRunner'; export type { UpdateRunner } from './models/UpdateRunner';
export type { UpdateRunnerCard } from './models/UpdateRunnerCard';
export type { UpdateRunnerOrganisation } from './models/UpdateRunnerOrganisation'; export type { UpdateRunnerOrganisation } from './models/UpdateRunnerOrganisation';
export type { UpdateRunnerTeam } from './models/UpdateRunnerTeam'; export type { UpdateRunnerTeam } from './models/UpdateRunnerTeam';
export type { UpdateScan } from './models/UpdateScan'; export type { UpdateScan } from './models/UpdateScan';
export type { UpdateScanStation } from './models/UpdateScanStation'; export type { UpdateScanStation } from './models/UpdateScanStation';
export type { UpdateTrack } from './models/UpdateTrack'; export type { UpdateTrack } from './models/UpdateTrack';
export type { UpdateTrackScan } from './models/UpdateTrackScan';
export type { UpdateUser } from './models/UpdateUser'; export type { UpdateUser } from './models/UpdateUser';
export type { UpdateUserGroup } from './models/UpdateUserGroup';
export type { User } from './models/User'; export type { User } from './models/User';
export { UserAction } from './models/UserAction'; export { UserAction } from './models/UserAction';
export type { UserDisabledError } from './models/UserDisabledError'; export type { UserDisabledError } from './models/UserDisabledError';
@ -129,6 +138,7 @@ export { AuthService } from './services/AuthService';
export { DonorService } from './services/DonorService'; export { DonorService } from './services/DonorService';
export { ImportService } from './services/ImportService'; export { ImportService } from './services/ImportService';
export { PermissionService } from './services/PermissionService'; export { PermissionService } from './services/PermissionService';
export { RunnerCardService } from './services/RunnerCardService';
export { RunnerOrganisationService } from './services/RunnerOrganisationService'; export { RunnerOrganisationService } from './services/RunnerOrganisationService';
export { RunnerService } from './services/RunnerService'; export { RunnerService } from './services/RunnerService';
export { RunnerTeamService } from './services/RunnerTeamService'; export { RunnerTeamService } from './services/RunnerTeamService';

4
dist/index.js vendored
View File

@ -1,6 +1,6 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.UserService = exports.UserGroupService = exports.TrackService = exports.StatusService = exports.StatsService = exports.StatsClientService = exports.ScanStationService = exports.ScanService = exports.RunnerTeamService = exports.RunnerService = exports.RunnerOrganisationService = exports.PermissionService = exports.ImportService = exports.DonorService = exports.AuthService = exports.UserAction = exports.ResponsePermission = exports.Permission = exports.CreatePermission = exports.OpenAPI = exports.ApiError = void 0; exports.UserService = exports.UserGroupService = exports.TrackService = exports.StatusService = exports.StatsService = exports.StatsClientService = exports.ScanStationService = exports.ScanService = exports.RunnerTeamService = exports.RunnerService = exports.RunnerOrganisationService = exports.RunnerCardService = exports.PermissionService = exports.ImportService = exports.DonorService = exports.AuthService = exports.UserAction = exports.ResponsePermission = exports.Permission = exports.CreatePermission = exports.OpenAPI = exports.ApiError = void 0;
/* istanbul ignore file */ /* istanbul ignore file */
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
@ -24,6 +24,8 @@ var ImportService_1 = require("./services/ImportService");
Object.defineProperty(exports, "ImportService", { enumerable: true, get: function () { return ImportService_1.ImportService; } }); Object.defineProperty(exports, "ImportService", { enumerable: true, get: function () { return ImportService_1.ImportService; } });
var PermissionService_1 = require("./services/PermissionService"); var PermissionService_1 = require("./services/PermissionService");
Object.defineProperty(exports, "PermissionService", { enumerable: true, get: function () { return PermissionService_1.PermissionService; } }); Object.defineProperty(exports, "PermissionService", { enumerable: true, get: function () { return PermissionService_1.PermissionService; } });
var RunnerCardService_1 = require("./services/RunnerCardService");
Object.defineProperty(exports, "RunnerCardService", { enumerable: true, get: function () { return RunnerCardService_1.RunnerCardService; } });
var RunnerOrganisationService_1 = require("./services/RunnerOrganisationService"); var RunnerOrganisationService_1 = require("./services/RunnerOrganisationService");
Object.defineProperty(exports, "RunnerOrganisationService", { enumerable: true, get: function () { return RunnerOrganisationService_1.RunnerOrganisationService; } }); Object.defineProperty(exports, "RunnerOrganisationService", { enumerable: true, get: function () { return RunnerOrganisationService_1.RunnerOrganisationService; } });
var RunnerService_1 = require("./services/RunnerService"); var RunnerService_1 = require("./services/RunnerService");

View File

@ -15,7 +15,8 @@ export declare namespace CreatePermission {
STATSCLIENT = "STATSCLIENT", STATSCLIENT = "STATSCLIENT",
DONOR = "DONOR", DONOR = "DONOR",
SCAN = "SCAN", SCAN = "SCAN",
STATION = "STATION" STATION = "STATION",
CARD = "CARD"
} }
enum action { enum action {
GET = "GET", GET = "GET",

View File

@ -19,6 +19,7 @@ var CreatePermission;
target["DONOR"] = "DONOR"; target["DONOR"] = "DONOR";
target["SCAN"] = "SCAN"; target["SCAN"] = "SCAN";
target["STATION"] = "STATION"; target["STATION"] = "STATION";
target["CARD"] = "CARD";
})(target = CreatePermission.target || (CreatePermission.target = {})); })(target = CreatePermission.target || (CreatePermission.target = {}));
let action; let action;
(function (action) { (function (action) {

4
dist/models/CreateRunnerCard.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export declare type CreateRunnerCard = {
runner?: number;
enabled: boolean;
};

View File

@ -1,8 +1,4 @@
export declare type CreateTrackScan = { export declare type CreateTrackScan = {
track: string; card: number;
card: string; station: number;
station: string;
runner: number;
valid?: boolean;
distance: number;
}; };

View File

@ -15,7 +15,8 @@ export declare namespace Permission {
STATSCLIENT = "STATSCLIENT", STATSCLIENT = "STATSCLIENT",
DONOR = "DONOR", DONOR = "DONOR",
SCAN = "SCAN", SCAN = "SCAN",
STATION = "STATION" STATION = "STATION",
CARD = "CARD"
} }
enum action { enum action {
GET = "GET", GET = "GET",

View File

@ -19,6 +19,7 @@ var Permission;
target["DONOR"] = "DONOR"; target["DONOR"] = "DONOR";
target["SCAN"] = "SCAN"; target["SCAN"] = "SCAN";
target["STATION"] = "STATION"; target["STATION"] = "STATION";
target["CARD"] = "CARD";
})(target = Permission.target || (Permission.target = {})); })(target = Permission.target || (Permission.target = {}));
let action; let action;
(function (action) { (function (action) {

View File

@ -1,4 +1,4 @@
export declare type Auth = { export declare type ResponseAuth = {
access_token: string; access_token: string;
refresh_token: string; refresh_token: string;
access_token_expires_at: number; access_token_expires_at: number;

5
dist/models/ResponseAuth.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -16,7 +16,8 @@ export declare namespace ResponsePermission {
STATSCLIENT = "STATSCLIENT", STATSCLIENT = "STATSCLIENT",
DONOR = "DONOR", DONOR = "DONOR",
SCAN = "SCAN", SCAN = "SCAN",
STATION = "STATION" STATION = "STATION",
CARD = "CARD"
} }
enum action { enum action {
GET = "GET", GET = "GET",

View File

@ -19,6 +19,7 @@ var ResponsePermission;
target["DONOR"] = "DONOR"; target["DONOR"] = "DONOR";
target["SCAN"] = "SCAN"; target["SCAN"] = "SCAN";
target["STATION"] = "STATION"; target["STATION"] = "STATION";
target["CARD"] = "CARD";
})(target = ResponsePermission.target || (ResponsePermission.target = {})); })(target = ResponsePermission.target || (ResponsePermission.target = {}));
let action; let action;
(function (action) { (function (action) {

6
dist/models/ResponseRunnerCard.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
export declare type ResponseRunnerCard = {
id: number;
runner: any;
code: string;
enabled: boolean;
};

5
dist/models/ResponseRunnerCard.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -1,6 +1,5 @@
export declare type RunnerCard = { export declare type RunnerCard = {
id: number; id: number;
runner?: any; runner?: any;
code: string;
enabled: boolean; enabled: boolean;
}; };

View File

@ -0,0 +1,4 @@
export declare type RunnerCardHasScansError = {
name: string;
message: string;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -0,0 +1,4 @@
export declare type RunnerCardIdOutOfRangeError = {
name: string;
message: string;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -0,0 +1,4 @@
export declare type RunnerCardIdsNotMatchingError = {
name: string;
message: string;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -0,0 +1,4 @@
export declare type RunnerCardNotFoundError = {
name: string;
message: string;
};

View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -3,7 +3,7 @@ export declare type TrackScan = {
card: string; card: string;
station: string; station: string;
distance: number; distance: number;
timestamp: string; timestamp: number;
id: number; id: number;
runner: string; runner: string;
valid: boolean; valid: boolean;

5
dist/models/UpdateRunnerCard.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
export declare type UpdateRunnerCard = {
id: number;
runner?: number;
enabled: boolean;
};

5
dist/models/UpdateRunnerCard.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

6
dist/models/UpdateTrackScan.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
export declare type UpdateTrackScan = {
id: number;
runner?: number;
valid?: boolean;
station?: number;
};

5
dist/models/UpdateTrackScan.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

5
dist/models/UpdateUserGroup.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
export declare type UpdateUserGroup = {
id: number;
name: string;
description?: string;
};

5
dist/models/UpdateUserGroup.js vendored Normal file
View File

@ -0,0 +1,5 @@
"use strict";
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });

View File

@ -1,4 +1,3 @@
import type { Auth } from '../models/Auth';
import type { CreateAuth } from '../models/CreateAuth'; import type { CreateAuth } from '../models/CreateAuth';
import type { CreateResetToken } from '../models/CreateResetToken'; import type { CreateResetToken } from '../models/CreateResetToken';
import type { HandleLogout } from '../models/HandleLogout'; import type { HandleLogout } from '../models/HandleLogout';
@ -10,6 +9,7 @@ import type { PasswordNeededError } from '../models/PasswordNeededError';
import type { RefreshAuth } from '../models/RefreshAuth'; import type { RefreshAuth } from '../models/RefreshAuth';
import type { RefreshTokenCountInvalidError } from '../models/RefreshTokenCountInvalidError'; import type { RefreshTokenCountInvalidError } from '../models/RefreshTokenCountInvalidError';
import type { ResetPassword } from '../models/ResetPassword'; import type { ResetPassword } from '../models/ResetPassword';
import type { ResponseAuth } from '../models/ResponseAuth';
import type { UsernameOrEmailNeededError } from '../models/UsernameOrEmailNeededError'; import type { UsernameOrEmailNeededError } from '../models/UsernameOrEmailNeededError';
import type { UserNotFoundError } from '../models/UserNotFoundError'; import type { UserNotFoundError } from '../models/UserNotFoundError';
export declare class AuthService { export declare class AuthService {
@ -22,7 +22,7 @@ export declare class AuthService {
* @returns any * @returns any
* @throws ApiError * @throws ApiError
*/ */
static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>; static authControllerLogin(requestBody?: CreateAuth): Promise<(ResponseAuth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>;
/** /**
* Logout * Logout
* Logout using your refresh token. <br> This instantly invalidates all your access and refresh tokens. * Logout using your refresh token. <br> This instantly invalidates all your access and refresh tokens.
@ -40,7 +40,7 @@ export declare class AuthService {
* @returns any * @returns any
* @throws ApiError * @throws ApiError
*/ */
static authControllerRefresh(requestBody?: RefreshAuth): Promise<(Auth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>; static authControllerRefresh(requestBody?: RefreshAuth): Promise<(ResponseAuth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>;
/** /**
* Get reset token * Get reset token
* Request a password reset token. <br> This will provide you with a reset token that you can use by posting to /api/auth/reset/{token}. * Request a password reset token. <br> This will provide you with a reset token that you can use by posting to /api/auth/reset/{token}.
@ -48,7 +48,7 @@ export declare class AuthService {
* @returns any * @returns any
* @throws ApiError * @throws ApiError
*/ */
static authControllerGetResetToken(requestBody?: CreateResetToken): Promise<(Auth | UserNotFoundError | UsernameOrEmailNeededError)>; static authControllerGetResetToken(requestBody?: CreateResetToken): Promise<(ResponseAuth | UserNotFoundError | UsernameOrEmailNeededError)>;
/** /**
* Reset password * Reset password
* Reset a user's utilising a valid password reset token. <br> This will set the user's password to the one you provided in the body. <br> To get a reset token post to /api/auth/reset with your username. * Reset a user's utilising a valid password reset token. <br> This will set the user's password to the one you provided in the body. <br> To get a reset token post to /api/auth/reset with your username.
@ -57,5 +57,5 @@ export declare class AuthService {
* @returns any * @returns any
* @throws ApiError * @throws ApiError
*/ */
static authControllerResetPassword(token: string, requestBody?: ResetPassword): Promise<(Auth | UserNotFoundError | UsernameOrEmailNeededError)>; static authControllerResetPassword(token: string, requestBody?: ResetPassword): Promise<(ResponseAuth | UserNotFoundError | UsernameOrEmailNeededError)>;
} }

48
dist/services/RunnerCardService.d.ts vendored Normal file
View File

@ -0,0 +1,48 @@
import type { CreateRunnerCard } from '../models/CreateRunnerCard';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunnerCard } from '../models/ResponseRunnerCard';
import type { UpdateRunnerCard } from '../models/UpdateRunnerCard';
export declare class RunnerCardService {
/**
* Get all
* Lists all card.
* @returns ResponseRunnerCard
* @throws ApiError
*/
static runnerCardControllerGetAll(): Promise<Array<ResponseRunnerCard>>;
/**
* Post
* Create a new card. <br> You can provide a associated runner by id but you don't have to.
* @param requestBody CreateRunnerCard
* @returns ResponseRunnerCard
* @throws ApiError
*/
static runnerCardControllerPost(requestBody?: CreateRunnerCard): Promise<ResponseRunnerCard>;
/**
* Get one
* Lists all information about the card whose id got provided.
* @param id
* @returns ResponseRunnerCard
* @throws ApiError
*/
static runnerCardControllerGetOne(id: number): Promise<ResponseRunnerCard>;
/**
* Put
* Update the card whose id you provided. <br> Scans created via this card will still be associated with the old runner. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunnerCard
* @returns ResponseRunnerCard
* @throws ApiError
*/
static runnerCardControllerPut(id: number, requestBody?: UpdateRunnerCard): Promise<ResponseRunnerCard>;
/**
* Remove
* Delete the card whose id you provided. <br> If no card with this id exists it will just return 204(no content). <br> 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
* @returns ResponseRunnerCard
* @returns ResponseEmpty
* @throws ApiError
*/
static runnerCardControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerCard | ResponseEmpty>;
}

84
dist/services/RunnerCardService.js vendored Normal file
View File

@ -0,0 +1,84 @@
"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.
* @returns ResponseRunnerCard
* @throws ApiError
*/
static async runnerCardControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/cards`,
});
return result.body;
}
/**
* Post
* Create a new card. <br> You can provide a associated runner by id but you don't have to.
* @param requestBody CreateRunnerCard
* @returns ResponseRunnerCard
* @throws ApiError
*/
static async runnerCardControllerPost(requestBody) {
const result = await 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
* @returns ResponseRunnerCard
* @throws ApiError
*/
static async runnerCardControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/cards/${id}`,
});
return result.body;
}
/**
* Put
* Update the card whose id you provided. <br> Scans created via this card will still be associated with the old runner. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunnerCard
* @returns ResponseRunnerCard
* @throws ApiError
*/
static async runnerCardControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/cards/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete the card whose id you provided. <br> If no card with this id exists it will just return 204(no content). <br> 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
* @returns ResponseRunnerCard
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerCardControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/cards/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.RunnerCardService = RunnerCardService;

View File

@ -39,7 +39,7 @@ export declare class RunnerService {
static runnerControllerPut(id: number, requestBody?: UpdateRunner): Promise<ResponseRunner>; static runnerControllerPut(id: number, requestBody?: UpdateRunner): Promise<ResponseRunner>;
/** /**
* Remove * Remove
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content). * Delete the runner whose id you provided. <br> This will also delete all scans and cards associated with the runner. <br> If no runner with this id exists it will just return 204(no content).
* @param id * @param id
* @param force * @param force
* @returns ResponseRunner * @returns ResponseRunner

View File

@ -63,7 +63,7 @@ class RunnerService {
} }
/** /**
* Remove * Remove
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content). * Delete the runner whose id you provided. <br> This will also delete all scans and cards associated with the runner. <br> If no runner with this id exists it will just return 204(no content).
* @param id * @param id
* @param force * @param force
* @returns ResponseRunner * @returns ResponseRunner

View File

@ -4,6 +4,7 @@ import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseScan } from '../models/ResponseScan'; import type { ResponseScan } from '../models/ResponseScan';
import type { ResponseTrackScan } from '../models/ResponseTrackScan'; import type { ResponseTrackScan } from '../models/ResponseTrackScan';
import type { UpdateScan } from '../models/UpdateScan'; import type { UpdateScan } from '../models/UpdateScan';
import type { UpdateTrackScan } from '../models/UpdateTrackScan';
export declare class ScanService { export declare class ScanService {
/** /**
* Get all * Get all
@ -14,7 +15,7 @@ export declare class ScanService {
static scanControllerGetAll(): Promise<(Array<ResponseScan> | Array<ResponseTrackScan>)>; static scanControllerGetAll(): Promise<(Array<ResponseScan> | Array<ResponseTrackScan>)>;
/** /**
* Post * Post
* Create a new scan. <br> Please remeber to provide the scan's runner's id and distance for normal scans. * Create a new scan (not track scan - use /scans/trackscans instead). <br> Please rmemember to provide the scan's runner's id and distance.
* @param requestBody CreateScan * @param requestBody CreateScan
* @returns ResponseScan * @returns ResponseScan
* @throws ApiError * @throws ApiError
@ -30,7 +31,7 @@ export declare class ScanService {
static scanControllerGetOne(id: number): Promise<(ResponseScan | ResponseTrackScan)>; static scanControllerGetOne(id: number): Promise<(ResponseScan | ResponseTrackScan)>;
/** /**
* Put * Put
* Update the scan whose id you provided. <br> Please remember that ids can't be changed and distances must be positive. * Update the scan (not track scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that ids can't be changed and distances must be positive.
* @param id * @param id
* @param requestBody UpdateScan * @param requestBody UpdateScan
* @returns ResponseScan * @returns ResponseScan
@ -49,10 +50,19 @@ export declare class ScanService {
static scanControllerRemove(id: number, force?: boolean): Promise<ResponseScan | ResponseEmpty>; static scanControllerRemove(id: number, force?: boolean): Promise<ResponseScan | ResponseEmpty>;
/** /**
* Post track scans * Post track scans
* Create a new track scan. <br> This is just a alias for posting /scans * Create a new track scan (for "normal" scans use /scans instead). <br> Please remember that to provide the scan's card's station's id.
* @param requestBody CreateTrackScan * @param requestBody CreateTrackScan
* @returns ResponseScan * @returns ResponseTrackScan
* @throws ApiError * @throws ApiError
*/ */
static scanControllerPostTrackScans(requestBody?: CreateTrackScan): Promise<ResponseScan>; static scanControllerPostTrackScans(requestBody?: CreateTrackScan): Promise<ResponseTrackScan>;
/**
* Put track scan
* Update the track scan (not "normal" scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that only the validity, runner and track can be changed.
* @param id
* @param requestBody UpdateTrackScan
* @returns ResponseTrackScan
* @throws ApiError
*/
static scanControllerPutTrackScan(id: number, requestBody?: UpdateTrackScan): Promise<ResponseTrackScan>;
} }

View File

@ -18,7 +18,7 @@ class ScanService {
} }
/** /**
* Post * Post
* Create a new scan. <br> Please remeber to provide the scan's runner's id and distance for normal scans. * Create a new scan (not track scan - use /scans/trackscans instead). <br> Please rmemember to provide the scan's runner's id and distance.
* @param requestBody CreateScan * @param requestBody CreateScan
* @returns ResponseScan * @returns ResponseScan
* @throws ApiError * @throws ApiError
@ -47,7 +47,7 @@ class ScanService {
} }
/** /**
* Put * Put
* Update the scan whose id you provided. <br> Please remember that ids can't be changed and distances must be positive. * Update the scan (not track scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that ids can't be changed and distances must be positive.
* @param id * @param id
* @param requestBody UpdateScan * @param requestBody UpdateScan
* @returns ResponseScan * @returns ResponseScan
@ -82,9 +82,9 @@ class ScanService {
} }
/** /**
* Post track scans * Post track scans
* Create a new track scan. <br> This is just a alias for posting /scans * Create a new track scan (for "normal" scans use /scans instead). <br> Please remember that to provide the scan's card's station's id.
* @param requestBody CreateTrackScan * @param requestBody CreateTrackScan
* @returns ResponseScan * @returns ResponseTrackScan
* @throws ApiError * @throws ApiError
*/ */
static async scanControllerPostTrackScans(requestBody) { static async scanControllerPostTrackScans(requestBody) {
@ -95,5 +95,21 @@ class ScanService {
}); });
return result.body; return result.body;
} }
/**
* Put track scan
* Update the track scan (not "normal" scan use /scans/trackscans/:id instead) whose id you provided. <br> Please remember that only the validity, runner and track can be changed.
* @param id
* @param requestBody UpdateTrackScan
* @returns ResponseTrackScan
* @throws ApiError
*/
static async scanControllerPutTrackScan(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/scans/trackscans/${id}`,
body: requestBody,
});
return result.body;
}
} }
exports.ScanService = ScanService; exports.ScanService = ScanService;

View File

@ -29,9 +29,10 @@ export declare class StatsClientService {
* Remove * Remove
* Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content). * Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content).
* @param id * @param id
* @param force
* @returns ResponseStatsClient * @returns ResponseStatsClient
* @returns ResponseEmpty * @returns ResponseEmpty
* @throws ApiError * @throws ApiError
*/ */
static statsClientControllerRemove(id: number): Promise<ResponseStatsClient | ResponseEmpty>; static statsClientControllerRemove(id: number, force?: boolean): Promise<ResponseStatsClient | ResponseEmpty>;
} }

View File

@ -49,14 +49,18 @@ class StatsClientService {
* Remove * Remove
* Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content). * Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content).
* @param id * @param id
* @param force
* @returns ResponseStatsClient * @returns ResponseStatsClient
* @returns ResponseEmpty * @returns ResponseEmpty
* @throws ApiError * @throws ApiError
*/ */
static async statsClientControllerRemove(id) { static async statsClientControllerRemove(id, force) {
const result = await request_1.request({ const result = await request_1.request({
method: 'DELETE', method: 'DELETE',
path: `/api/statsclients/${id}`, path: `/api/statsclients/${id}`,
query: {
'force': force,
},
}); });
return result.body; return result.body;
} }

View File

@ -1,6 +1,7 @@
import type { CreateUserGroup } from '../models/CreateUserGroup'; import type { CreateUserGroup } from '../models/CreateUserGroup';
import type { ResponseEmpty } from '../models/ResponseEmpty'; import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseUserGroup } from '../models/ResponseUserGroup'; import type { ResponseUserGroup } from '../models/ResponseUserGroup';
import type { UpdateUserGroup } from '../models/UpdateUserGroup';
import type { UserGroup } from '../models/UserGroup'; import type { UserGroup } from '../models/UserGroup';
import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError'; import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError';
export declare class UserGroupService { export declare class UserGroupService {
@ -31,11 +32,11 @@ export declare class UserGroupService {
* Put * Put
* Update the group whose id you provided. <br> To change the permissions granted to the group please use /api/permissions instead. <br> Please remember that ids can't be changed. * Update the group whose id you provided. <br> To change the permissions granted to the group please use /api/permissions instead. <br> Please remember that ids can't be changed.
* @param id * @param id
* @param requestBody UserGroup * @param requestBody UpdateUserGroup
* @returns UserGroup * @returns UserGroup
* @throws ApiError * @throws ApiError
*/ */
static userGroupControllerPut(id: number, requestBody?: UserGroup): Promise<UserGroup>; static userGroupControllerPut(id: number, requestBody?: UpdateUserGroup): Promise<UserGroup>;
/** /**
* Remove * Remove
* Delete the group whose id you provided. <br> If there are any permissions directly granted to the group they will get deleted as well. <br> Users associated with this group won't get deleted - just deassociated. <br> If no group with this id exists it will just return 204(no content). * Delete the group whose id you provided. <br> If there are any permissions directly granted to the group they will get deleted as well. <br> Users associated with this group won't get deleted - just deassociated. <br> If no group with this id exists it will just return 204(no content).

View File

@ -49,7 +49,7 @@ class UserGroupService {
* Put * Put
* Update the group whose id you provided. <br> To change the permissions granted to the group please use /api/permissions instead. <br> Please remember that ids can't be changed. * Update the group whose id you provided. <br> To change the permissions granted to the group please use /api/permissions instead. <br> Please remember that ids can't be changed.
* @param id * @param id
* @param requestBody UserGroup * @param requestBody UpdateUserGroup
* @returns UserGroup * @returns UserGroup
* @throws ApiError * @throws ApiError
*/ */

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{ {
"name": "@odit/lfk-client-node", "name": "@odit/lfk-client-node",
"description": "A lib to interact with https://git.odit.services/lfk/backend. Use this version for NodeJS applications.", "description": "A lib to interact with https://git.odit.services/lfk/backend. Use this version for NodeJS applications.",
"version": "0.0.10", "version": "0.0.11",
"license": "CC-BY-NC-SA-4.0", "license": "CC-BY-NC-SA-4.0",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",