From f2b867cd04c7fee388bdca92f898f9e80e232324 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 13 Jan 2021 19:36:10 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80New=20lib=20version=20v0.0.12=20[CI?= =?UTF-8?q?=20SKIP]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/core/OpenAPI.js | 2 +- dist/index.d.ts | 17 +++ dist/index.js | 4 +- dist/models/CreateDistanceDonation.d.ts | 5 + dist/models/CreateDistanceDonation.js | 5 + dist/models/CreateDonation.d.ts | 3 + dist/models/CreateDonation.js | 5 + dist/models/CreateFixedDonation.d.ts | 4 + dist/models/CreateFixedDonation.js | 5 + dist/models/CreatePermission.d.ts | 3 +- dist/models/CreatePermission.js | 1 + dist/models/CreateUser.d.ts | 2 +- dist/models/DonationIdsNotMatchingError.d.ts | 4 + dist/models/DonationIdsNotMatchingError.js | 5 + dist/models/DonationNotFoundError.d.ts | 4 + dist/models/DonationNotFoundError.js | 5 + dist/models/Donor.d.ts | 1 + dist/models/DonorHasDonationsError.d.ts | 4 + dist/models/DonorHasDonationsError.js | 5 + dist/models/FixedDonation.d.ts | 6 + dist/models/FixedDonation.js | 5 + dist/models/Permission.d.ts | 3 +- dist/models/Permission.js | 1 + dist/models/ResponseDistanceDonation.d.ts | 7 ++ dist/models/ResponseDistanceDonation.js | 5 + dist/models/ResponseDonation.d.ts | 5 + dist/models/ResponseDonation.js | 5 + dist/models/ResponseDonor.d.ts | 1 + dist/models/ResponsePermission.d.ts | 3 +- dist/models/ResponsePermission.js | 1 + dist/models/ResponseUserPermissions.d.ts | 4 + dist/models/ResponseUserPermissions.js | 5 + .../RunnerHasDistanceDonationsError.d.ts | 4 + .../models/RunnerHasDistanceDonationsError.js | 5 + dist/models/UpdateDistanceDonation.d.ts | 6 + dist/models/UpdateDistanceDonation.js | 5 + dist/models/UpdateDonation.d.ts | 4 + dist/models/UpdateDonation.js | 5 + dist/models/UpdateFixedDonation.d.ts | 5 + dist/models/UpdateFixedDonation.js | 5 + dist/models/UpdateUser.d.ts | 2 +- dist/models/UserEmailNeededError.d.ts | 4 + dist/models/UserEmailNeededError.js | 5 + ...UsernameContainsIllegalCharacterError.d.ts | 4 + .../UsernameContainsIllegalCharacterError.js | 5 + dist/services/DonationService.d.ts | 68 +++++++++++ dist/services/DonationService.js | 115 ++++++++++++++++++ dist/services/DonorService.d.ts | 10 +- dist/services/DonorService.js | 10 +- dist/services/StatusService.d.ts | 7 ++ dist/services/StatusService.js | 13 ++ dist/services/UserService.d.ts | 17 ++- dist/services/UserService.js | 20 ++- openapi.json | 2 +- package.json | 2 +- 55 files changed, 431 insertions(+), 27 deletions(-) create mode 100644 dist/models/CreateDistanceDonation.d.ts create mode 100644 dist/models/CreateDistanceDonation.js create mode 100644 dist/models/CreateDonation.d.ts create mode 100644 dist/models/CreateDonation.js create mode 100644 dist/models/CreateFixedDonation.d.ts create mode 100644 dist/models/CreateFixedDonation.js create mode 100644 dist/models/DonationIdsNotMatchingError.d.ts create mode 100644 dist/models/DonationIdsNotMatchingError.js create mode 100644 dist/models/DonationNotFoundError.d.ts create mode 100644 dist/models/DonationNotFoundError.js create mode 100644 dist/models/DonorHasDonationsError.d.ts create mode 100644 dist/models/DonorHasDonationsError.js create mode 100644 dist/models/FixedDonation.d.ts create mode 100644 dist/models/FixedDonation.js create mode 100644 dist/models/ResponseDistanceDonation.d.ts create mode 100644 dist/models/ResponseDistanceDonation.js create mode 100644 dist/models/ResponseDonation.d.ts create mode 100644 dist/models/ResponseDonation.js create mode 100644 dist/models/ResponseUserPermissions.d.ts create mode 100644 dist/models/ResponseUserPermissions.js create mode 100644 dist/models/RunnerHasDistanceDonationsError.d.ts create mode 100644 dist/models/RunnerHasDistanceDonationsError.js create mode 100644 dist/models/UpdateDistanceDonation.d.ts create mode 100644 dist/models/UpdateDistanceDonation.js create mode 100644 dist/models/UpdateDonation.d.ts create mode 100644 dist/models/UpdateDonation.js create mode 100644 dist/models/UpdateFixedDonation.d.ts create mode 100644 dist/models/UpdateFixedDonation.js create mode 100644 dist/models/UserEmailNeededError.d.ts create mode 100644 dist/models/UserEmailNeededError.js create mode 100644 dist/models/UsernameContainsIllegalCharacterError.d.ts create mode 100644 dist/models/UsernameContainsIllegalCharacterError.js create mode 100644 dist/services/DonationService.d.ts create mode 100644 dist/services/DonationService.js diff --git a/dist/core/OpenAPI.js b/dist/core/OpenAPI.js index 708ae5d..db9ff60 100644 --- a/dist/core/OpenAPI.js +++ b/dist/core/OpenAPI.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.OpenAPI = void 0; exports.OpenAPI = { BASE: '', - VERSION: '0.0.11', + VERSION: '0.0.12', WITH_CREDENTIALS: false, TOKEN: undefined, USERNAME: undefined, diff --git a/dist/index.d.ts b/dist/index.d.ts index 5e16ce6..6a05a49 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -4,7 +4,10 @@ export type { Address } from './models/Address'; export type { AddressNotFoundError } from './models/AddressNotFoundError'; export type { AddressWrongTypeError } from './models/AddressWrongTypeError'; export type { CreateAuth } from './models/CreateAuth'; +export type { CreateDistanceDonation } from './models/CreateDistanceDonation'; +export type { CreateDonation } from './models/CreateDonation'; export type { CreateDonor } from './models/CreateDonor'; +export type { CreateFixedDonation } from './models/CreateFixedDonation'; export type { CreateParticipant } from './models/CreateParticipant'; export { CreatePermission } from './models/CreatePermission'; export type { CreateResetToken } from './models/CreateResetToken'; @@ -22,10 +25,14 @@ export type { CreateUser } from './models/CreateUser'; export type { CreateUserGroup } from './models/CreateUserGroup'; export type { DistanceDonation } from './models/DistanceDonation'; export type { Donation } from './models/Donation'; +export type { DonationIdsNotMatchingError } from './models/DonationIdsNotMatchingError'; +export type { DonationNotFoundError } from './models/DonationNotFoundError'; export type { Donor } from './models/Donor'; +export type { DonorHasDonationsError } from './models/DonorHasDonationsError'; export type { DonorIdsNotMatchingError } from './models/DonorIdsNotMatchingError'; export type { DonorNotFoundError } from './models/DonorNotFoundError'; export type { DonorReceiptAddressNeededError } from './models/DonorReceiptAddressNeededError'; +export type { FixedDonation } from './models/FixedDonation'; export type { GroupContact } from './models/GroupContact'; export type { GroupContactNotFoundError } from './models/GroupContactNotFoundError'; export type { GroupContactWrongTypeError } from './models/GroupContactWrongTypeError'; @@ -52,6 +59,8 @@ export type { RefreshTokenCountInvalidError } from './models/RefreshTokenCountIn export type { ResetAlreadyRequestedError } from './models/ResetAlreadyRequestedError'; export type { ResetPassword } from './models/ResetPassword'; export type { ResponseAuth } from './models/ResponseAuth'; +export type { ResponseDistanceDonation } from './models/ResponseDistanceDonation'; +export type { ResponseDonation } from './models/ResponseDonation'; export type { ResponseDonor } from './models/ResponseDonor'; export type { ResponseEmpty } from './models/ResponseEmpty'; export type { ResponseParticipant } from './models/ResponseParticipant'; @@ -73,6 +82,7 @@ export type { ResponseTrack } from './models/ResponseTrack'; export type { ResponseTrackScan } from './models/ResponseTrackScan'; export type { ResponseUser } from './models/ResponseUser'; export type { ResponseUserGroup } from './models/ResponseUserGroup'; +export type { ResponseUserPermissions } from './models/ResponseUserPermissions'; export type { Runner } from './models/Runner'; export type { RunnerCard } from './models/RunnerCard'; export type { RunnerCardHasScansError } from './models/RunnerCardHasScansError'; @@ -82,6 +92,7 @@ export type { RunnerCardNotFoundError } from './models/RunnerCardNotFoundError'; export type { RunnerGroup } from './models/RunnerGroup'; export type { RunnerGroupNeededError } from './models/RunnerGroupNeededError'; export type { RunnerGroupNotFoundError } from './models/RunnerGroupNotFoundError'; +export type { RunnerHasDistanceDonationsError } from './models/RunnerHasDistanceDonationsError'; export type { RunnerIdsNotMatchingError } from './models/RunnerIdsNotMatchingError'; export type { RunnerNotFoundError } from './models/RunnerNotFoundError'; export type { RunnerOrganisation } from './models/RunnerOrganisation'; @@ -111,7 +122,10 @@ export type { TrackIdsNotMatchingError } from './models/TrackIdsNotMatchingError export type { TrackLapTimeCantBeNegativeError } from './models/TrackLapTimeCantBeNegativeError'; export type { TrackNotFoundError } from './models/TrackNotFoundError'; export type { TrackScan } from './models/TrackScan'; +export type { UpdateDistanceDonation } from './models/UpdateDistanceDonation'; +export type { UpdateDonation } from './models/UpdateDonation'; export type { UpdateDonor } from './models/UpdateDonor'; +export type { UpdateFixedDonation } from './models/UpdateFixedDonation'; export type { UpdatePermission } from './models/UpdatePermission'; export type { UpdateRunner } from './models/UpdateRunner'; export type { UpdateRunnerCard } from './models/UpdateRunnerCard'; @@ -126,15 +140,18 @@ export type { UpdateUserGroup } from './models/UpdateUserGroup'; export type { User } from './models/User'; export { UserAction } from './models/UserAction'; export type { UserDisabledError } from './models/UserDisabledError'; +export type { UserEmailNeededError } from './models/UserEmailNeededError'; export type { UserGroup } from './models/UserGroup'; export type { UserGroupIdsNotMatchingError } from './models/UserGroupIdsNotMatchingError'; export type { UserGroupNotFoundError } from './models/UserGroupNotFoundError'; export type { UserIdsNotMatchingError } from './models/UserIdsNotMatchingError'; +export type { UsernameContainsIllegalCharacterError } from './models/UsernameContainsIllegalCharacterError'; export type { UsernameOrEmailNeededError } from './models/UsernameOrEmailNeededError'; export type { UserNonexistantOrRefreshtokenInvalidError } from './models/UserNonexistantOrRefreshtokenInvalidError'; export type { UserNotFoundError } from './models/UserNotFoundError'; export type { UserNotFoundOrRefreshTokenCountInvalidError } from './models/UserNotFoundOrRefreshTokenCountInvalidError'; export { AuthService } from './services/AuthService'; +export { DonationService } from './services/DonationService'; export { DonorService } from './services/DonorService'; export { ImportService } from './services/ImportService'; export { PermissionService } from './services/PermissionService'; diff --git a/dist/index.js b/dist/index.js index 5cbb47a..2b047a4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,6 +1,6 @@ "use strict"; 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.RunnerCardService = 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.DonationService = exports.AuthService = exports.UserAction = exports.ResponsePermission = exports.Permission = exports.CreatePermission = exports.OpenAPI = exports.ApiError = void 0; /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -18,6 +18,8 @@ var UserAction_1 = require("./models/UserAction"); Object.defineProperty(exports, "UserAction", { enumerable: true, get: function () { return UserAction_1.UserAction; } }); var AuthService_1 = require("./services/AuthService"); Object.defineProperty(exports, "AuthService", { enumerable: true, get: function () { return AuthService_1.AuthService; } }); +var DonationService_1 = require("./services/DonationService"); +Object.defineProperty(exports, "DonationService", { enumerable: true, get: function () { return DonationService_1.DonationService; } }); var DonorService_1 = require("./services/DonorService"); Object.defineProperty(exports, "DonorService", { enumerable: true, get: function () { return DonorService_1.DonorService; } }); var ImportService_1 = require("./services/ImportService"); diff --git a/dist/models/CreateDistanceDonation.d.ts b/dist/models/CreateDistanceDonation.d.ts new file mode 100644 index 0000000..1f90b90 --- /dev/null +++ b/dist/models/CreateDistanceDonation.d.ts @@ -0,0 +1,5 @@ +export declare type CreateDistanceDonation = { + runner: number; + amountPerDistance: number; + donor: number; +}; diff --git a/dist/models/CreateDistanceDonation.js b/dist/models/CreateDistanceDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/CreateDistanceDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateDonation.d.ts b/dist/models/CreateDonation.d.ts new file mode 100644 index 0000000..605a550 --- /dev/null +++ b/dist/models/CreateDonation.d.ts @@ -0,0 +1,3 @@ +export declare type CreateDonation = { + donor: number; +}; diff --git a/dist/models/CreateDonation.js b/dist/models/CreateDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/CreateDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreateFixedDonation.d.ts b/dist/models/CreateFixedDonation.d.ts new file mode 100644 index 0000000..3fb37ca --- /dev/null +++ b/dist/models/CreateFixedDonation.d.ts @@ -0,0 +1,4 @@ +export declare type CreateFixedDonation = { + amount: number; + donor: number; +}; diff --git a/dist/models/CreateFixedDonation.js b/dist/models/CreateFixedDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/CreateFixedDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/CreatePermission.d.ts b/dist/models/CreatePermission.d.ts index b8830f0..0a2e1f1 100644 --- a/dist/models/CreatePermission.d.ts +++ b/dist/models/CreatePermission.d.ts @@ -16,7 +16,8 @@ export declare namespace CreatePermission { DONOR = "DONOR", SCAN = "SCAN", STATION = "STATION", - CARD = "CARD" + CARD = "CARD", + DONATION = "DONATION" } enum action { GET = "GET", diff --git a/dist/models/CreatePermission.js b/dist/models/CreatePermission.js index b0a6b8d..dab93b8 100644 --- a/dist/models/CreatePermission.js +++ b/dist/models/CreatePermission.js @@ -20,6 +20,7 @@ var CreatePermission; target["SCAN"] = "SCAN"; target["STATION"] = "STATION"; target["CARD"] = "CARD"; + target["DONATION"] = "DONATION"; })(target = CreatePermission.target || (CreatePermission.target = {})); let action; (function (action) { diff --git a/dist/models/CreateUser.d.ts b/dist/models/CreateUser.d.ts index e82f7e7..a9068aa 100644 --- a/dist/models/CreateUser.d.ts +++ b/dist/models/CreateUser.d.ts @@ -3,7 +3,7 @@ export declare type CreateUser = { middlename?: string; lastname: string; username?: string; - email?: string; + email: string; phone?: string; password: string; enabled?: boolean; diff --git a/dist/models/DonationIdsNotMatchingError.d.ts b/dist/models/DonationIdsNotMatchingError.d.ts new file mode 100644 index 0000000..30fa1d9 --- /dev/null +++ b/dist/models/DonationIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type DonationIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/DonationIdsNotMatchingError.js b/dist/models/DonationIdsNotMatchingError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/DonationIdsNotMatchingError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/DonationNotFoundError.d.ts b/dist/models/DonationNotFoundError.d.ts new file mode 100644 index 0000000..ec0e20d --- /dev/null +++ b/dist/models/DonationNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type DonationNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/DonationNotFoundError.js b/dist/models/DonationNotFoundError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/DonationNotFoundError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Donor.d.ts b/dist/models/Donor.d.ts index 4d30a20..6090144 100644 --- a/dist/models/Donor.d.ts +++ b/dist/models/Donor.d.ts @@ -1,5 +1,6 @@ export declare type Donor = { receiptNeeded: boolean; + donationAmount: number; id: number; firstname: string; middlename?: string; diff --git a/dist/models/DonorHasDonationsError.d.ts b/dist/models/DonorHasDonationsError.d.ts new file mode 100644 index 0000000..5c2aa1d --- /dev/null +++ b/dist/models/DonorHasDonationsError.d.ts @@ -0,0 +1,4 @@ +export declare type DonorHasDonationsError = { + name: string; + message: string; +}; diff --git a/dist/models/DonorHasDonationsError.js b/dist/models/DonorHasDonationsError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/DonorHasDonationsError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/FixedDonation.d.ts b/dist/models/FixedDonation.d.ts new file mode 100644 index 0000000..af6b6a3 --- /dev/null +++ b/dist/models/FixedDonation.d.ts @@ -0,0 +1,6 @@ +export declare type FixedDonation = { + _amount: number; + amount: number; + id: number; + donor: string; +}; diff --git a/dist/models/FixedDonation.js b/dist/models/FixedDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/FixedDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/Permission.d.ts b/dist/models/Permission.d.ts index c26ca29..8ae7b44 100644 --- a/dist/models/Permission.d.ts +++ b/dist/models/Permission.d.ts @@ -16,7 +16,8 @@ export declare namespace Permission { DONOR = "DONOR", SCAN = "SCAN", STATION = "STATION", - CARD = "CARD" + CARD = "CARD", + DONATION = "DONATION" } enum action { GET = "GET", diff --git a/dist/models/Permission.js b/dist/models/Permission.js index 489592d..0815e7c 100644 --- a/dist/models/Permission.js +++ b/dist/models/Permission.js @@ -20,6 +20,7 @@ var Permission; target["SCAN"] = "SCAN"; target["STATION"] = "STATION"; target["CARD"] = "CARD"; + target["DONATION"] = "DONATION"; })(target = Permission.target || (Permission.target = {})); let action; (function (action) { diff --git a/dist/models/ResponseDistanceDonation.d.ts b/dist/models/ResponseDistanceDonation.d.ts new file mode 100644 index 0000000..f0ba4d0 --- /dev/null +++ b/dist/models/ResponseDistanceDonation.d.ts @@ -0,0 +1,7 @@ +export declare type ResponseDistanceDonation = { + runner: any; + amountPerDistance: number; + id: number; + donor: string; + amount: number; +}; diff --git a/dist/models/ResponseDistanceDonation.js b/dist/models/ResponseDistanceDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/ResponseDistanceDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseDonation.d.ts b/dist/models/ResponseDonation.d.ts new file mode 100644 index 0000000..1bfbca9 --- /dev/null +++ b/dist/models/ResponseDonation.d.ts @@ -0,0 +1,5 @@ +export declare type ResponseDonation = { + id: number; + donor: string; + amount: number; +}; diff --git a/dist/models/ResponseDonation.js b/dist/models/ResponseDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/ResponseDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/ResponseDonor.d.ts b/dist/models/ResponseDonor.d.ts index 50430ce..36c4d62 100644 --- a/dist/models/ResponseDonor.d.ts +++ b/dist/models/ResponseDonor.d.ts @@ -1,5 +1,6 @@ export declare type ResponseDonor = { receiptNeeded: boolean; + donationAmount: number; id: number; firstname: string; middlename: string; diff --git a/dist/models/ResponsePermission.d.ts b/dist/models/ResponsePermission.d.ts index 8014525..1c88f39 100644 --- a/dist/models/ResponsePermission.d.ts +++ b/dist/models/ResponsePermission.d.ts @@ -17,7 +17,8 @@ export declare namespace ResponsePermission { DONOR = "DONOR", SCAN = "SCAN", STATION = "STATION", - CARD = "CARD" + CARD = "CARD", + DONATION = "DONATION" } enum action { GET = "GET", diff --git a/dist/models/ResponsePermission.js b/dist/models/ResponsePermission.js index 448dcb6..1d3fa71 100644 --- a/dist/models/ResponsePermission.js +++ b/dist/models/ResponsePermission.js @@ -20,6 +20,7 @@ var ResponsePermission; target["SCAN"] = "SCAN"; target["STATION"] = "STATION"; target["CARD"] = "CARD"; + target["DONATION"] = "DONATION"; })(target = ResponsePermission.target || (ResponsePermission.target = {})); let action; (function (action) { diff --git a/dist/models/ResponseUserPermissions.d.ts b/dist/models/ResponseUserPermissions.d.ts new file mode 100644 index 0000000..4a5ba88 --- /dev/null +++ b/dist/models/ResponseUserPermissions.d.ts @@ -0,0 +1,4 @@ +export declare type ResponseUserPermissions = { + directlyGranted?: Array; + inherited?: Array; +}; diff --git a/dist/models/ResponseUserPermissions.js b/dist/models/ResponseUserPermissions.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/ResponseUserPermissions.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/RunnerHasDistanceDonationsError.d.ts b/dist/models/RunnerHasDistanceDonationsError.d.ts new file mode 100644 index 0000000..1a24364 --- /dev/null +++ b/dist/models/RunnerHasDistanceDonationsError.d.ts @@ -0,0 +1,4 @@ +export declare type RunnerHasDistanceDonationsError = { + name: string; + message: string; +}; diff --git a/dist/models/RunnerHasDistanceDonationsError.js b/dist/models/RunnerHasDistanceDonationsError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/RunnerHasDistanceDonationsError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UpdateDistanceDonation.d.ts b/dist/models/UpdateDistanceDonation.d.ts new file mode 100644 index 0000000..4659ccf --- /dev/null +++ b/dist/models/UpdateDistanceDonation.d.ts @@ -0,0 +1,6 @@ +export declare type UpdateDistanceDonation = { + runner: number; + amountPerDistance: number; + id: number; + donor: number; +}; diff --git a/dist/models/UpdateDistanceDonation.js b/dist/models/UpdateDistanceDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UpdateDistanceDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UpdateDonation.d.ts b/dist/models/UpdateDonation.d.ts new file mode 100644 index 0000000..aea7bb1 --- /dev/null +++ b/dist/models/UpdateDonation.d.ts @@ -0,0 +1,4 @@ +export declare type UpdateDonation = { + id: number; + donor: number; +}; diff --git a/dist/models/UpdateDonation.js b/dist/models/UpdateDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UpdateDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UpdateFixedDonation.d.ts b/dist/models/UpdateFixedDonation.d.ts new file mode 100644 index 0000000..1f13ca0 --- /dev/null +++ b/dist/models/UpdateFixedDonation.d.ts @@ -0,0 +1,5 @@ +export declare type UpdateFixedDonation = { + amount: number; + id: number; + donor: number; +}; diff --git a/dist/models/UpdateFixedDonation.js b/dist/models/UpdateFixedDonation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UpdateFixedDonation.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UpdateUser.d.ts b/dist/models/UpdateUser.d.ts index b386cd0..15436ee 100644 --- a/dist/models/UpdateUser.d.ts +++ b/dist/models/UpdateUser.d.ts @@ -4,7 +4,7 @@ export declare type UpdateUser = { middlename?: string; lastname: string; username?: string; - email?: string; + email: string; phone?: string; password?: string; enabled: boolean; diff --git a/dist/models/UserEmailNeededError.d.ts b/dist/models/UserEmailNeededError.d.ts new file mode 100644 index 0000000..cc1859f --- /dev/null +++ b/dist/models/UserEmailNeededError.d.ts @@ -0,0 +1,4 @@ +export declare type UserEmailNeededError = { + name: string; + message: string; +}; diff --git a/dist/models/UserEmailNeededError.js b/dist/models/UserEmailNeededError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UserEmailNeededError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/models/UsernameContainsIllegalCharacterError.d.ts b/dist/models/UsernameContainsIllegalCharacterError.d.ts new file mode 100644 index 0000000..c707972 --- /dev/null +++ b/dist/models/UsernameContainsIllegalCharacterError.d.ts @@ -0,0 +1,4 @@ +export declare type UsernameContainsIllegalCharacterError = { + name: string; + message: string; +}; diff --git a/dist/models/UsernameContainsIllegalCharacterError.js b/dist/models/UsernameContainsIllegalCharacterError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UsernameContainsIllegalCharacterError.js @@ -0,0 +1,5 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/services/DonationService.d.ts b/dist/services/DonationService.d.ts new file mode 100644 index 0000000..f0a5bab --- /dev/null +++ b/dist/services/DonationService.d.ts @@ -0,0 +1,68 @@ +import type { CreateDistanceDonation } from '../models/CreateDistanceDonation'; +import type { CreateFixedDonation } from '../models/CreateFixedDonation'; +import type { ResponseDistanceDonation } from '../models/ResponseDistanceDonation'; +import type { ResponseDonation } from '../models/ResponseDonation'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { UpdateDistanceDonation } from '../models/UpdateDistanceDonation'; +import type { UpdateFixedDonation } from '../models/UpdateFixedDonation'; +export declare class DonationService { + /** + * Get all + * Lists all donations (fixed or distance based) from all donors.
This includes the donations's runner's distance ran(if distance donation). + * @returns any + * @throws ApiError + */ + static donationControllerGetAll(): Promise<(Array | Array)>; + /** + * Get one + * Lists all information about the donation whose id got provided. This includes the donation's runner's distance ran (if distance donation). + * @param id + * @returns any + * @throws ApiError + */ + static donationControllerGetOne(id: number): Promise<(ResponseDonation | ResponseDistanceDonation)>; + /** + * Remove + * Delete the donation whose id you provided.
If no donation with this id exists it will just return 204(no content). + * @param id + * @param force + * @returns any + * @returns ResponseEmpty + * @throws ApiError + */ + static donationControllerRemove(id: number, force?: boolean): Promise<(ResponseDonation | ResponseDistanceDonation) | ResponseEmpty>; + /** + * Post fixed + * Create a fixed donation (not distance donation - use /donations/distance instead).
Please rmemember to provide the donation's donors's id and amount. + * @param requestBody CreateFixedDonation + * @returns ResponseDonation + * @throws ApiError + */ + static donationControllerPostFixed(requestBody?: CreateFixedDonation): Promise; + /** + * Post distance + * Create a distance donation (not fixed donation - use /donations/fixed instead).
Please rmemember to provide the donation's donors's and runners ids and amount per distance (kilometer). + * @param requestBody CreateDistanceDonation + * @returns ResponseDistanceDonation + * @throws ApiError + */ + static donationControllerPostDistance(requestBody?: CreateDistanceDonation): Promise; + /** + * Put fixed + * Update the fixed donation (not distance donation - use /donations/distance instead) whose id you provided.
Please remember that ids can't be changed and amounts must be positive. + * @param id + * @param requestBody UpdateFixedDonation + * @returns ResponseDonation + * @throws ApiError + */ + static donationControllerPutFixed(id: number, requestBody?: UpdateFixedDonation): Promise; + /** + * Put distance + * Update the distance donation (not fixed donation - use /donations/fixed instead) whose id you provided.
Please remember that ids can't be changed and amountPerDistance must be positive. + * @param id + * @param requestBody UpdateDistanceDonation + * @returns ResponseDonation + * @throws ApiError + */ + static donationControllerPutDistance(id: number, requestBody?: UpdateDistanceDonation): Promise; +} diff --git a/dist/services/DonationService.js b/dist/services/DonationService.js new file mode 100644 index 0000000..6fc8564 --- /dev/null +++ b/dist/services/DonationService.js @@ -0,0 +1,115 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DonationService = void 0; +const request_1 = require("../core/request"); +class DonationService { + /** + * Get all + * Lists all donations (fixed or distance based) from all donors.
This includes the donations's runner's distance ran(if distance donation). + * @returns any + * @throws ApiError + */ + static async donationControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/donations`, + }); + return result.body; + } + /** + * Get one + * Lists all information about the donation whose id got provided. This includes the donation's runner's distance ran (if distance donation). + * @param id + * @returns any + * @throws ApiError + */ + static async donationControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/donations/${id}`, + }); + return result.body; + } + /** + * Remove + * Delete the donation whose id you provided.
If no donation with this id exists it will just return 204(no content). + * @param id + * @param force + * @returns any + * @returns ResponseEmpty + * @throws ApiError + */ + static async donationControllerRemove(id, force) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/donations/${id}`, + query: { + 'force': force, + }, + }); + return result.body; + } + /** + * Post fixed + * Create a fixed donation (not distance donation - use /donations/distance instead).
Please rmemember to provide the donation's donors's id and amount. + * @param requestBody CreateFixedDonation + * @returns ResponseDonation + * @throws ApiError + */ + static async donationControllerPostFixed(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/donations/fixed`, + body: requestBody, + }); + return result.body; + } + /** + * Post distance + * Create a distance donation (not fixed donation - use /donations/fixed instead).
Please rmemember to provide the donation's donors's and runners ids and amount per distance (kilometer). + * @param requestBody CreateDistanceDonation + * @returns ResponseDistanceDonation + * @throws ApiError + */ + static async donationControllerPostDistance(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/donations/distance`, + body: requestBody, + }); + return result.body; + } + /** + * Put fixed + * Update the fixed donation (not distance donation - use /donations/distance instead) whose id you provided.
Please remember that ids can't be changed and amounts must be positive. + * @param id + * @param requestBody UpdateFixedDonation + * @returns ResponseDonation + * @throws ApiError + */ + static async donationControllerPutFixed(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/donations/fixed/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Put distance + * Update the distance donation (not fixed donation - use /donations/fixed instead) whose id you provided.
Please remember that ids can't be changed and amountPerDistance must be positive. + * @param id + * @param requestBody UpdateDistanceDonation + * @returns ResponseDonation + * @throws ApiError + */ + static async donationControllerPutDistance(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/donations/distance/${id}`, + body: requestBody, + }); + return result.body; + } +} +exports.DonationService = DonationService; diff --git a/dist/services/DonorService.d.ts b/dist/services/DonorService.d.ts index bb7b29d..3a521a2 100644 --- a/dist/services/DonorService.d.ts +++ b/dist/services/DonorService.d.ts @@ -5,14 +5,14 @@ import type { UpdateDonor } from '../models/UpdateDonor'; export declare class DonorService { /** * Get all - * Lists all runners from all teams/orgs.
This includes the runner's group and distance ran. + * Lists all donor.
This includes the donor's current donation amount. * @returns ResponseDonor * @throws ApiError */ static donorControllerGetAll(): Promise>; /** * Post - * Create a new runner.
Please remeber to provide the runner's group's id. + * Create a new donor. * @param requestBody CreateDonor * @returns ResponseDonor * @throws ApiError @@ -20,7 +20,7 @@ export declare class DonorService { static donorControllerPost(requestBody?: CreateDonor): Promise; /** * Get one - * Lists all information about the runner whose id got provided. + * Lists all information about the donor whose id got provided.
This includes the donor's current donation amount. * @param id * @returns ResponseDonor * @throws ApiError @@ -28,7 +28,7 @@ export declare class DonorService { static donorControllerGetOne(id: number): Promise; /** * Put - * Update the runner whose id you provided.
Please remember that ids can't be changed. + * Update the donor whose id you provided.
Please remember that ids can't be changed. * @param id * @param requestBody UpdateDonor * @returns ResponseDonor @@ -37,7 +37,7 @@ export declare class DonorService { static donorControllerPut(id: number, requestBody?: UpdateDonor): Promise; /** * Remove - * Delete the runner whose id you provided.
If no runner with this id exists it will just return 204(no content). + * Delete the donor whose id you provided.
If no donor with this id exists it will just return 204(no content).
If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations. * @param id * @param force * @returns ResponseDonor diff --git a/dist/services/DonorService.js b/dist/services/DonorService.js index 7acc82b..e5e4d47 100644 --- a/dist/services/DonorService.js +++ b/dist/services/DonorService.js @@ -5,7 +5,7 @@ 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. + * Lists all donor.
This includes the donor's current donation amount. * @returns ResponseDonor * @throws ApiError */ @@ -18,7 +18,7 @@ class DonorService { } /** * Post - * Create a new runner.
Please remeber to provide the runner's group's id. + * Create a new donor. * @param requestBody CreateDonor * @returns ResponseDonor * @throws ApiError @@ -33,7 +33,7 @@ class DonorService { } /** * Get one - * Lists all information about the runner whose id got provided. + * Lists all information about the donor whose id got provided.
This includes the donor's current donation amount. * @param id * @returns ResponseDonor * @throws ApiError @@ -47,7 +47,7 @@ class DonorService { } /** * Put - * Update the runner whose id you provided.
Please remember that ids can't be changed. + * Update the donor whose id you provided.
Please remember that ids can't be changed. * @param id * @param requestBody UpdateDonor * @returns ResponseDonor @@ -63,7 +63,7 @@ class DonorService { } /** * Remove - * Delete the runner whose id you provided.
If no runner with this id exists it will just return 204(no content). + * Delete the donor whose id you provided.
If no donor with this id exists it will just return 204(no content).
If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations. * @param id * @param force * @returns ResponseDonor diff --git a/dist/services/StatusService.d.ts b/dist/services/StatusService.d.ts index 7112de9..b923096 100644 --- a/dist/services/StatusService.d.ts +++ b/dist/services/StatusService.d.ts @@ -6,4 +6,11 @@ export declare class StatusService { * @throws ApiError */ static statusControllerGet(): Promise; + /** + * Get version + * A very basic endpoint that just returns the curent package version. + * @returns any Successful response + * @throws ApiError + */ + static statusControllerGetVersion(): Promise; } diff --git a/dist/services/StatusService.js b/dist/services/StatusService.js index 23edbb8..c4709ae 100644 --- a/dist/services/StatusService.js +++ b/dist/services/StatusService.js @@ -19,5 +19,18 @@ class StatusService { }); return result.body; } + /** + * Get version + * A very basic endpoint that just returns the curent package version. + * @returns any Successful response + * @throws ApiError + */ + static async statusControllerGetVersion() { + const result = await request_1.request({ + method: 'GET', + path: `/api/version`, + }); + return result.body; + } } exports.StatusService = StatusService; diff --git a/dist/services/UserService.d.ts b/dist/services/UserService.d.ts index d82b70a..b1208b3 100644 --- a/dist/services/UserService.d.ts +++ b/dist/services/UserService.d.ts @@ -2,11 +2,10 @@ import type { CreateUser } from '../models/CreateUser'; import type { ResponseEmpty } from '../models/ResponseEmpty'; import type { ResponseUser } from '../models/ResponseUser'; import type { UpdateUser } from '../models/UpdateUser'; -import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError'; export declare class UserService { /** * Get all - * Lists all users.
This includes their groups and permissions directly granted to them (if existing/associated). + * Lists all users.
This includes their groups and permissions granted to them. * @returns ResponseUser * @throws ApiError */ @@ -15,13 +14,13 @@ export declare class UserService { * Post * Create a new user.
If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user. * @param requestBody CreateUser - * @returns any + * @returns ResponseUser * @throws ApiError */ - static userControllerPost(requestBody?: CreateUser): Promise<(ResponseUser | UserGroupNotFoundError)>; + static userControllerPost(requestBody?: CreateUser): Promise; /** * Get one - * Lists all information about the user whose id got provided.
Please remember that only permissions granted directly to the user will show up here, not permissions inherited from groups. + * Lists all information about the user whose id got provided.
Please remember that all permissions granted to the user will show up here. * @param id * @returns ResponseUser * @throws ApiError @@ -46,4 +45,12 @@ export declare class UserService { * @throws ApiError */ static userControllerRemove(id: number, force?: boolean): Promise; + /** + * Get permissions + * Lists all permissions granted to the user sorted into directly granted and inherited as permission response objects. + * @param id + * @returns ResponseUser + * @throws ApiError + */ + static userControllerGetPermissions(id: number): Promise; } diff --git a/dist/services/UserService.js b/dist/services/UserService.js index d6eb37f..f3abbe0 100644 --- a/dist/services/UserService.js +++ b/dist/services/UserService.js @@ -5,7 +5,7 @@ const request_1 = require("../core/request"); class UserService { /** * Get all - * Lists all users.
This includes their groups and permissions directly granted to them (if existing/associated). + * Lists all users.
This includes their groups and permissions granted to them. * @returns ResponseUser * @throws ApiError */ @@ -20,7 +20,7 @@ class UserService { * Post * Create a new user.
If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user. * @param requestBody CreateUser - * @returns any + * @returns ResponseUser * @throws ApiError */ static async userControllerPost(requestBody) { @@ -33,7 +33,7 @@ class UserService { } /** * Get one - * Lists all information about the user whose id got provided.
Please remember that only permissions granted directly to the user will show up here, not permissions inherited from groups. + * Lists all information about the user whose id got provided.
Please remember that all permissions granted to the user will show up here. * @param id * @returns ResponseUser * @throws ApiError @@ -80,5 +80,19 @@ class UserService { }); return result.body; } + /** + * Get permissions + * Lists all permissions granted to the user sorted into directly granted and inherited as permission response objects. + * @param id + * @returns ResponseUser + * @throws ApiError + */ + static async userControllerGetPermissions(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/users/${id}/permissions`, + }); + return result.body; + } } exports.UserService = UserService; diff --git a/openapi.json b/openapi.json index 9a79440..529ba7a 100644 --- a/openapi.json +++ b/openapi.json @@ -1 +1 @@ -{"components":{"schemas":{"IllegalJWTError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNonexistantOrRefreshtokenInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"InvalidCredentialsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"NoPermissionError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UsernameOrEmailNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PasswordNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"JwtNotProvidedError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNotFoundOrRefreshTokenCountInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RefreshTokenCountInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResetAlreadyRequestedError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserDisabledError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"JwtUser":{"properties":{"id":{"type":"integer"},"uuid":{"format":"uuid","type":"string"},"email":{"format":"email","type":"string"},"username":{"type":"string"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"enabled":{"type":"boolean"},"refreshTokenCount":{"minLength":1,"type":"integer"},"profilePic":{"type":"string"}},"type":"object","required":["id","uuid","firstname","lastname","enabled","refreshTokenCount"]},"ResponsePrincipal":{"properties":{"id":{"type":"integer"}},"type":"object","required":["id"]},"ResponseUser":{"properties":{"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"username":{"type":"string"},"enabled":{"type":"boolean"},"profilePic":{"type":"string"},"groups":{"items":{},"type":"array"},"permissions":{"items":{},"type":"array"},"id":{"type":"integer"}},"type":"object","required":["firstname","middlename","lastname","phone","email","username","enabled","profilePic","id"]},"ResponsePermission":{"properties":{"id":{"type":"integer"},"principal":{"minLength":1,"type":"object"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION","STATSCLIENT","DONOR","SCAN","STATION","CARD"],"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string","minLength":1}},"type":"object","required":["id","principal","target","action"]},"Permission":{"properties":{"id":{"type":"integer"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION","STATSCLIENT","DONOR","SCAN","STATION","CARD"],"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string"}},"type":"object","required":["id","target","action"]},"Principal":{"properties":{"id":{"type":"integer"}},"type":"object","required":["id"]},"UserAction":{"properties":{"id":{"type":"integer"},"target":{"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string"},"changed":{"type":"string"}},"type":"object","required":["id","target","action"]},"ResponseUserGroup":{"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"permissions":{"items":{},"type":"array"},"id":{"type":"integer"}},"type":"object","required":["name","id"]},"UserGroup":{"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"id":{"type":"integer"}},"type":"object","required":["name","id"]},"User":{"properties":{"uuid":{"format":"uuid","type":"string"},"email":{"format":"email","type":"string"},"phone":{"type":"string"},"username":{"type":"string"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"password":{"minLength":1,"type":"string"},"groups":{},"enabled":{"type":"boolean"},"refreshTokenCount":{"type":"integer"},"profilePic":{"format":"url","type":"string"},"resetRequestedTimestamp":{"type":"string"},"actions":{},"id":{"type":"integer"}},"type":"object","required":["uuid","email","username","firstname","lastname","password","enabled","refreshTokenCount","profilePic","id"]},"UserIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseAuth":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"access_token_expires_at":{"type":"integer"},"refresh_token_expires_at":{"type":"integer"}},"type":"object","required":["access_token","refresh_token","access_token_expires_at","refresh_token_expires_at"]},"CreateAuth":{"properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":1}},"type":"object","required":["password"]},"CreateResetToken":{"properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"}},"type":"object"},"Logout":{"properties":{"timestamp":{"type":"string"}},"type":"object","required":["timestamp"]},"HandleLogout":{"properties":{"token":{"type":"string"}},"type":"object"},"RefreshAuth":{"properties":{"token":{"type":"string"}},"type":"object"},"ResetPassword":{"properties":{"resetToken":{"type":"string"},"password":{"type":"string","minLength":1}},"type":"object","required":["password"]},"DonorNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"DonorIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"DonorReceiptAddressNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseParticipant":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["id","firstname","middlename","lastname","phone","email"]},"ResponseDonor":{"properties":{"receiptNeeded":{"type":"boolean"},"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["receiptNeeded","id","firstname","middlename","lastname","phone","email"]},"Donation":{"properties":{"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["id","donor"]},"Address":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"address1":{"minLength":1,"type":"string"},"address2":{"type":"string"},"postalcode":{"type":"string","minLength":1},"city":{"minLength":1,"type":"string"},"country":{"minLength":1,"type":"string"}},"type":"object","required":["id","address1","postalcode","city","country"]},"Participant":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["id","firstname","lastname"]},"Donor":{"properties":{"receiptNeeded":{"type":"boolean"},"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["receiptNeeded","id","firstname","lastname"]},"AddressWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"AddressNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateParticipant":{"properties":{"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["firstname","lastname"]},"CreateDonor":{"properties":{"receiptNeeded":{"type":"boolean"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["firstname","lastname"]},"UpdateDonor":{"properties":{"id":{"type":"integer"},"receiptNeeded":{"type":"boolean"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["id","firstname","lastname"]},"ResponseEmpty":{"properties":{"response":{"type":"string"}},"type":"object","required":["response"]},"RunnerNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerGroupNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerGroupNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationHasRunnersError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationHasTeamsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseRunner":{"properties":{"distance":{"type":"integer"},"group":{"type":"object"},"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["distance","group","id","firstname","middlename","lastname","phone","email"]},"DistanceDonation":{"properties":{"runner":{"minLength":1,"type":"string"},"amountPerDistance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["runner","amountPerDistance","id","donor"]},"RunnerCardNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerCardIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerCardHasScansError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerCardIdOutOfRangeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseRunnerCard":{"properties":{"id":{"type":"integer"},"runner":{"type":"object"},"code":{"minLength":1,"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id","runner","code","enabled"]},"ResponseScan":{"properties":{"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","runner","valid","distance"]},"TrackNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"TrackIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"TrackLapTimeCantBeNegativeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"TrackHasScanStationsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseTrack":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["id","name","distance"]},"ResponseScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"key":{"type":"string"},"prefix":{"minLength":1,"type":"string"},"track":{"minLength":1,"type":"object"},"enabled":{"type":"boolean"}},"type":"object","required":["id","prefix","track","enabled"]},"ResponseTrackScan":{"properties":{"track":{"minLength":1,"type":"string"},"card":{"minLength":1,"type":"string"},"station":{"minLength":1,"type":"string"},"timestamp":{"minLength":1,"type":"string","pattern":"d{4}-[01]d-[0-3]dT[0-2]d:[0-5]d:[0-5]d.d+Z?"},"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["track","card","station","timestamp","id","runner","valid","distance"]},"Scan":{"properties":{"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"_distance":{"type":"integer"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","runner","valid","_distance","distance"]},"Track":{"properties":{"id":{"type":"integer"},"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["id","name","distance"]},"ScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"track":{"minLength":1,"type":"string"},"prefix":{"type":"string"},"key":{"type":"string","minLength":1},"cleartextkey":{"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id","track","prefix","key","enabled"]},"TrackScan":{"properties":{"track":{"minLength":1,"type":"string"},"card":{"minLength":1,"type":"string"},"station":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"timestamp":{"type":"integer"},"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"_distance":{"type":"integer"}},"type":"object","required":["track","card","station","distance","timestamp","id","runner","valid","_distance"]},"RunnerCard":{"properties":{"id":{"type":"integer"},"runner":{},"enabled":{"type":"boolean"}},"type":"object","required":["id","enabled"]},"Runner":{"properties":{"group":{"minLength":1,"type":"string"},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"},"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["group","distance","distanceDonationAmount","id","firstname","lastname"]},"RunnerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"}},"type":"object","required":["id","name","distance","distanceDonationAmount"]},"GroupContact":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"address":{},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["id","firstname","lastname"]},"ResponseRunnerGroup":{"properties":{"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"type":"object"}},"type":"object","required":["id","name"]},"ResponseRunnerOrganisation":{"properties":{"address":{"type":"object"},"teams":{"items":{},"type":"array"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"type":"object"}},"type":"object","required":["teams","id","name"]},"ResponseRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"object"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"type":"object"}},"type":"object","required":["parentGroup","id","name"]},"RunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string"},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"}},"type":"object","required":["parentGroup","id","name","distance","distanceDonationAmount"]},"RunnerOrganisation":{"properties":{"address":{},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["distance","distanceDonationAmount","id","name"]},"RunnerTeamNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamHasRunnersError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamNeedsParentError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateRunner":{"properties":{"group":{"type":"integer"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["group","firstname","lastname"]},"ImportRunner":{"properties":{"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"team":{"type":"string"},"class":{"type":"string"}},"type":"object","required":["firstname","lastname"]},"UpdateRunner":{"properties":{"id":{"type":"integer"},"group":{"type":"object"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["id","group","firstname","lastname"]},"CreateRunnerCard":{"properties":{"runner":{"type":"integer"},"enabled":{"type":"boolean"}},"type":"object","required":["enabled"]},"UpdateRunnerCard":{"properties":{"id":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"runner":{"type":"integer"},"enabled":{"type":"boolean"}},"type":"object","required":["id","enabled"]},"ScanNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanStationNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanStationIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanStationHasScansError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateScan":{"properties":{"runner":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["runner","distance"]},"CreateTrackScan":{"properties":{"card":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"station":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["card","station"]},"UpdateScan":{"properties":{"id":{"type":"integer"},"runner":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","runner","distance"]},"UpdateTrackScan":{"properties":{"id":{"type":"integer"},"runner":{"type":"integer"},"valid":{"type":"boolean"},"station":{"type":"integer"}},"type":"object","required":["id"]},"PermissionNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PermissionIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PermissionNeedsPrincipalError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PrincipalNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PrincipalWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreatePermission":{"properties":{"principal":{"minLength":1,"type":"integer"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION","STATSCLIENT","DONOR","SCAN","STATION","CARD"],"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string","minLength":1}},"type":"object","required":["principal","target","action"]},"UpdatePermission":{"properties":{"id":{"type":"integer"},"principal":{"minLength":1,"type":"object"},"target":{"minLength":1,"type":"string"},"action":{"minLength":1,"type":"string"}},"type":"object","required":["id","principal","target","action"]},"GroupContactWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"GroupContactNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateRunnerGroup":{"properties":{"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["name"]},"CreateRunnerOrganisation":{"properties":{"address":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["name"]},"UpdateRunnerOrganisation":{"properties":{"id":{"type":"integer"},"address":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["id","name"]},"CreateRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["parentGroup","name"]},"UpdateRunnerTeam":{"properties":{"id":{"type":"integer"},"parentGroup":{"minLength":1,"type":"object"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["id","parentGroup","name"]},"CreateScanStation":{"properties":{"description":{"type":"string"},"track":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"enabled":{"type":"boolean"}},"type":"object","required":["track"]},"UpdateScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id"]},"StatsClientNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"StatsClientIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseStatsClient":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"key":{"type":"string"},"prefix":{"minLength":1,"type":"string"}},"type":"object","required":["id","prefix"]},"StatsClient":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"prefix":{"type":"string"},"key":{"type":"string"},"cleartextkey":{"type":"string"}},"type":"object","required":["id","prefix","key"]},"CreateStatsClient":{"properties":{"description":{"type":"string"}},"type":"object"},"ResponseStats":{"properties":{"total_runners":{"type":"integer"},"total_teams":{"type":"integer"},"total_orgs":{"type":"integer"},"total_users":{"type":"integer"},"total_scans":{"type":"integer"},"total_distance":{"type":"integer"},"total_donation":{"type":"integer"},"average_distance":{"type":"integer"}},"type":"object","required":["total_runners","total_teams","total_orgs","total_users","total_scans","total_distance","total_donation","average_distance"]},"ResponseStatsOrgnisation":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"type":"integer"},"donationAmount":{"type":"integer"}},"type":"object","required":["id","name","distance","donationAmount"]},"ResponseStatsRunner":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"distance":{"type":"integer"},"donationAmount":{"type":"integer"},"group":{"type":"object"}},"type":"object","required":["id","firstname","middlename","lastname","distance","donationAmount","group"]},"ResponseStatsTeam":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"type":"integer"},"donationAmount":{"type":"integer"},"parent":{"type":"object"}},"type":"object","required":["id","name","distance","donationAmount","parent"]},"CreateTrack":{"properties":{"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["name","distance"]},"UpdateTrack":{"properties":{"id":{"type":"integer"},"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["id","name","distance"]},"GroupNameNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserGroupNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserGroupIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateUser":{"properties":{"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"groups":{},"profilePic":{"format":"url","type":"string"}},"type":"object","required":["firstname","lastname","password"]},"UpdateUser":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"groups":{},"profilePic":{"format":"url","type":"string"}},"type":"object","required":["id","firstname","lastname","enabled"]},"CreateUserGroup":{"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["name"]},"UpdateUserGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["id","name"]}},"securitySchemes":{"AuthToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A JWT based access token. Use /api/auth/login or /api/auth/refresh to get one."},"RefreshTokenCookie":{"type":"apiKey","in":"cookie","name":"lfk_backend__refresh_token","description":"A cookie containing a JWT based refreh token. Attention: Doesn't work in swagger-ui. Use /api/auth/login or /api/auth/refresh to get one."},"StatsApiToken":{"type":"http","scheme":"bearer","description":"Api token that can be obtained by creating a new stats client (post to /api/statsclients). Only valid for obtaining stats."},"StationApiToken":{"type":"http","scheme":"bearer","description":"Api token that can be obtained by creating a new scan station (post to /api/stations). Only valid for creating scans."}}},"info":{"title":"LfK! Backend API","version":"0.0.11","description":"The the backend API for the LfK! runner system."},"openapi":"3.0.0","paths":{"/api/auth/login":{"post":{"operationId":"AuthController.login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuth"}}},"description":"CreateAuth","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"},{"$ref":"#/components/schemas/PasswordNeededError"},{"$ref":"#/components/schemas/InvalidCredentialsError"}]}}},"description":""}},"summary":"Login","tags":["Auth"],"description":"Login with your username/email and password.
You will receive: \n * access token (use it as a bearer token) \n * refresh token (will also be sent as a cookie)"}},"/api/auth/logout":{"post":{"operationId":"AuthController.logout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleLogout"}}},"description":"HandleLogout","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Logout"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"},{"$ref":"#/components/schemas/PasswordNeededError"},{"$ref":"#/components/schemas/InvalidCredentialsError"}]}}},"description":""}},"summary":"Logout","tags":["Auth"],"description":"Logout using your refresh token.
This instantly invalidates all your access and refresh tokens.","security":[{"RefreshTokenCookie":[]}]}},"/api/auth/refresh":{"post":{"operationId":"AuthController.refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshAuth"}}},"description":"RefreshAuth","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/JwtNotProvidedError"},{"$ref":"#/components/schemas/IllegalJWTError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/RefreshTokenCountInvalidError"}]}}},"description":""}},"summary":"Refresh","tags":["Auth"],"description":"Refresh your access and refresh tokens using a valid refresh token.
You will receive: \n * access token (use it as a bearer token) \n * refresh token (will also be sent as a cookie)","security":[{"RefreshTokenCookie":[]}]}},"/api/auth/reset":{"post":{"operationId":"AuthController.getResetToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResetToken"}}},"description":"CreateResetToken","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"}]}}},"description":""}},"summary":"Get reset token","tags":["Auth"],"description":"Request a password reset token.
This will provide you with a reset token that you can use by posting to /api/auth/reset/{token}."}},"/api/auth/reset/{token}":{"post":{"operationId":"AuthController.resetPassword","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPassword"}}},"description":"ResetPassword","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"}]}}},"description":""}},"summary":"Reset password","tags":["Auth"],"description":"Reset a user's utilising a valid password reset token.
This will set the user's password to the one you provided in the body.
To get a reset token post to /api/auth/reset with your username."}},"/api/donors":{"get":{"operationId":"DonorController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseDonor"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all runners from all teams/orgs.
This includes the runner's group and distance ran."},"post":{"operationId":"DonorController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDonor"}}},"description":"CreateDonor","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""}},"summary":"Post","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new runner.
Please remeber to provide the runner's group's id."}},"/api/donors/{id}":{"get":{"operationId":"DonorController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the runner whose id got provided."},"put":{"operationId":"DonorController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDonor"}}},"description":"UpdateDonor","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the runner whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"DonorController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the runner whose id you provided.
If no runner with this id exists it will just return 204(no content)."}},"/api/scans":{"get":{"operationId":"ScanController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/ResponseScan"},"type":"array"},{"items":{"$ref":"#/components/schemas/ResponseTrackScan"},"type":"array"}]}}},"description":""}},"summary":"Get all","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all scans (normal or track) from all runners.
This includes the scan's runner's distance ran."},"post":{"operationId":"ScanController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScan"}}},"description":"CreateScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Post","tags":["Scan"],"security":[{"AuthToken":[],"ScanApiToken":[]},{"RefreshTokenCookie":[],"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new scan (not track scan - use /scans/trackscans instead).
Please rmemember to provide the scan's runner's id and distance."}},"/api/scans/{id}":{"get":{"operationId":"ScanController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseScan"},{"$ref":"#/components/schemas/ResponseTrackScan"}]}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the scan whose id got provided. This includes the scan's runner's distance ran."},"put":{"operationId":"ScanController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScan"}}},"description":"UpdateScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScanNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the scan (not track scan use /scans/trackscans/:id instead) whose id you provided.
Please remember that ids can't be changed and distances must be positive."},"delete":{"operationId":"ScanController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScan"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the scan whose id you provided.
If no scan with this id exists it will just return 204(no content)."}},"/api/scans/trackscans":{"post":{"operationId":"ScanController.postTrackScans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrackScan"}}},"description":"CreateTrackScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrackScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Post track scans","tags":["Scan"],"security":[{"AuthToken":[],"ScanApiToken":[]},{"RefreshTokenCookie":[],"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new track scan (for \"normal\" scans use /scans instead).
Please remember that to provide the scan's card's station's id."}},"/api/scans/trackscans/{id}":{"put":{"operationId":"ScanController.putTrackScan","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTrackScan"}}},"description":"UpdateTrackScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrackScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScanNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"},{"$ref":"#/components/schemas/ScanStationNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanIdsNotMatchingError"}}},"description":""}},"summary":"Put track scan","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the track scan (not \"normal\" scan use /scans/trackscans/:id instead) whose id you provided.
Please remember that only the validity, runner and track can be changed."}},"/api/cards":{"get":{"operationId":"RunnerCardController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerCard"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all card."},"post":{"operationId":"RunnerCardController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerCard"}}},"description":"CreateRunnerCard","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Post","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new card.
You can provide a associated runner by id but you don't have to."}},"/api/cards/{id}":{"get":{"operationId":"RunnerCardController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerCardNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the card whose id got provided."},"put":{"operationId":"RunnerCardController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunnerCard"}}},"description":"UpdateRunnerCard","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RunnerCardNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerCardIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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."},"delete":{"operationId":"RunnerCardController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerCardHasScansError"}}},"description":""}},"summary":"Remove","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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)."}},"/api/runners":{"get":{"operationId":"RunnerController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all runners from all teams/orgs.
This includes the runner's group and distance ran."},"post":{"operationId":"RunnerController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunner"}}},"description":"CreateRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseRunner"},{"$ref":"#/components/schemas/RunnerGroupNeededError"},{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new runner.
Please remeber to provide the runner's group's id."}},"/api/runners/{id}":{"get":{"operationId":"RunnerController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the runner whose id got provided."},"put":{"operationId":"RunnerController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunner"}}},"description":"UpdateRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the runner whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"RunnerController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the runner whose id you provided.
This will also delete all scans and cards associated with the runner.
If no runner with this id exists it will just return 204(no content)."}},"/api/runners/import":{"post":{"operationId":"ImportController.postJSON","parameters":[{"in":"query","name":"group","required":false,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportRunner"},"type":"array"}}},"description":"ImportRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post json","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from json and insert them into the provided group.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/organisations/{id}/import":{"post":{"operationId":"ImportController.postOrgsJSON","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportRunner"},"type":"array"}}},"description":"ImportRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post orgs json","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from json and insert them into the provided org.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/teams/{id}/import":{"post":{"operationId":"ImportController.postTeamsJSON","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportRunner"},"type":"array"}}},"description":"ImportRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post teams json","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from json and insert them into the provided team"}},"/api/runners/import/csv":{"post":{"operationId":"ImportController.postCSV","parameters":[{"in":"query","name":"group","required":false,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post csv","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from csv and insert them into the provided group.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/organisations/{id}/import/csv":{"post":{"operationId":"ImportController.postOrgsCSV","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post orgs csv","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from csv and insert them into the provided org.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/teams/{id}/import/csv":{"post":{"operationId":"ImportController.postTeamsCSV","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post teams csv","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from csv and insert them into the provided team"}},"/api/permissions":{"get":{"operationId":"PermissionController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponsePermission"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all permissions for all users and groups."},"post":{"operationId":"PermissionController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePermission"}}},"description":"CreatePermission","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePermission"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalNotFoundError"}}},"description":""}},"summary":"Post","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new permission for a existing principal(user/group).
If a permission with this target, action and prinicpal already exists that permission will be returned instead of creating a new one."}},"/api/permissions/{id}":{"get":{"operationId":"PermissionController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePermission"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the permission whose id got provided."},"put":{"operationId":"PermissionController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermission"}}},"description":"UpdatePermission","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePrincipal"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PermissionNotFoundError"},{"$ref":"#/components/schemas/PrincipalNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PermissionIdsNotMatchingError"},{"$ref":"#/components/schemas/PermissionNeedsPrincipalError"}]}}},"description":""}},"summary":"Put","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update a permission object.
If updateing the permission object would result in duplicate permission (same target, action and principal) this permission will get deleted and the existing permission will be returned.
Please remember that ids can't be changed."},"delete":{"operationId":"PermissionController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePermission"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Deletes the permission whose id you provide.
If no permission with this id exists it will just return 204(no content)."}},"/api/teams":{"get":{"operationId":"RunnerTeamController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerTeam"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all teams.
This includes their parent organisation and contact (if existing/associated)."},"post":{"operationId":"RunnerTeamController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerTeam"}}},"description":"CreateRunnerTeam","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""}},"summary":"Post","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new organsisation.
Please remember to provide it's parent group's id."}},"/api/teams/{id}":{"get":{"operationId":"RunnerTeamController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the team whose id got provided."},"put":{"operationId":"RunnerTeamController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunnerTeam"}}},"description":"UpdateRunnerTeam","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the team whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"RunnerTeamController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamHasRunnersError"}}},"description":""}},"summary":"Remove","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the team whose id you provided.
If the team still has runners associated this will fail.
To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while).
If no team with this id exists it will just return 204(no content)."}},"/api/organisations":{"get":{"operationId":"RunnerOrganisationController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all organisations.
This includes their address, contact and teams (if existing/associated)."},"post":{"operationId":"RunnerOrganisationController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerOrganisation"}}},"description":"CreateRunnerOrganisation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""}},"summary":"Post","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new organsisation."}},"/api/organisations/{id}":{"get":{"operationId":"RunnerOrganisationController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the organisation whose id got provided."},"put":{"operationId":"RunnerOrganisationController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunnerOrganisation"}}},"description":"UpdateRunnerOrganisation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the organisation whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"RunnerOrganisationController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RunnerOrganisationHasTeamsError"},{"$ref":"#/components/schemas/RunnerOrganisationHasRunnersError"}]}}},"description":""}},"summary":"Remove","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the organsisation whose id you provided.
If the organisation still has runners and/or teams associated this will fail.
To delete the organisation with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while).
If no organisation with this id exists it will just return 204(no content)."}},"/api/stations":{"get":{"operationId":"ScanStationController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseScanStation"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all stations.
This includes their associated tracks."},"post":{"operationId":"ScanStationController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScanStation"}}},"description":"CreateScanStation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""}},"summary":"Post","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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."}},"/api/stations/{id}":{"get":{"operationId":"ScanStationController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the station whose id got provided.
This includes it's associated track."},"put":{"operationId":"ScanStationController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScanStation"}}},"description":"UpdateScanStation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the station whose id you provided.
Please remember that only the description and enabled state can be changed."},"delete":{"operationId":"ScanStationController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationHasScansError"}}},"description":""}},"summary":"Remove","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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)."}},"/api/statsclients":{"get":{"operationId":"StatsClientController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsClient"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all stats clients. Please remember that the key can only be viewed on creation."},"post":{"operationId":"StatsClientController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStatsClient"}}},"description":"CreateStatsClient","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStatsClient"}}},"description":""}},"summary":"Post","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new stats client.
Please remember that the client's key will be generated automaticly and that it can only be viewed on creation."}},"/api/statsclients/{id}":{"get":{"operationId":"StatsClientController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStatsClient"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsClientNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the stats client whose id got provided. Please remember that the key can only be viewed on creation."},"delete":{"operationId":"StatsClientController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStatsClient"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the stats client whose id you provided.
If no client with this id exists it will just return 204(no content)."}},"/api/stats":{"get":{"operationId":"StatsController.get","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStats"}}},"description":""}},"summary":"Get","tags":["Stats"],"description":"A very basic stats endpoint providing basic counters for a dashboard or simmilar"}},"/api/stats/runners/distance":{"get":{"operationId":"StatsController.getTopRunnersByDistance","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsRunner"},"type":"array"}}},"description":""}},"summary":"Get top runners by distance","tags":["Stats"],"description":"Returns the top ten runners by distance.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/runners/donations":{"get":{"operationId":"StatsController.getTopRunnersByDonations","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsRunner"},"type":"array"}}},"description":""}},"summary":"Get top runners by donations","tags":["Stats"],"description":"Returns the top ten runners by donations.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/scans":{"get":{"operationId":"StatsController.getTopRunnersByTrackTime","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsRunner"},"type":"array"}}},"description":""}},"summary":"Get top runners by track time","tags":["Stats"],"description":"Returns the top ten fastest track times (with their runner and the runner's group).","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/teams/distance":{"get":{"operationId":"StatsController.getTopTeamsByDistance","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsTeam"},"type":"array"}}},"description":""}},"summary":"Get top teams by distance","tags":["Stats"],"description":"Returns the top ten teams by distance.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/teams/donations":{"get":{"operationId":"StatsController.getTopTeamsByDonations","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsTeam"},"type":"array"}}},"description":""}},"summary":"Get top teams by donations","tags":["Stats"],"description":"Returns the top ten teams by donations.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/organisations/distance":{"get":{"operationId":"StatsController.getTopOrgsByDistance","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsOrgnisation"},"type":"array"}}},"description":""}},"summary":"Get top orgs by distance","tags":["Stats"],"description":"Returns the top ten organisations by distance.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/organisations/donations":{"get":{"operationId":"StatsController.getTopOrgsByDonations","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsOrgnisation"},"type":"array"}}},"description":""}},"summary":"Get top orgs by donations","tags":["Stats"],"description":"Returns the top ten organisations by donations.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/status":{"get":{"operationId":"StatusController.get","responses":{"200":{"content":{"application/json":{}},"description":"Successful response"}},"summary":"Get","tags":["Status"],"description":"A very basic status/health endpoint that just checks if the database connection is available.
The available information depth will be expanded later."}},"/api/tracks":{"get":{"operationId":"TrackController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseTrack"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all tracks."},"post":{"operationId":"TrackController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrack"}}},"description":"CreateTrack","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackLapTimeCantBeNegativeError"}}},"description":""}},"summary":"Post","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new track.
Please remember that the track's distance must be greater than 0."}},"/api/tracks/{id}":{"get":{"operationId":"TrackController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the track whose id got provided."},"put":{"operationId":"TrackController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTrack"}}},"description":"UpdateTrack","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TrackIdsNotMatchingError"},{"$ref":"#/components/schemas/TrackLapTimeCantBeNegativeError"}]}}},"description":""}},"summary":"Put","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the track whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"TrackController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the track whose id you provided.
If no track with this id exists it will just return 204(no content)."}},"/api/users":{"get":{"operationId":"UserController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseUser"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all users.
This includes their groups and permissions directly granted to them (if existing/associated)."},"post":{"operationId":"UserController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUser"}}},"description":"CreateUser","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseUser"},{"$ref":"#/components/schemas/UserGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new user.
If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user."}},"/api/users/{id}":{"get":{"operationId":"UserController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the user whose id got provided.
Please remember that only permissions granted directly to the user will show up here, not permissions inherited from groups."},"put":{"operationId":"UserController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUser"}}},"description":"UpdateUser","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the user whose id you provided.
To change the permissions directly granted to the user please use /api/permissions instead.
Please remember that ids can't be changed."},"delete":{"operationId":"UserController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the user whose id you provided.
If there are any permissions directly granted to the user they will get deleted as well.
If no user with this id exists it will just return 204(no content)."}},"/api/usergroups":{"get":{"operationId":"UserGroupController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserGroup"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all groups.
The information provided might change while the project continues to evolve."},"post":{"operationId":"UserGroupController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserGroup"}}},"description":"CreateUserGroup","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserGroup"},{"$ref":"#/components/schemas/UserGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new group.
If you want to grant permissions to the group you have to create them seperately by posting to /api/permissions after creating the group."}},"/api/usergroups/{id}":{"get":{"operationId":"UserGroupController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the group whose id got provided.
The information provided might change while the project continues to evolve."},"put":{"operationId":"UserGroupController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserGroup"}}},"description":"UpdateUserGroup","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the group whose id you provided.
To change the permissions granted to the group please use /api/permissions instead.
Please remember that ids can't be changed."},"delete":{"operationId":"UserGroupController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUserGroup"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the group whose id you provided.
If there are any permissions directly granted to the group they will get deleted as well.
Users associated with this group won't get deleted - just deassociated.
If no group with this id exists it will just return 204(no content)."}}}} \ No newline at end of file +{"components":{"schemas":{"IllegalJWTError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNonexistantOrRefreshtokenInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"InvalidCredentialsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"NoPermissionError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UsernameOrEmailNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PasswordNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"JwtNotProvidedError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserNotFoundOrRefreshTokenCountInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RefreshTokenCountInvalidError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResetAlreadyRequestedError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserDisabledError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"JwtUser":{"properties":{"id":{"type":"integer"},"uuid":{"format":"uuid","type":"string"},"email":{"format":"email","type":"string"},"username":{"type":"string"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"enabled":{"type":"boolean"},"refreshTokenCount":{"minLength":1,"type":"integer"},"profilePic":{"type":"string"}},"type":"object","required":["id","uuid","firstname","lastname","enabled","refreshTokenCount"]},"ResponsePrincipal":{"properties":{"id":{"type":"integer"}},"type":"object","required":["id"]},"ResponseUser":{"properties":{"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"username":{"type":"string"},"enabled":{"type":"boolean"},"profilePic":{"type":"string"},"groups":{"items":{},"type":"array"},"permissions":{"items":{},"type":"array"},"id":{"type":"integer"}},"type":"object","required":["firstname","middlename","lastname","phone","email","username","enabled","profilePic","id"]},"ResponsePermission":{"properties":{"id":{"type":"integer"},"principal":{"minLength":1,"type":"object"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION","STATSCLIENT","DONOR","SCAN","STATION","CARD","DONATION"],"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string","minLength":1}},"type":"object","required":["id","principal","target","action"]},"Permission":{"properties":{"id":{"type":"integer"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION","STATSCLIENT","DONOR","SCAN","STATION","CARD","DONATION"],"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string"}},"type":"object","required":["id","target","action"]},"Principal":{"properties":{"id":{"type":"integer"}},"type":"object","required":["id"]},"UserAction":{"properties":{"id":{"type":"integer"},"target":{"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string"},"changed":{"type":"string"}},"type":"object","required":["id","target","action"]},"ResponseUserGroup":{"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"permissions":{"items":{},"type":"array"},"id":{"type":"integer"}},"type":"object","required":["name","id"]},"UserGroup":{"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"id":{"type":"integer"}},"type":"object","required":["name","id"]},"User":{"properties":{"uuid":{"format":"uuid","type":"string"},"email":{"minLength":1,"type":"string","format":"email"},"phone":{"type":"string"},"username":{"type":"string"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"password":{"minLength":1,"type":"string"},"groups":{},"enabled":{"type":"boolean"},"refreshTokenCount":{"type":"integer"},"profilePic":{"format":"url","type":"string"},"resetRequestedTimestamp":{"type":"string"},"actions":{},"id":{"type":"integer"}},"type":"object","required":["uuid","email","username","firstname","lastname","password","enabled","refreshTokenCount","profilePic","id"]},"UsernameContainsIllegalCharacterError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserEmailNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseAuth":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"access_token_expires_at":{"type":"integer"},"refresh_token_expires_at":{"type":"integer"}},"type":"object","required":["access_token","refresh_token","access_token_expires_at","refresh_token_expires_at"]},"CreateAuth":{"properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":1}},"type":"object","required":["password"]},"CreateResetToken":{"properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"}},"type":"object"},"Logout":{"properties":{"timestamp":{"type":"string"}},"type":"object","required":["timestamp"]},"HandleLogout":{"properties":{"token":{"type":"string"}},"type":"object"},"RefreshAuth":{"properties":{"token":{"type":"string"}},"type":"object"},"ResetPassword":{"properties":{"resetToken":{"type":"string"},"password":{"type":"string","minLength":1}},"type":"object","required":["password"]},"DonationNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"DonationIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"DonorNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"DonorIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"DonorReceiptAddressNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"DonorHasDonationsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerGroupNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerHasDistanceDonationsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseParticipant":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["id","firstname","middlename","lastname","phone","email"]},"ResponseDonor":{"properties":{"receiptNeeded":{"type":"boolean"},"donationAmount":{"type":"integer"},"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["receiptNeeded","donationAmount","id","firstname","middlename","lastname","phone","email"]},"ResponseDonation":{"properties":{"id":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"donor":{"minLength":1,"type":"string"},"amount":{"type":"integer"}},"type":"object","required":["id","donor","amount"]},"Address":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"address1":{"minLength":1,"type":"string"},"address2":{"type":"string"},"postalcode":{"type":"string","minLength":1},"city":{"minLength":1,"type":"string"},"country":{"minLength":1,"type":"string"}},"type":"object","required":["id","address1","postalcode","city","country"]},"GroupContact":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"address":{},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["id","firstname","lastname"]},"Participant":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["id","firstname","lastname"]},"RunnerCardNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerCardIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerCardHasScansError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerCardIdOutOfRangeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseRunnerCard":{"properties":{"id":{"type":"integer"},"runner":{"type":"object"},"code":{"minLength":1,"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id","runner","code","enabled"]},"ResponseScan":{"properties":{"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","runner","valid","distance"]},"TrackNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"TrackIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"TrackLapTimeCantBeNegativeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"TrackHasScanStationsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseTrack":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["id","name","distance"]},"ResponseScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"key":{"type":"string"},"prefix":{"minLength":1,"type":"string"},"track":{"minLength":1,"type":"object"},"enabled":{"type":"boolean"}},"type":"object","required":["id","prefix","track","enabled"]},"ResponseTrackScan":{"properties":{"track":{"minLength":1,"type":"string"},"card":{"minLength":1,"type":"string"},"station":{"minLength":1,"type":"string"},"timestamp":{"minLength":1,"type":"string","pattern":"d{4}-[01]d-[0-3]dT[0-2]d:[0-5]d:[0-5]d.d+Z?"},"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["track","card","station","timestamp","id","runner","valid","distance"]},"Scan":{"properties":{"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"_distance":{"type":"integer"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","runner","valid","_distance","distance"]},"Track":{"properties":{"id":{"type":"integer"},"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["id","name","distance"]},"ScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"track":{"minLength":1,"type":"string"},"prefix":{"type":"string"},"key":{"type":"string","minLength":1},"cleartextkey":{"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id","track","prefix","key","enabled"]},"TrackScan":{"properties":{"track":{"minLength":1,"type":"string"},"card":{"minLength":1,"type":"string"},"station":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"timestamp":{"type":"integer"},"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"valid":{"type":"boolean"},"_distance":{"type":"integer"}},"type":"object","required":["track","card","station","distance","timestamp","id","runner","valid","_distance"]},"RunnerCard":{"properties":{"id":{"type":"integer"},"runner":{},"enabled":{"type":"boolean"}},"type":"object","required":["id","enabled"]},"Runner":{"properties":{"group":{"minLength":1,"type":"string"},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"},"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["group","distance","distanceDonationAmount","id","firstname","lastname"]},"RunnerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"}},"type":"object","required":["id","name","distance","distanceDonationAmount"]},"ResponseRunner":{"properties":{"distance":{"type":"integer"},"group":{"type":"object"},"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}},"type":"object","required":["distance","group","id","firstname","middlename","lastname","phone","email"]},"ResponseDistanceDonation":{"properties":{"runner":{"type":"object"},"amountPerDistance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"id":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"donor":{"minLength":1,"type":"string"},"amount":{"type":"integer"}},"type":"object","required":["runner","amountPerDistance","id","donor","amount"]},"Donor":{"properties":{"receiptNeeded":{"type":"boolean"},"donationAmount":{"type":"integer"},"id":{"type":"integer"},"firstname":{"type":"string","minLength":1},"middlename":{"type":"string"},"lastname":{"type":"string","minLength":1},"phone":{"type":"string"},"email":{"format":"email","type":"string"}},"type":"object","required":["receiptNeeded","donationAmount","id","firstname","lastname"]},"Donation":{"properties":{"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["id","donor"]},"DistanceDonation":{"properties":{"runner":{"minLength":1,"type":"string"},"amountPerDistance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["runner","amountPerDistance","id","donor"]},"CreateDonation":{"properties":{"donor":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["donor"]},"CreateDistanceDonation":{"properties":{"runner":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"amountPerDistance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"donor":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["runner","amountPerDistance","donor"]},"FixedDonation":{"properties":{"_amount":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"amount":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["_amount","amount","id","donor"]},"CreateFixedDonation":{"properties":{"amount":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"donor":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["amount","donor"]},"UpdateDonation":{"properties":{"id":{"type":"integer"},"donor":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","donor"]},"UpdateDistanceDonation":{"properties":{"runner":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"amountPerDistance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"id":{"type":"integer"},"donor":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["runner","amountPerDistance","id","donor"]},"UpdateFixedDonation":{"properties":{"amount":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"id":{"type":"integer"},"donor":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["amount","id","donor"]},"ResponseEmpty":{"properties":{"response":{"type":"string"}},"type":"object","required":["response"]},"AddressWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"AddressNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateParticipant":{"properties":{"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["firstname","lastname"]},"CreateDonor":{"properties":{"receiptNeeded":{"type":"boolean"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["firstname","lastname"]},"UpdateDonor":{"properties":{"id":{"type":"integer"},"receiptNeeded":{"type":"boolean"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["id","firstname","lastname"]},"RunnerGroupNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationHasRunnersError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationHasTeamsError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerOrganisationWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseRunnerGroup":{"properties":{"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"type":"object"}},"type":"object","required":["id","name"]},"ResponseRunnerOrganisation":{"properties":{"address":{"type":"object"},"teams":{"items":{},"type":"array"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"type":"object"}},"type":"object","required":["teams","id","name"]},"ResponseRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"object"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"type":"object"}},"type":"object","required":["parentGroup","id","name"]},"RunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string"},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"}},"type":"object","required":["parentGroup","id","name","distance","distanceDonationAmount"]},"RunnerOrganisation":{"properties":{"address":{},"distance":{"type":"integer"},"distanceDonationAmount":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["distance","distanceDonationAmount","id","name"]},"RunnerTeamNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamHasRunnersError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"RunnerTeamNeedsParentError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateRunner":{"properties":{"group":{"type":"integer"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["group","firstname","lastname"]},"ImportRunner":{"properties":{"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"team":{"type":"string"},"class":{"type":"string"}},"type":"object","required":["firstname","lastname"]},"UpdateRunner":{"properties":{"id":{"type":"integer"},"group":{"type":"object"},"firstname":{"minLength":1,"type":"string"},"middlename":{"type":"string"},"lastname":{"minLength":1,"type":"string"},"phone":{"type":"string"},"email":{"format":"email","type":"string"},"address":{"type":"integer"}},"type":"object","required":["id","group","firstname","lastname"]},"CreateRunnerCard":{"properties":{"runner":{"type":"integer"},"enabled":{"type":"boolean"}},"type":"object","required":["enabled"]},"UpdateRunnerCard":{"properties":{"id":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"runner":{"type":"integer"},"enabled":{"type":"boolean"}},"type":"object","required":["id","enabled"]},"ScanNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanStationNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanStationIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ScanStationHasScansError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateScan":{"properties":{"runner":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["runner","distance"]},"CreateTrackScan":{"properties":{"card":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"station":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["card","station"]},"UpdateScan":{"properties":{"id":{"type":"integer"},"runner":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"valid":{"type":"boolean"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","runner","distance"]},"UpdateTrackScan":{"properties":{"id":{"type":"integer"},"runner":{"type":"integer"},"valid":{"type":"boolean"},"station":{"type":"integer"}},"type":"object","required":["id"]},"PermissionNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PermissionIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PermissionNeedsPrincipalError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PrincipalNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"PrincipalWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreatePermission":{"properties":{"principal":{"minLength":1,"type":"integer"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION","STATSCLIENT","DONOR","SCAN","STATION","CARD","DONATION"],"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string","minLength":1}},"type":"object","required":["principal","target","action"]},"UpdatePermission":{"properties":{"id":{"type":"integer"},"principal":{"minLength":1,"type":"object"},"target":{"minLength":1,"type":"string"},"action":{"minLength":1,"type":"string"}},"type":"object","required":["id","principal","target","action"]},"GroupContactWrongTypeError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"GroupContactNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateRunnerGroup":{"properties":{"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["name"]},"CreateRunnerOrganisation":{"properties":{"address":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["name"]},"UpdateRunnerOrganisation":{"properties":{"id":{"type":"integer"},"address":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["id","name"]},"CreateRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"integer"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["parentGroup","name"]},"UpdateRunnerTeam":{"properties":{"id":{"type":"integer"},"parentGroup":{"minLength":1,"type":"object"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["id","parentGroup","name"]},"CreateScanStation":{"properties":{"description":{"type":"string"},"track":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"enabled":{"type":"boolean"}},"type":"object","required":["track"]},"UpdateScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id"]},"StatsClientNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"StatsClientIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"ResponseStatsClient":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"key":{"type":"string"},"prefix":{"minLength":1,"type":"string"}},"type":"object","required":["id","prefix"]},"StatsClient":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"prefix":{"type":"string"},"key":{"type":"string"},"cleartextkey":{"type":"string"}},"type":"object","required":["id","prefix","key"]},"CreateStatsClient":{"properties":{"description":{"type":"string"}},"type":"object"},"ResponseStats":{"properties":{"total_runners":{"type":"integer"},"total_teams":{"type":"integer"},"total_orgs":{"type":"integer"},"total_users":{"type":"integer"},"total_scans":{"type":"integer"},"total_distance":{"type":"integer"},"total_donation":{"type":"integer"},"average_distance":{"type":"integer"}},"type":"object","required":["total_runners","total_teams","total_orgs","total_users","total_scans","total_distance","total_donation","average_distance"]},"ResponseStatsOrgnisation":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"type":"integer"},"donationAmount":{"type":"integer"}},"type":"object","required":["id","name","distance","donationAmount"]},"ResponseStatsRunner":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"distance":{"type":"integer"},"donationAmount":{"type":"integer"},"group":{"type":"object"}},"type":"object","required":["id","firstname","middlename","lastname","distance","donationAmount","group"]},"ResponseStatsTeam":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"type":"integer"},"donationAmount":{"type":"integer"},"parent":{"type":"object"}},"type":"object","required":["id","name","distance","donationAmount","parent"]},"CreateTrack":{"properties":{"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["name","distance"]},"UpdateTrack":{"properties":{"id":{"type":"integer"},"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"minimumLapTime":{"type":"integer"}},"type":"object","required":["id","name","distance"]},"GroupNameNeededError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserGroupNotFoundError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"UserGroupIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"CreateUser":{"properties":{"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"username":{"type":"string"},"email":{"minLength":1,"type":"string","format":"email"},"phone":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"groups":{},"profilePic":{"format":"url","type":"string"}},"type":"object","required":["firstname","lastname","email","password"]},"UpdateUser":{"properties":{"id":{"type":"integer"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"username":{"type":"string"},"email":{"minLength":1,"type":"string","format":"email"},"phone":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"groups":{},"profilePic":{"format":"url","type":"string"}},"type":"object","required":["id","firstname","lastname","email","enabled"]},"ResponseUserPermissions":{"properties":{"directlyGranted":{"items":{},"type":"array"},"inherited":{"items":{},"type":"array"}},"type":"object"},"CreateUserGroup":{"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["name"]},"UpdateUserGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["id","name"]}},"securitySchemes":{"AuthToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A JWT based access token. Use /api/auth/login or /api/auth/refresh to get one."},"RefreshTokenCookie":{"type":"apiKey","in":"cookie","name":"lfk_backend__refresh_token","description":"A cookie containing a JWT based refreh token. Attention: Doesn't work in swagger-ui. Use /api/auth/login or /api/auth/refresh to get one."},"StatsApiToken":{"type":"http","scheme":"bearer","description":"Api token that can be obtained by creating a new stats client (post to /api/statsclients). Only valid for obtaining stats."},"StationApiToken":{"type":"http","scheme":"bearer","description":"Api token that can be obtained by creating a new scan station (post to /api/stations). Only valid for creating scans."}}},"info":{"title":"LfK! Backend API","version":"0.0.12","description":"The the backend API for the LfK! runner system."},"openapi":"3.0.0","paths":{"/api/auth/login":{"post":{"operationId":"AuthController.login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuth"}}},"description":"CreateAuth","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"},{"$ref":"#/components/schemas/PasswordNeededError"},{"$ref":"#/components/schemas/InvalidCredentialsError"}]}}},"description":""}},"summary":"Login","tags":["Auth"],"description":"Login with your username/email and password.
You will receive: \n * access token (use it as a bearer token) \n * refresh token (will also be sent as a cookie)"}},"/api/auth/logout":{"post":{"operationId":"AuthController.logout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleLogout"}}},"description":"HandleLogout","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Logout"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"},{"$ref":"#/components/schemas/PasswordNeededError"},{"$ref":"#/components/schemas/InvalidCredentialsError"}]}}},"description":""}},"summary":"Logout","tags":["Auth"],"description":"Logout using your refresh token.
This instantly invalidates all your access and refresh tokens.","security":[{"RefreshTokenCookie":[]}]}},"/api/auth/refresh":{"post":{"operationId":"AuthController.refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshAuth"}}},"description":"RefreshAuth","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/JwtNotProvidedError"},{"$ref":"#/components/schemas/IllegalJWTError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/RefreshTokenCountInvalidError"}]}}},"description":""}},"summary":"Refresh","tags":["Auth"],"description":"Refresh your access and refresh tokens using a valid refresh token.
You will receive: \n * access token (use it as a bearer token) \n * refresh token (will also be sent as a cookie)","security":[{"RefreshTokenCookie":[]}]}},"/api/auth/reset":{"post":{"operationId":"AuthController.getResetToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResetToken"}}},"description":"CreateResetToken","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"}]}}},"description":""}},"summary":"Get reset token","tags":["Auth"],"description":"Request a password reset token.
This will provide you with a reset token that you can use by posting to /api/auth/reset/{token}."}},"/api/auth/reset/{token}":{"post":{"operationId":"AuthController.resetPassword","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPassword"}}},"description":"ResetPassword","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseAuth"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UsernameOrEmailNeededError"}]}}},"description":""}},"summary":"Reset password","tags":["Auth"],"description":"Reset a user's utilising a valid password reset token.
This will set the user's password to the one you provided in the body.
To get a reset token post to /api/auth/reset with your username."}},"/api/donations":{"get":{"operationId":"DonationController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/ResponseDonation"},"type":"array"},{"items":{"$ref":"#/components/schemas/ResponseDistanceDonation"},"type":"array"}]}}},"description":""}},"summary":"Get all","tags":["Donation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all donations (fixed or distance based) from all donors.
This includes the donations's runner's distance ran(if distance donation)."}},"/api/donations/{id}":{"get":{"operationId":"DonationController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseDonation"},{"$ref":"#/components/schemas/ResponseDistanceDonation"}]}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonationNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Donation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the donation whose id got provided. This includes the donation's runner's distance ran (if distance donation)."},"delete":{"operationId":"DonationController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseDonation"},{"$ref":"#/components/schemas/ResponseDistanceDonation"}]}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Donation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the donation whose id you provided.
If no donation with this id exists it will just return 204(no content)."}},"/api/donations/fixed":{"post":{"operationId":"DonationController.postFixed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFixedDonation"}}},"description":"CreateFixedDonation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorNotFoundError"}}},"description":""}},"summary":"Post fixed","tags":["Donation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a fixed donation (not distance donation - use /donations/distance instead).
Please rmemember to provide the donation's donors's id and amount."}},"/api/donations/distance":{"post":{"operationId":"DonationController.postDistance","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDistanceDonation"}}},"description":"CreateDistanceDonation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDistanceDonation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DonorNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"}]}}},"description":""}},"summary":"Post distance","tags":["Donation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a distance donation (not fixed donation - use /donations/fixed instead).
Please rmemember to provide the donation's donors's and runners ids and amount per distance (kilometer)."}},"/api/donations/fixed/{id}":{"put":{"operationId":"DonationController.putFixed","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFixedDonation"}}},"description":"UpdateFixedDonation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DonationNotFoundError"},{"$ref":"#/components/schemas/DonorNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonationIdsNotMatchingError"}}},"description":""}},"summary":"Put fixed","tags":["Donation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the fixed donation (not distance donation - use /donations/distance instead) whose id you provided.
Please remember that ids can't be changed and amounts must be positive."}},"/api/donations/distance/{id}":{"put":{"operationId":"DonationController.putDistance","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDistanceDonation"}}},"description":"UpdateDistanceDonation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DonationNotFoundError"},{"$ref":"#/components/schemas/DonorNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonationIdsNotMatchingError"}}},"description":""}},"summary":"Put distance","tags":["Donation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the distance donation (not fixed donation - use /donations/fixed instead) whose id you provided.
Please remember that ids can't be changed and amountPerDistance must be positive."}},"/api/donors":{"get":{"operationId":"DonorController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseDonor"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all donor.
This includes the donor's current donation amount."},"post":{"operationId":"DonorController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDonor"}}},"description":"CreateDonor","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""}},"summary":"Post","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new donor."}},"/api/donors/{id}":{"get":{"operationId":"DonorController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the donor whose id got provided.
This includes the donor's current donation amount."},"put":{"operationId":"DonorController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDonor"}}},"description":"UpdateDonor","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DonorIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the donor whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"DonorController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDonor"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Donor"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the donor whose id you provided.
If no donor with this id exists it will just return 204(no content).
If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations."}},"/api/scans":{"get":{"operationId":"ScanController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"items":{"$ref":"#/components/schemas/ResponseScan"},"type":"array"},{"items":{"$ref":"#/components/schemas/ResponseTrackScan"},"type":"array"}]}}},"description":""}},"summary":"Get all","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all scans (normal or track) from all runners.
This includes the scan's runner's distance ran."},"post":{"operationId":"ScanController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScan"}}},"description":"CreateScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Post","tags":["Scan"],"security":[{"AuthToken":[],"ScanApiToken":[]},{"RefreshTokenCookie":[],"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new scan (not track scan - use /scans/trackscans instead).
Please rmemember to provide the scan's runner's id and distance."}},"/api/scans/{id}":{"get":{"operationId":"ScanController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseScan"},{"$ref":"#/components/schemas/ResponseTrackScan"}]}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the scan whose id got provided. This includes the scan's runner's distance ran."},"put":{"operationId":"ScanController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScan"}}},"description":"UpdateScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScanNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the scan (not track scan use /scans/trackscans/:id instead) whose id you provided.
Please remember that ids can't be changed and distances must be positive."},"delete":{"operationId":"ScanController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScan"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the scan whose id you provided.
If no scan with this id exists it will just return 204(no content)."}},"/api/scans/trackscans":{"post":{"operationId":"ScanController.postTrackScans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrackScan"}}},"description":"CreateTrackScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrackScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Post track scans","tags":["Scan"],"security":[{"AuthToken":[],"ScanApiToken":[]},{"RefreshTokenCookie":[],"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new track scan (for \"normal\" scans use /scans instead).
Please remember that to provide the scan's card's station's id."}},"/api/scans/trackscans/{id}":{"put":{"operationId":"ScanController.putTrackScan","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTrackScan"}}},"description":"UpdateTrackScan","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrackScan"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScanNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"},{"$ref":"#/components/schemas/ScanStationNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanIdsNotMatchingError"}}},"description":""}},"summary":"Put track scan","tags":["Scan"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the track scan (not \"normal\" scan use /scans/trackscans/:id instead) whose id you provided.
Please remember that only the validity, runner and track can be changed."}},"/api/cards":{"get":{"operationId":"RunnerCardController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerCard"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all card."},"post":{"operationId":"RunnerCardController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerCard"}}},"description":"CreateRunnerCard","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Post","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new card.
You can provide a associated runner by id but you don't have to."}},"/api/cards/{id}":{"get":{"operationId":"RunnerCardController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerCardNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the card whose id got provided."},"put":{"operationId":"RunnerCardController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunnerCard"}}},"description":"UpdateRunnerCard","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RunnerCardNotFoundError"},{"$ref":"#/components/schemas/RunnerNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerCardIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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."},"delete":{"operationId":"RunnerCardController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerCard"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerCardHasScansError"}}},"description":""}},"summary":"Remove","tags":["Runner Card"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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)."}},"/api/runners":{"get":{"operationId":"RunnerController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all runners from all teams/orgs.
This includes the runner's group and distance ran."},"post":{"operationId":"RunnerController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunner"}}},"description":"CreateRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResponseRunner"},{"$ref":"#/components/schemas/RunnerGroupNeededError"},{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new runner.
Please remeber to provide the runner's group's id."}},"/api/runners/{id}":{"get":{"operationId":"RunnerController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the runner whose id got provided."},"put":{"operationId":"RunnerController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunner"}}},"description":"UpdateRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the runner whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"RunnerController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunner"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerHasDistanceDonationsError"}}},"description":""}},"summary":"Remove","tags":["Runner"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the runner whose id you provided.
This will also delete all scans and cards associated with the runner.
If no runner with this id exists it will just return 204(no content)."}},"/api/runners/import":{"post":{"operationId":"ImportController.postJSON","parameters":[{"in":"query","name":"group","required":false,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportRunner"},"type":"array"}}},"description":"ImportRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post json","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from json and insert them into the provided group.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/organisations/{id}/import":{"post":{"operationId":"ImportController.postOrgsJSON","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportRunner"},"type":"array"}}},"description":"ImportRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post orgs json","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from json and insert them into the provided org.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/teams/{id}/import":{"post":{"operationId":"ImportController.postTeamsJSON","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ImportRunner"},"type":"array"}}},"description":"ImportRunner","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post teams json","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from json and insert them into the provided team"}},"/api/runners/import/csv":{"post":{"operationId":"ImportController.postCSV","parameters":[{"in":"query","name":"group","required":false,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post csv","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from csv and insert them into the provided group.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/organisations/{id}/import/csv":{"post":{"operationId":"ImportController.postOrgsCSV","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post orgs csv","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from csv and insert them into the provided org.
If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead."}},"/api/teams/{id}/import/csv":{"post":{"operationId":"ImportController.postTeamsCSV","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunner"},"type":"array"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerGroupNeededError"}}},"description":""}},"summary":"Post teams csv","tags":["Import"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create new runners from csv and insert them into the provided team"}},"/api/permissions":{"get":{"operationId":"PermissionController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponsePermission"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all permissions for all users and groups."},"post":{"operationId":"PermissionController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePermission"}}},"description":"CreatePermission","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePermission"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalNotFoundError"}}},"description":""}},"summary":"Post","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new permission for a existing principal(user/group).
If a permission with this target, action and prinicpal already exists that permission will be returned instead of creating a new one."}},"/api/permissions/{id}":{"get":{"operationId":"PermissionController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePermission"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the permission whose id got provided."},"put":{"operationId":"PermissionController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePermission"}}},"description":"UpdatePermission","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePrincipal"}}},"description":""},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PermissionNotFoundError"},{"$ref":"#/components/schemas/PrincipalNotFoundError"}]}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PermissionIdsNotMatchingError"},{"$ref":"#/components/schemas/PermissionNeedsPrincipalError"}]}}},"description":""}},"summary":"Put","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update a permission object.
If updateing the permission object would result in duplicate permission (same target, action and principal) this permission will get deleted and the existing permission will be returned.
Please remember that ids can't be changed."},"delete":{"operationId":"PermissionController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePermission"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Permission"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Deletes the permission whose id you provide.
If no permission with this id exists it will just return 204(no content)."}},"/api/teams":{"get":{"operationId":"RunnerTeamController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerTeam"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all teams.
This includes their parent organisation and contact (if existing/associated)."},"post":{"operationId":"RunnerTeamController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerTeam"}}},"description":"CreateRunnerTeam","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""}},"summary":"Post","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new organsisation.
Please remember to provide it's parent group's id."}},"/api/teams/{id}":{"get":{"operationId":"RunnerTeamController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the team whose id got provided."},"put":{"operationId":"RunnerTeamController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunnerTeam"}}},"description":"UpdateRunnerTeam","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the team whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"RunnerTeamController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerTeam"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerTeamHasRunnersError"}}},"description":""}},"summary":"Remove","tags":["Runner Team"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the team whose id you provided.
If the team still has runners associated this will fail.
To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while).
If no team with this id exists it will just return 204(no content)."}},"/api/organisations":{"get":{"operationId":"RunnerOrganisationController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all organisations.
This includes their address, contact and teams (if existing/associated)."},"post":{"operationId":"RunnerOrganisationController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunnerOrganisation"}}},"description":"CreateRunnerOrganisation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""}},"summary":"Post","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new organsisation."}},"/api/organisations/{id}":{"get":{"operationId":"RunnerOrganisationController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the organisation whose id got provided."},"put":{"operationId":"RunnerOrganisationController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunnerOrganisation"}}},"description":"UpdateRunnerOrganisation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisationIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the organisation whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"RunnerOrganisationController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRunnerOrganisation"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RunnerOrganisationHasTeamsError"},{"$ref":"#/components/schemas/RunnerOrganisationHasRunnersError"}]}}},"description":""}},"summary":"Remove","tags":["Runner Organisation"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the organsisation whose id you provided.
If the organisation still has runners and/or teams associated this will fail.
To delete the organisation with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while).
If no organisation with this id exists it will just return 204(no content)."}},"/api/stations":{"get":{"operationId":"ScanStationController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseScanStation"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all stations.
This includes their associated tracks."},"post":{"operationId":"ScanStationController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScanStation"}}},"description":"CreateScanStation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""}},"summary":"Post","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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."}},"/api/stations/{id}":{"get":{"operationId":"ScanStationController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the station whose id got provided.
This includes it's associated track."},"put":{"operationId":"ScanStationController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScanStation"}}},"description":"UpdateScanStation","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the station whose id you provided.
Please remember that only the description and enabled state can be changed."},"delete":{"operationId":"ScanStationController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseScanStation"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStationHasScansError"}}},"description":""}},"summary":"Remove","tags":["Scan Station"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"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)."}},"/api/statsclients":{"get":{"operationId":"StatsClientController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsClient"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all stats clients. Please remember that the key can only be viewed on creation."},"post":{"operationId":"StatsClientController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStatsClient"}}},"description":"CreateStatsClient","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStatsClient"}}},"description":""}},"summary":"Post","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new stats client.
Please remember that the client's key will be generated automaticly and that it can only be viewed on creation."}},"/api/statsclients/{id}":{"get":{"operationId":"StatsClientController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStatsClient"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsClientNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the stats client whose id got provided. Please remember that the key can only be viewed on creation."},"delete":{"operationId":"StatsClientController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStatsClient"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Stats Client"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the stats client whose id you provided.
If no client with this id exists it will just return 204(no content)."}},"/api/stats":{"get":{"operationId":"StatsController.get","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseStats"}}},"description":""}},"summary":"Get","tags":["Stats"],"description":"A very basic stats endpoint providing basic counters for a dashboard or simmilar"}},"/api/stats/runners/distance":{"get":{"operationId":"StatsController.getTopRunnersByDistance","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsRunner"},"type":"array"}}},"description":""}},"summary":"Get top runners by distance","tags":["Stats"],"description":"Returns the top ten runners by distance.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/runners/donations":{"get":{"operationId":"StatsController.getTopRunnersByDonations","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsRunner"},"type":"array"}}},"description":""}},"summary":"Get top runners by donations","tags":["Stats"],"description":"Returns the top ten runners by donations.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/scans":{"get":{"operationId":"StatsController.getTopRunnersByTrackTime","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsRunner"},"type":"array"}}},"description":""}},"summary":"Get top runners by track time","tags":["Stats"],"description":"Returns the top ten fastest track times (with their runner and the runner's group).","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/teams/distance":{"get":{"operationId":"StatsController.getTopTeamsByDistance","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsTeam"},"type":"array"}}},"description":""}},"summary":"Get top teams by distance","tags":["Stats"],"description":"Returns the top ten teams by distance.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/teams/donations":{"get":{"operationId":"StatsController.getTopTeamsByDonations","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsTeam"},"type":"array"}}},"description":""}},"summary":"Get top teams by donations","tags":["Stats"],"description":"Returns the top ten teams by donations.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/organisations/distance":{"get":{"operationId":"StatsController.getTopOrgsByDistance","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsOrgnisation"},"type":"array"}}},"description":""}},"summary":"Get top orgs by distance","tags":["Stats"],"description":"Returns the top ten organisations by distance.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/stats/organisations/donations":{"get":{"operationId":"StatsController.getTopOrgsByDonations","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseStatsOrgnisation"},"type":"array"}}},"description":""}},"summary":"Get top orgs by donations","tags":["Stats"],"description":"Returns the top ten organisations by donations.","security":[{"StatsApiToken":[]},{"AuthToken":[]},{"RefreshTokenCookie":[]}]}},"/api/status":{"get":{"operationId":"StatusController.get","responses":{"200":{"content":{"application/json":{}},"description":"Successful response"}},"summary":"Get","tags":["Status"],"description":"A very basic status/health endpoint that just checks if the database connection is available.
The available information depth will be expanded later."}},"/api/version":{"get":{"operationId":"StatusController.getVersion","responses":{"200":{"content":{"application/json":{}},"description":"Successful response"}},"summary":"Get version","tags":["Status"],"description":"A very basic endpoint that just returns the curent package version."}},"/api/tracks":{"get":{"operationId":"TrackController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseTrack"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all tracks."},"post":{"operationId":"TrackController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrack"}}},"description":"CreateTrack","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackLapTimeCantBeNegativeError"}}},"description":""}},"summary":"Post","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new track.
Please remember that the track's distance must be greater than 0."}},"/api/tracks/{id}":{"get":{"operationId":"TrackController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""}},"summary":"Get one","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the track whose id got provided."},"put":{"operationId":"TrackController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTrack"}}},"description":"UpdateTrack","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TrackIdsNotMatchingError"},{"$ref":"#/components/schemas/TrackLapTimeCantBeNegativeError"}]}}},"description":""}},"summary":"Put","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the track whose id you provided.
Please remember that ids can't be changed."},"delete":{"operationId":"TrackController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseTrack"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["Track"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the track whose id you provided.
If no track with this id exists it will just return 204(no content)."}},"/api/users":{"get":{"operationId":"UserController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponseUser"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all users.
This includes their groups and permissions granted to them."},"post":{"operationId":"UserController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUser"}}},"description":"CreateUser","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameContainsIllegalCharacterError"}}},"description":""}},"summary":"Post","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new user.
If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user."}},"/api/users/{id}":{"get":{"operationId":"UserController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the user whose id got provided.
Please remember that all permissions granted to the user will show up here."},"put":{"operationId":"UserController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUser"}}},"description":"UpdateUser","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserIdsNotMatchingError"},{"$ref":"#/components/schemas/UsernameContainsIllegalCharacterError"}]}}},"description":""}},"summary":"Put","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the user whose id you provided.
To change the permissions directly granted to the user please use /api/permissions instead.
Please remember that ids can't be changed."},"delete":{"operationId":"UserController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the user whose id you provided.
If there are any permissions directly granted to the user they will get deleted as well.
If no user with this id exists it will just return 204(no content)."}},"/api/users/{id}/permissions":{"get":{"operationId":"UserController.getPermissions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUser"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""}},"summary":"Get permissions","tags":["User"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all permissions granted to the user sorted into directly granted and inherited as permission response objects."}},"/api/usergroups":{"get":{"operationId":"UserGroupController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserGroup"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all groups.
The information provided might change while the project continues to evolve."},"post":{"operationId":"UserGroupController.post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserGroup"}}},"description":"CreateUserGroup","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UserGroup"},{"$ref":"#/components/schemas/UserGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Create a new group.
If you want to grant permissions to the group you have to create them seperately by posting to /api/permissions after creating the group."}},"/api/usergroups/{id}":{"get":{"operationId":"UserGroupController.getOne","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Lists all information about the group whose id got provided.
The information provided might change while the project continues to evolve."},"put":{"operationId":"UserGroupController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserGroup"}}},"description":"UpdateUserGroup","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupNotFoundError"}}},"description":""},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Update the group whose id you provided.
To change the permissions granted to the group please use /api/permissions instead.
Please remember that ids can't be changed."},"delete":{"operationId":"UserGroupController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUserGroup"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User Group"],"security":[{"AuthToken":[]},{"RefreshTokenCookie":[]}],"description":"Delete the group whose id you provided.
If there are any permissions directly granted to the group they will get deleted as well.
Users associated with this group won't get deleted - just deassociated.
If no group with this id exists it will just return 204(no content)."}}}} \ No newline at end of file diff --git a/package.json b/package.json index 7dae473..de9b2d5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@odit/lfk-client-js", "description": "A lib to interact with https://git.odit.services/lfk/backend. Use this version for native JS applications.", - "version": "0.0.11", + "version": "0.0.12", "license": "CC-BY-NC-SA-4.0", "main": "./dist/index.js", "types": "./dist/index.d.ts",