diff --git a/dist/core/request.d.ts b/dist/core/request.d.ts index f696b2e..0afbc3f 100644 --- a/dist/core/request.d.ts +++ b/dist/core/request.d.ts @@ -1,9 +1,9 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; /** -* Request using node-fetch client -* @param options The request options from the the service -* @result ApiResult -* @throws ApiError -*/ + * Request using node-fetch client + * @param options The request options from the the service + * @returns ApiResult + * @throws ApiError + */ export declare function request(options: ApiRequestOptions): Promise; diff --git a/dist/core/request.js b/dist/core/request.js index ae2e37b..a561797 100644 --- a/dist/core/request.js +++ b/dist/core/request.js @@ -188,11 +188,11 @@ function catchErrors(options, result) { } } /** -* Request using node-fetch client -* @param options The request options from the the service -* @result ApiResult -* @throws ApiError -*/ + * Request using node-fetch client + * @param options The request options from the the service + * @returns ApiResult + * @throws ApiError + */ async function request(options) { const url = getUrl(options); const response = await sendRequest(options, url); diff --git a/dist/index.d.ts b/dist/index.d.ts index 095d5d3..b885aa2 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -6,6 +6,7 @@ export type { AddressWrongTypeError } from './models/AddressWrongTypeError'; export type { Auth } from './models/Auth'; export type { CreateAuth } from './models/CreateAuth'; export type { CreateParticipant } from './models/CreateParticipant'; +export { CreatePermission } from './models/CreatePermission'; export type { CreateRunner } from './models/CreateRunner'; export type { CreateRunnerGroup } from './models/CreateRunnerGroup'; export type { CreateRunnerOrganisation } from './models/CreateRunnerOrganisation'; @@ -15,29 +16,40 @@ 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 { ExpiredJWTError } from './models/ExpiredJWTError'; export type { GroupContact } from './models/GroupContact'; export type { GroupContactNotFoundError } from './models/GroupContactNotFoundError'; export type { GroupContactWrongTypeError } from './models/GroupContactWrongTypeError'; export type { GroupNameNeededError } from './models/GroupNameNeededError'; export type { HandleLogout } from './models/HandleLogout'; export type { IllegalJWTError } from './models/IllegalJWTError'; +export type { ImportRunner } from './models/ImportRunner'; export type { InvalidCredentialsError } from './models/InvalidCredentialsError'; export type { JwtNotProvidedError } from './models/JwtNotProvidedError'; +export type { JwtUser } from './models/JwtUser'; export type { Logout } from './models/Logout'; export type { NoPermissionError } from './models/NoPermissionError'; export type { Participant } from './models/Participant'; export type { PasswordNeededError } from './models/PasswordNeededError'; -export type { Permission } from './models/Permission'; +export { Permission } from './models/Permission'; +export type { PermissionIdsNotMatchingError } from './models/PermissionIdsNotMatchingError'; +export type { PermissionNeedsPrincipalError } from './models/PermissionNeedsPrincipalError'; +export type { PermissionNotFoundError } from './models/PermissionNotFoundError'; +export type { Principal } from './models/Principal'; +export type { PrincipalNotFoundError } from './models/PrincipalNotFoundError'; +export type { PrincipalWrongTypeError } from './models/PrincipalWrongTypeError'; export type { RefreshAuth } from './models/RefreshAuth'; export type { RefreshTokenCountInvalidError } from './models/RefreshTokenCountInvalidError'; export type { ResponseEmpty } from './models/ResponseEmpty'; export type { ResponseParticipant } from './models/ResponseParticipant'; +export { ResponsePermission } from './models/ResponsePermission'; +export type { ResponsePrincipal } from './models/ResponsePrincipal'; export type { ResponseRunner } from './models/ResponseRunner'; export type { ResponseRunnerGroup } from './models/ResponseRunnerGroup'; export type { ResponseRunnerOrganisation } from './models/ResponseRunnerOrganisation'; export type { ResponseRunnerTeam } from './models/ResponseRunnerTeam'; export type { ResponseTrack } from './models/ResponseTrack'; +export type { ResponseUser } from './models/ResponseUser'; +export type { ResponseUserGroup } from './models/ResponseUserGroup'; export type { Runner } from './models/Runner'; export type { RunnerCard } from './models/RunnerCard'; export type { RunnerGroup } from './models/RunnerGroup'; @@ -62,10 +74,13 @@ export type { Track } from './models/Track'; export type { TrackIdsNotMatchingError } from './models/TrackIdsNotMatchingError'; export type { TrackNotFoundError } from './models/TrackNotFoundError'; export type { TrackScan } from './models/TrackScan'; +export type { UpdatePermission } from './models/UpdatePermission'; export type { UpdateRunner } from './models/UpdateRunner'; +export type { UpdateRunnerOrganisation } from './models/UpdateRunnerOrganisation'; export type { UpdateRunnerTeam } from './models/UpdateRunnerTeam'; +export type { UpdateUser } from './models/UpdateUser'; export type { User } from './models/User'; -export type { UserAction } from './models/UserAction'; +export { UserAction } from './models/UserAction'; export type { UserGroup } from './models/UserGroup'; export type { UserGroupIdsNotMatchingError } from './models/UserGroupIdsNotMatchingError'; export type { UserGroupNotFoundError } from './models/UserGroupNotFoundError'; @@ -75,9 +90,12 @@ export type { UserNonexistantOrRefreshtokenInvalidError } from './models/UserNon export type { UserNotFoundError } from './models/UserNotFoundError'; export type { UserNotFoundOrRefreshTokenCountInvalidError } from './models/UserNotFoundOrRefreshTokenCountInvalidError'; export { AuthService } from './services/AuthService'; +export { ImportService } from './services/ImportService'; +export { PermissionService } from './services/PermissionService'; export { RunnerOrganisationService } from './services/RunnerOrganisationService'; export { RunnerService } from './services/RunnerService'; export { RunnerTeamService } from './services/RunnerTeamService'; +export { StatusService } from './services/StatusService'; export { TrackService } from './services/TrackService'; export { UserGroupService } from './services/UserGroupService'; export { UserService } from './services/UserService'; diff --git a/dist/index.js b/dist/index.js index ba01454..adfccbd 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.RunnerTeamService = exports.RunnerService = exports.RunnerOrganisationService = exports.AuthService = exports.OpenAPI = exports.ApiError = void 0; +exports.UserService = exports.UserGroupService = exports.TrackService = exports.StatusService = exports.RunnerTeamService = exports.RunnerService = exports.RunnerOrganisationService = exports.PermissionService = exports.ImportService = exports.AuthService = exports.UserAction = exports.ResponsePermission = exports.Permission = exports.CreatePermission = exports.OpenAPI = exports.ApiError = void 0; /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -8,14 +8,28 @@ var ApiError_1 = require("./core/ApiError"); Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } }); var OpenAPI_1 = require("./core/OpenAPI"); Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } }); +var CreatePermission_1 = require("./models/CreatePermission"); +Object.defineProperty(exports, "CreatePermission", { enumerable: true, get: function () { return CreatePermission_1.CreatePermission; } }); +var Permission_1 = require("./models/Permission"); +Object.defineProperty(exports, "Permission", { enumerable: true, get: function () { return Permission_1.Permission; } }); +var ResponsePermission_1 = require("./models/ResponsePermission"); +Object.defineProperty(exports, "ResponsePermission", { enumerable: true, get: function () { return ResponsePermission_1.ResponsePermission; } }); +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 ImportService_1 = require("./services/ImportService"); +Object.defineProperty(exports, "ImportService", { enumerable: true, get: function () { return ImportService_1.ImportService; } }); +var PermissionService_1 = require("./services/PermissionService"); +Object.defineProperty(exports, "PermissionService", { enumerable: true, get: function () { return PermissionService_1.PermissionService; } }); var RunnerOrganisationService_1 = require("./services/RunnerOrganisationService"); Object.defineProperty(exports, "RunnerOrganisationService", { enumerable: true, get: function () { return RunnerOrganisationService_1.RunnerOrganisationService; } }); var RunnerService_1 = require("./services/RunnerService"); Object.defineProperty(exports, "RunnerService", { enumerable: true, get: function () { return RunnerService_1.RunnerService; } }); var RunnerTeamService_1 = require("./services/RunnerTeamService"); Object.defineProperty(exports, "RunnerTeamService", { enumerable: true, get: function () { return RunnerTeamService_1.RunnerTeamService; } }); +var StatusService_1 = require("./services/StatusService"); +Object.defineProperty(exports, "StatusService", { enumerable: true, get: function () { return StatusService_1.StatusService; } }); var TrackService_1 = require("./services/TrackService"); Object.defineProperty(exports, "TrackService", { enumerable: true, get: function () { return TrackService_1.TrackService; } }); var UserGroupService_1 = require("./services/UserGroupService"); diff --git a/dist/models/CreateAuth.d.ts b/dist/models/CreateAuth.d.ts index a9d41ce..be72ec6 100644 --- a/dist/models/CreateAuth.d.ts +++ b/dist/models/CreateAuth.d.ts @@ -1,5 +1,5 @@ export declare type CreateAuth = { username?: string; - password: string; email?: string; + password: string; }; diff --git a/dist/models/CreatePermission.d.ts b/dist/models/CreatePermission.d.ts new file mode 100644 index 0000000..635d6d8 --- /dev/null +++ b/dist/models/CreatePermission.d.ts @@ -0,0 +1,23 @@ +export declare type CreatePermission = { + principal: number; + target: CreatePermission.target; + action: CreatePermission.action; +}; +export declare namespace CreatePermission { + enum target { + RUNNER = "RUNNER", + ORGANISATION = "ORGANISATION", + TEAM = "TEAM", + TRACK = "TRACK", + USER = "USER", + USERGROUP = "USERGROUP", + PERMISSION = "PERMISSION" + } + enum action { + GET = "GET", + CREATE = "CREATE", + UPDATE = "UPDATE", + DELETE = "DELETE", + IMPORT = "IMPORT" + } +} diff --git a/dist/models/CreatePermission.js b/dist/models/CreatePermission.js new file mode 100644 index 0000000..abdcdfc --- /dev/null +++ b/dist/models/CreatePermission.js @@ -0,0 +1,27 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CreatePermission = void 0; +var CreatePermission; +(function (CreatePermission) { + let target; + (function (target) { + target["RUNNER"] = "RUNNER"; + target["ORGANISATION"] = "ORGANISATION"; + target["TEAM"] = "TEAM"; + target["TRACK"] = "TRACK"; + target["USER"] = "USER"; + target["USERGROUP"] = "USERGROUP"; + target["PERMISSION"] = "PERMISSION"; + })(target = CreatePermission.target || (CreatePermission.target = {})); + let action; + (function (action) { + action["GET"] = "GET"; + action["CREATE"] = "CREATE"; + action["UPDATE"] = "UPDATE"; + action["DELETE"] = "DELETE"; + action["IMPORT"] = "IMPORT"; + })(action = CreatePermission.action || (CreatePermission.action = {})); +})(CreatePermission = exports.CreatePermission || (exports.CreatePermission = {})); diff --git a/dist/models/CreateUser.d.ts b/dist/models/CreateUser.d.ts index cb674b0..52ff72a 100644 --- a/dist/models/CreateUser.d.ts +++ b/dist/models/CreateUser.d.ts @@ -6,5 +6,5 @@ export declare type CreateUser = { email?: string; phone?: string; password: string; - groupId?: any; + groups?: any; }; diff --git a/dist/models/ExpiredJWTError.d.ts b/dist/models/ExpiredJWTError.d.ts deleted file mode 100644 index 8c49df8..0000000 --- a/dist/models/ExpiredJWTError.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare type ExpiredJWTError = { - name: string; - message: string; -}; diff --git a/dist/models/ImportRunner.d.ts b/dist/models/ImportRunner.d.ts new file mode 100644 index 0000000..8bd356b --- /dev/null +++ b/dist/models/ImportRunner.d.ts @@ -0,0 +1,7 @@ +export declare type ImportRunner = { + firstname: string; + middlename?: string; + lastname: string; + team?: string; + class?: string; +}; diff --git a/dist/models/ExpiredJWTError.js b/dist/models/ImportRunner.js similarity index 100% rename from dist/models/ExpiredJWTError.js rename to dist/models/ImportRunner.js diff --git a/dist/models/JwtUser.d.ts b/dist/models/JwtUser.d.ts new file mode 100644 index 0000000..cf3405b --- /dev/null +++ b/dist/models/JwtUser.d.ts @@ -0,0 +1,12 @@ +export declare type JwtUser = { + id: number; + uuid: string; + email?: string; + username?: string; + firstname: string; + middlename?: string; + lastname: string; + enabled: boolean; + refreshTokenCount: number; + profilePic?: string; +}; diff --git a/dist/models/JwtUser.js b/dist/models/JwtUser.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/JwtUser.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 049305e..5edcd8e 100644 --- a/dist/models/Permission.d.ts +++ b/dist/models/Permission.d.ts @@ -1,5 +1,23 @@ export declare type Permission = { id: number; - target: string; - action: string; + target: Permission.target; + action: Permission.action; }; +export declare namespace Permission { + enum target { + RUNNER = "RUNNER", + ORGANISATION = "ORGANISATION", + TEAM = "TEAM", + TRACK = "TRACK", + USER = "USER", + USERGROUP = "USERGROUP", + PERMISSION = "PERMISSION" + } + enum action { + GET = "GET", + CREATE = "CREATE", + UPDATE = "UPDATE", + DELETE = "DELETE", + IMPORT = "IMPORT" + } +} diff --git a/dist/models/Permission.js b/dist/models/Permission.js index 1e550d8..be2c4ba 100644 --- a/dist/models/Permission.js +++ b/dist/models/Permission.js @@ -3,3 +3,25 @@ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); +exports.Permission = void 0; +var Permission; +(function (Permission) { + let target; + (function (target) { + target["RUNNER"] = "RUNNER"; + target["ORGANISATION"] = "ORGANISATION"; + target["TEAM"] = "TEAM"; + target["TRACK"] = "TRACK"; + target["USER"] = "USER"; + target["USERGROUP"] = "USERGROUP"; + target["PERMISSION"] = "PERMISSION"; + })(target = Permission.target || (Permission.target = {})); + let action; + (function (action) { + action["GET"] = "GET"; + action["CREATE"] = "CREATE"; + action["UPDATE"] = "UPDATE"; + action["DELETE"] = "DELETE"; + action["IMPORT"] = "IMPORT"; + })(action = Permission.action || (Permission.action = {})); +})(Permission = exports.Permission || (exports.Permission = {})); diff --git a/dist/models/PermissionIdsNotMatchingError.d.ts b/dist/models/PermissionIdsNotMatchingError.d.ts new file mode 100644 index 0000000..8f35772 --- /dev/null +++ b/dist/models/PermissionIdsNotMatchingError.d.ts @@ -0,0 +1,4 @@ +export declare type PermissionIdsNotMatchingError = { + name: string; + message: string; +}; diff --git a/dist/models/PermissionIdsNotMatchingError.js b/dist/models/PermissionIdsNotMatchingError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/PermissionIdsNotMatchingError.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/PermissionNeedsPrincipalError.d.ts b/dist/models/PermissionNeedsPrincipalError.d.ts new file mode 100644 index 0000000..d5faa38 --- /dev/null +++ b/dist/models/PermissionNeedsPrincipalError.d.ts @@ -0,0 +1,4 @@ +export declare type PermissionNeedsPrincipalError = { + name: string; + message: string; +}; diff --git a/dist/models/PermissionNeedsPrincipalError.js b/dist/models/PermissionNeedsPrincipalError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/PermissionNeedsPrincipalError.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/PermissionNotFoundError.d.ts b/dist/models/PermissionNotFoundError.d.ts new file mode 100644 index 0000000..43509a0 --- /dev/null +++ b/dist/models/PermissionNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type PermissionNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/PermissionNotFoundError.js b/dist/models/PermissionNotFoundError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/PermissionNotFoundError.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/Principal.d.ts b/dist/models/Principal.d.ts new file mode 100644 index 0000000..400a954 --- /dev/null +++ b/dist/models/Principal.d.ts @@ -0,0 +1,3 @@ +export declare type Principal = { + id: number; +}; diff --git a/dist/models/Principal.js b/dist/models/Principal.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/Principal.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/PrincipalNotFoundError.d.ts b/dist/models/PrincipalNotFoundError.d.ts new file mode 100644 index 0000000..7879adb --- /dev/null +++ b/dist/models/PrincipalNotFoundError.d.ts @@ -0,0 +1,4 @@ +export declare type PrincipalNotFoundError = { + name: string; + message: string; +}; diff --git a/dist/models/PrincipalNotFoundError.js b/dist/models/PrincipalNotFoundError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/PrincipalNotFoundError.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/PrincipalWrongTypeError.d.ts b/dist/models/PrincipalWrongTypeError.d.ts new file mode 100644 index 0000000..72f0e6c --- /dev/null +++ b/dist/models/PrincipalWrongTypeError.d.ts @@ -0,0 +1,4 @@ +export declare type PrincipalWrongTypeError = { + name: string; + message: string; +}; diff --git a/dist/models/PrincipalWrongTypeError.js b/dist/models/PrincipalWrongTypeError.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/PrincipalWrongTypeError.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/ResponsePermission.d.ts b/dist/models/ResponsePermission.d.ts new file mode 100644 index 0000000..35b499a --- /dev/null +++ b/dist/models/ResponsePermission.d.ts @@ -0,0 +1,25 @@ +import type { ResponsePrincipal } from './ResponsePrincipal'; +export declare type ResponsePermission = { + id: number; + principal: ResponsePrincipal; + target: ResponsePermission.target; + action: ResponsePermission.action; +}; +export declare namespace ResponsePermission { + enum target { + RUNNER = "RUNNER", + ORGANISATION = "ORGANISATION", + TEAM = "TEAM", + TRACK = "TRACK", + USER = "USER", + USERGROUP = "USERGROUP", + PERMISSION = "PERMISSION" + } + enum action { + GET = "GET", + CREATE = "CREATE", + UPDATE = "UPDATE", + DELETE = "DELETE", + IMPORT = "IMPORT" + } +} diff --git a/dist/models/ResponsePermission.js b/dist/models/ResponsePermission.js new file mode 100644 index 0000000..a899605 --- /dev/null +++ b/dist/models/ResponsePermission.js @@ -0,0 +1,27 @@ +"use strict"; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ResponsePermission = void 0; +var ResponsePermission; +(function (ResponsePermission) { + let target; + (function (target) { + target["RUNNER"] = "RUNNER"; + target["ORGANISATION"] = "ORGANISATION"; + target["TEAM"] = "TEAM"; + target["TRACK"] = "TRACK"; + target["USER"] = "USER"; + target["USERGROUP"] = "USERGROUP"; + target["PERMISSION"] = "PERMISSION"; + })(target = ResponsePermission.target || (ResponsePermission.target = {})); + let action; + (function (action) { + action["GET"] = "GET"; + action["CREATE"] = "CREATE"; + action["UPDATE"] = "UPDATE"; + action["DELETE"] = "DELETE"; + action["IMPORT"] = "IMPORT"; + })(action = ResponsePermission.action || (ResponsePermission.action = {})); +})(ResponsePermission = exports.ResponsePermission || (exports.ResponsePermission = {})); diff --git a/dist/models/ResponsePrincipal.d.ts b/dist/models/ResponsePrincipal.d.ts new file mode 100644 index 0000000..1d8f4f1 --- /dev/null +++ b/dist/models/ResponsePrincipal.d.ts @@ -0,0 +1,3 @@ +export declare type ResponsePrincipal = { + id: number; +}; diff --git a/dist/models/ResponsePrincipal.js b/dist/models/ResponsePrincipal.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/ResponsePrincipal.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/ResponseUser.d.ts b/dist/models/ResponseUser.d.ts new file mode 100644 index 0000000..1d10591 --- /dev/null +++ b/dist/models/ResponseUser.d.ts @@ -0,0 +1,13 @@ +export declare type ResponseUser = { + firstname: string; + middlename: string; + lastname: string; + phone: string; + email: string; + username: string; + enabled: boolean; + profilePic?: string; + groups?: Array; + permissions?: Array; + id: number; +}; diff --git a/dist/models/ResponseUser.js b/dist/models/ResponseUser.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/ResponseUser.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/ResponseUserGroup.d.ts b/dist/models/ResponseUserGroup.d.ts new file mode 100644 index 0000000..4abbdc3 --- /dev/null +++ b/dist/models/ResponseUserGroup.d.ts @@ -0,0 +1,6 @@ +export declare type ResponseUserGroup = { + name: string; + description?: string; + permissions?: Array; + id: number; +}; diff --git a/dist/models/ResponseUserGroup.js b/dist/models/ResponseUserGroup.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/ResponseUserGroup.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/UpdatePermission.d.ts b/dist/models/UpdatePermission.d.ts new file mode 100644 index 0000000..e7f2002 --- /dev/null +++ b/dist/models/UpdatePermission.d.ts @@ -0,0 +1,7 @@ +import type { Principal } from './Principal'; +export declare type UpdatePermission = { + id: number; + principal: Principal; + target: string; + action: string; +}; diff --git a/dist/models/UpdatePermission.js b/dist/models/UpdatePermission.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UpdatePermission.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/UpdateRunnerOrganisation.d.ts b/dist/models/UpdateRunnerOrganisation.d.ts new file mode 100644 index 0000000..9354c9b --- /dev/null +++ b/dist/models/UpdateRunnerOrganisation.d.ts @@ -0,0 +1,6 @@ +export declare type UpdateRunnerOrganisation = { + id: number; + address?: number; + name: string; + contact?: number; +}; diff --git a/dist/models/UpdateRunnerOrganisation.js b/dist/models/UpdateRunnerOrganisation.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UpdateRunnerOrganisation.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 new file mode 100644 index 0000000..d658921 --- /dev/null +++ b/dist/models/UpdateUser.d.ts @@ -0,0 +1,12 @@ +export declare type UpdateUser = { + id: number; + firstname: string; + middlename?: string; + lastname: string; + username?: string; + email?: string; + phone?: string; + password?: string; + enabled: boolean; + groups?: any; +}; diff --git a/dist/models/UpdateUser.js b/dist/models/UpdateUser.js new file mode 100644 index 0000000..1e550d8 --- /dev/null +++ b/dist/models/UpdateUser.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/User.d.ts b/dist/models/User.d.ts index cd4b571..d1f4cc9 100644 --- a/dist/models/User.d.ts +++ b/dist/models/User.d.ts @@ -1,5 +1,4 @@ export declare type User = { - id: number; uuid: string; email: string; phone?: string; @@ -8,10 +7,10 @@ export declare type User = { middlename?: string; lastname: string; password: string; - permissions?: any; groups?: any; enabled: boolean; refreshTokenCount: number; profilePic?: string; actions?: any; + id: number; }; diff --git a/dist/models/UserAction.d.ts b/dist/models/UserAction.d.ts index 874e3c5..6af2012 100644 --- a/dist/models/UserAction.d.ts +++ b/dist/models/UserAction.d.ts @@ -1,6 +1,15 @@ export declare type UserAction = { id: number; target: string; - action: string; + action: UserAction.action; changed?: string; }; +export declare namespace UserAction { + enum action { + GET = "GET", + CREATE = "CREATE", + UPDATE = "UPDATE", + DELETE = "DELETE", + IMPORT = "IMPORT" + } +} diff --git a/dist/models/UserAction.js b/dist/models/UserAction.js index 1e550d8..fceb590 100644 --- a/dist/models/UserAction.js +++ b/dist/models/UserAction.js @@ -3,3 +3,15 @@ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserAction = void 0; +var UserAction; +(function (UserAction) { + let action; + (function (action) { + action["GET"] = "GET"; + action["CREATE"] = "CREATE"; + action["UPDATE"] = "UPDATE"; + action["DELETE"] = "DELETE"; + action["IMPORT"] = "IMPORT"; + })(action = UserAction.action || (UserAction.action = {})); +})(UserAction = exports.UserAction || (exports.UserAction = {})); diff --git a/dist/models/UserGroup.d.ts b/dist/models/UserGroup.d.ts index d6da624..d4a5d60 100644 --- a/dist/models/UserGroup.d.ts +++ b/dist/models/UserGroup.d.ts @@ -1,5 +1,5 @@ export declare type UserGroup = { - id: number; name: string; description?: string; + id: number; }; diff --git a/dist/services/AuthService.d.ts b/dist/services/AuthService.d.ts index 5b3e6fe..54bb1aa 100644 --- a/dist/services/AuthService.d.ts +++ b/dist/services/AuthService.d.ts @@ -15,23 +15,23 @@ export declare class AuthService { * Login * Create a new access token object * @param requestBody CreateAuth - * @result any + * @returns any * @throws ApiError */ - static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>; + static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>; /** * Logout * Create a new access token object * @param requestBody HandleLogout - * @result any + * @returns any * @throws ApiError */ - static authControllerLogout(requestBody?: HandleLogout): Promise<(Logout | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>; + static authControllerLogout(requestBody?: HandleLogout): Promise<(Logout | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>; /** * Refresh * refresh a access token * @param requestBody RefreshAuth - * @result any + * @returns any * @throws ApiError */ static authControllerRefresh(requestBody?: RefreshAuth): Promise<(Auth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>; diff --git a/dist/services/AuthService.js b/dist/services/AuthService.js index ccbe746..521387c 100644 --- a/dist/services/AuthService.js +++ b/dist/services/AuthService.js @@ -7,7 +7,7 @@ class AuthService { * Login * Create a new access token object * @param requestBody CreateAuth - * @result any + * @returns any * @throws ApiError */ static async authControllerLogin(requestBody) { @@ -22,7 +22,7 @@ class AuthService { * Logout * Create a new access token object * @param requestBody HandleLogout - * @result any + * @returns any * @throws ApiError */ static async authControllerLogout(requestBody) { @@ -37,7 +37,7 @@ class AuthService { * Refresh * refresh a access token * @param requestBody RefreshAuth - * @result any + * @returns any * @throws ApiError */ static async authControllerRefresh(requestBody) { diff --git a/dist/services/ImportService.d.ts b/dist/services/ImportService.d.ts new file mode 100644 index 0000000..6888927 --- /dev/null +++ b/dist/services/ImportService.d.ts @@ -0,0 +1,55 @@ +import type { ImportRunner } from '../models/ImportRunner'; +import type { ResponseRunner } from '../models/ResponseRunner'; +export declare class ImportService { + /** + * Post json + * Create new runners from json and insert them (or their teams) into the provided group + * @param group + * @param requestBody ImportRunner + * @returns ResponseRunner + * @throws ApiError + */ + static importControllerPostJson(group?: number, requestBody?: Array): Promise>; + /** + * Post orgs json + * Create new runners from json and insert them (or their teams) into the provided org + * @param id + * @param requestBody ImportRunner + * @returns ResponseRunner + * @throws ApiError + */ + static importControllerPostOrgsJson(id: number, requestBody?: Array): Promise>; + /** + * Post teams json + * Create new runners from json and insert them into the provided team + * @param id + * @param requestBody ImportRunner + * @returns ResponseRunner + * @throws ApiError + */ + static importControllerPostTeamsJson(id: number, requestBody?: Array): Promise>; + /** + * Post csv + * Create new runners from csv and insert them (or their teams) into the provided group + * @param group + * @returns ResponseRunner + * @throws ApiError + */ + static importControllerPostCsv(group?: number): Promise>; + /** + * Post orgs csv + * Create new runners from csv and insert them (or their teams) into the provided org + * @param id + * @returns ResponseRunner + * @throws ApiError + */ + static importControllerPostOrgsCsv(id: number): Promise>; + /** + * Post teams csv + * Create new runners from csv and insert them into the provided team + * @param id + * @returns ResponseRunner + * @throws ApiError + */ + static importControllerPostTeamsCsv(id: number): Promise>; +} diff --git a/dist/services/ImportService.js b/dist/services/ImportService.js new file mode 100644 index 0000000..533d031 --- /dev/null +++ b/dist/services/ImportService.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ImportService = void 0; +const request_1 = require("../core/request"); +class ImportService { + /** + * Post json + * Create new runners from json and insert them (or their teams) into the provided group + * @param group + * @param requestBody ImportRunner + * @returns ResponseRunner + * @throws ApiError + */ + static async importControllerPostJson(group, requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/runners/import`, + query: { + 'group': group, + }, + body: requestBody, + }); + return result.body; + } + /** + * Post orgs json + * Create new runners from json and insert them (or their teams) into the provided org + * @param id + * @param requestBody ImportRunner + * @returns ResponseRunner + * @throws ApiError + */ + static async importControllerPostOrgsJson(id, requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/organisations/${id}/import`, + body: requestBody, + }); + return result.body; + } + /** + * Post teams json + * Create new runners from json and insert them into the provided team + * @param id + * @param requestBody ImportRunner + * @returns ResponseRunner + * @throws ApiError + */ + static async importControllerPostTeamsJson(id, requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/teams/${id}/import`, + body: requestBody, + }); + return result.body; + } + /** + * Post csv + * Create new runners from csv and insert them (or their teams) into the provided group + * @param group + * @returns ResponseRunner + * @throws ApiError + */ + static async importControllerPostCsv(group) { + const result = await request_1.request({ + method: 'POST', + path: `/api/runners/import/csv`, + query: { + 'group': group, + }, + }); + return result.body; + } + /** + * Post orgs csv + * Create new runners from csv and insert them (or their teams) into the provided org + * @param id + * @returns ResponseRunner + * @throws ApiError + */ + static async importControllerPostOrgsCsv(id) { + const result = await request_1.request({ + method: 'POST', + path: `/api/organisations/${id}/import/csv`, + }); + return result.body; + } + /** + * Post teams csv + * Create new runners from csv and insert them into the provided team + * @param id + * @returns ResponseRunner + * @throws ApiError + */ + static async importControllerPostTeamsCsv(id) { + const result = await request_1.request({ + method: 'POST', + path: `/api/teams/${id}/import/csv`, + }); + return result.body; + } +} +exports.ImportService = ImportService; diff --git a/dist/services/PermissionService.d.ts b/dist/services/PermissionService.d.ts new file mode 100644 index 0000000..6f40f86 --- /dev/null +++ b/dist/services/PermissionService.d.ts @@ -0,0 +1,49 @@ +import type { CreatePermission } from '../models/CreatePermission'; +import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { ResponsePermission } from '../models/ResponsePermission'; +import type { ResponsePrincipal } from '../models/ResponsePrincipal'; +import type { UpdatePermission } from '../models/UpdatePermission'; +export declare class PermissionService { + /** + * Get all + * Lists all permissions. + * @returns ResponsePermission + * @throws ApiError + */ + static permissionControllerGetAll(): Promise>; + /** + * Post + * Create a new runnerTeam object (id will be generated automagicly). + * @param requestBody CreatePermission + * @returns ResponsePermission + * @throws ApiError + */ + static permissionControllerPost(requestBody?: CreatePermission): Promise; + /** + * Get one + * Returns a permissions of a specified id (if it exists) + * @param id + * @returns ResponsePermission + * @throws ApiError + */ + static permissionControllerGetOne(id: number): Promise; + /** + * Put + * Update a permission object (id can't be changed). + * @param id + * @param requestBody UpdatePermission + * @returns ResponsePrincipal + * @throws ApiError + */ + static permissionControllerPut(id: number, requestBody?: UpdatePermission): Promise; + /** + * Remove + * Delete a specified permission (if it exists). + * @param id + * @param force + * @returns ResponsePermission + * @returns ResponseEmpty + * @throws ApiError + */ + static permissionControllerRemove(id: number, force?: boolean): Promise; +} diff --git a/dist/services/PermissionService.js b/dist/services/PermissionService.js new file mode 100644 index 0000000..8a47def --- /dev/null +++ b/dist/services/PermissionService.js @@ -0,0 +1,84 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PermissionService = void 0; +const request_1 = require("../core/request"); +class PermissionService { + /** + * Get all + * Lists all permissions. + * @returns ResponsePermission + * @throws ApiError + */ + static async permissionControllerGetAll() { + const result = await request_1.request({ + method: 'GET', + path: `/api/permissions`, + }); + return result.body; + } + /** + * Post + * Create a new runnerTeam object (id will be generated automagicly). + * @param requestBody CreatePermission + * @returns ResponsePermission + * @throws ApiError + */ + static async permissionControllerPost(requestBody) { + const result = await request_1.request({ + method: 'POST', + path: `/api/permissions`, + body: requestBody, + }); + return result.body; + } + /** + * Get one + * Returns a permissions of a specified id (if it exists) + * @param id + * @returns ResponsePermission + * @throws ApiError + */ + static async permissionControllerGetOne(id) { + const result = await request_1.request({ + method: 'GET', + path: `/api/permissions/${id}`, + }); + return result.body; + } + /** + * Put + * Update a permission object (id can't be changed). + * @param id + * @param requestBody UpdatePermission + * @returns ResponsePrincipal + * @throws ApiError + */ + static async permissionControllerPut(id, requestBody) { + const result = await request_1.request({ + method: 'PUT', + path: `/api/permissions/${id}`, + body: requestBody, + }); + return result.body; + } + /** + * Remove + * Delete a specified permission (if it exists). + * @param id + * @param force + * @returns ResponsePermission + * @returns ResponseEmpty + * @throws ApiError + */ + static async permissionControllerRemove(id, force) { + const result = await request_1.request({ + method: 'DELETE', + path: `/api/permissions/${id}`, + query: { + 'force': force, + }, + }); + return result.body; + } +} +exports.PermissionService = PermissionService; diff --git a/dist/services/RunnerOrganisationService.d.ts b/dist/services/RunnerOrganisationService.d.ts index 6a502b6..3e5f0cf 100644 --- a/dist/services/RunnerOrganisationService.d.ts +++ b/dist/services/RunnerOrganisationService.d.ts @@ -1,12 +1,12 @@ import type { CreateRunnerOrganisation } from '../models/CreateRunnerOrganisation'; import type { ResponseEmpty } from '../models/ResponseEmpty'; import type { ResponseRunnerOrganisation } from '../models/ResponseRunnerOrganisation'; -import type { RunnerOrganisation } from '../models/RunnerOrganisation'; +import type { UpdateRunnerOrganisation } from '../models/UpdateRunnerOrganisation'; export declare class RunnerOrganisationService { /** * Get all * Lists all runnerOrganisations. - * @result ResponseRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ static runnerOrganisationControllerGetAll(): Promise>; @@ -14,7 +14,7 @@ export declare class RunnerOrganisationService { * Post * Create a new runnerOrganisation object (id will be generated automagicly). * @param requestBody CreateRunnerOrganisation - * @result ResponseRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ static runnerOrganisationControllerPost(requestBody?: CreateRunnerOrganisation): Promise; @@ -22,7 +22,7 @@ export declare class RunnerOrganisationService { * Get one * Returns a runnerOrganisation of a specified id (if it exists) * @param id - * @result ResponseRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ static runnerOrganisationControllerGetOne(id: number): Promise; @@ -30,18 +30,18 @@ export declare class RunnerOrganisationService { * Put * Update a runnerOrganisation object (id can't be changed). * @param id - * @param requestBody RunnerOrganisation - * @result ResponseRunnerOrganisation + * @param requestBody UpdateRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ - static runnerOrganisationControllerPut(id: number, requestBody?: RunnerOrganisation): Promise; + static runnerOrganisationControllerPut(id: number, requestBody?: UpdateRunnerOrganisation): Promise; /** * Remove * Delete a specified runnerOrganisation (if it exists). * @param id * @param force - * @result ResponseRunnerOrganisation - * @result ResponseEmpty + * @returns ResponseRunnerOrganisation + * @returns ResponseEmpty * @throws ApiError */ static runnerOrganisationControllerRemove(id: number, force?: boolean): Promise; diff --git a/dist/services/RunnerOrganisationService.js b/dist/services/RunnerOrganisationService.js index bd86643..43334b0 100644 --- a/dist/services/RunnerOrganisationService.js +++ b/dist/services/RunnerOrganisationService.js @@ -6,7 +6,7 @@ class RunnerOrganisationService { /** * Get all * Lists all runnerOrganisations. - * @result ResponseRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ static async runnerOrganisationControllerGetAll() { @@ -20,7 +20,7 @@ class RunnerOrganisationService { * Post * Create a new runnerOrganisation object (id will be generated automagicly). * @param requestBody CreateRunnerOrganisation - * @result ResponseRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ static async runnerOrganisationControllerPost(requestBody) { @@ -35,7 +35,7 @@ class RunnerOrganisationService { * Get one * Returns a runnerOrganisation of a specified id (if it exists) * @param id - * @result ResponseRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ static async runnerOrganisationControllerGetOne(id) { @@ -49,8 +49,8 @@ class RunnerOrganisationService { * Put * Update a runnerOrganisation object (id can't be changed). * @param id - * @param requestBody RunnerOrganisation - * @result ResponseRunnerOrganisation + * @param requestBody UpdateRunnerOrganisation + * @returns ResponseRunnerOrganisation * @throws ApiError */ static async runnerOrganisationControllerPut(id, requestBody) { @@ -66,8 +66,8 @@ class RunnerOrganisationService { * Delete a specified runnerOrganisation (if it exists). * @param id * @param force - * @result ResponseRunnerOrganisation - * @result ResponseEmpty + * @returns ResponseRunnerOrganisation + * @returns ResponseEmpty * @throws ApiError */ static async runnerOrganisationControllerRemove(id, force) { diff --git a/dist/services/RunnerService.d.ts b/dist/services/RunnerService.d.ts index 108151d..573b95e 100644 --- a/dist/services/RunnerService.d.ts +++ b/dist/services/RunnerService.d.ts @@ -8,7 +8,7 @@ export declare class RunnerService { /** * Get all * Lists all runners. - * @result ResponseRunner + * @returns ResponseRunner * @throws ApiError */ static runnerControllerGetAll(): Promise>; @@ -16,7 +16,7 @@ export declare class RunnerService { * Post * Create a new runner object (id will be generated automagicly). * @param requestBody CreateRunner - * @result any + * @returns any * @throws ApiError */ static runnerControllerPost(requestBody?: CreateRunner): Promise<(ResponseRunner | RunnerGroupNeededError | RunnerGroupNotFoundError)>; @@ -24,7 +24,7 @@ export declare class RunnerService { * Get one * Returns a runner of a specified id (if it exists) * @param id - * @result ResponseRunner + * @returns ResponseRunner * @throws ApiError */ static runnerControllerGetOne(id: number): Promise; @@ -33,7 +33,7 @@ export declare class RunnerService { * Update a runner object (id can't be changed). * @param id * @param requestBody UpdateRunner - * @result ResponseRunner + * @returns ResponseRunner * @throws ApiError */ static runnerControllerPut(id: number, requestBody?: UpdateRunner): Promise; @@ -42,8 +42,8 @@ export declare class RunnerService { * Delete a specified runner (if it exists). * @param id * @param force - * @result ResponseRunner - * @result ResponseEmpty + * @returns ResponseRunner + * @returns ResponseEmpty * @throws ApiError */ static runnerControllerRemove(id: number, force?: boolean): Promise; diff --git a/dist/services/RunnerService.js b/dist/services/RunnerService.js index 75d9e35..619e11c 100644 --- a/dist/services/RunnerService.js +++ b/dist/services/RunnerService.js @@ -6,7 +6,7 @@ class RunnerService { /** * Get all * Lists all runners. - * @result ResponseRunner + * @returns ResponseRunner * @throws ApiError */ static async runnerControllerGetAll() { @@ -20,7 +20,7 @@ class RunnerService { * Post * Create a new runner object (id will be generated automagicly). * @param requestBody CreateRunner - * @result any + * @returns any * @throws ApiError */ static async runnerControllerPost(requestBody) { @@ -35,7 +35,7 @@ class RunnerService { * Get one * Returns a runner of a specified id (if it exists) * @param id - * @result ResponseRunner + * @returns ResponseRunner * @throws ApiError */ static async runnerControllerGetOne(id) { @@ -50,7 +50,7 @@ class RunnerService { * Update a runner object (id can't be changed). * @param id * @param requestBody UpdateRunner - * @result ResponseRunner + * @returns ResponseRunner * @throws ApiError */ static async runnerControllerPut(id, requestBody) { @@ -66,8 +66,8 @@ class RunnerService { * Delete a specified runner (if it exists). * @param id * @param force - * @result ResponseRunner - * @result ResponseEmpty + * @returns ResponseRunner + * @returns ResponseEmpty * @throws ApiError */ static async runnerControllerRemove(id, force) { diff --git a/dist/services/RunnerTeamService.d.ts b/dist/services/RunnerTeamService.d.ts index 53adc31..c7297d4 100644 --- a/dist/services/RunnerTeamService.d.ts +++ b/dist/services/RunnerTeamService.d.ts @@ -6,7 +6,7 @@ export declare class RunnerTeamService { /** * Get all * Lists all runnerTeams. - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static runnerTeamControllerGetAll(): Promise>; @@ -14,7 +14,7 @@ export declare class RunnerTeamService { * Post * Create a new runnerTeam object (id will be generated automagicly). * @param requestBody CreateRunnerTeam - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static runnerTeamControllerPost(requestBody?: CreateRunnerTeam): Promise; @@ -22,7 +22,7 @@ export declare class RunnerTeamService { * Get one * Returns a runnerTeam of a specified id (if it exists) * @param id - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static runnerTeamControllerGetOne(id: number): Promise; @@ -31,7 +31,7 @@ export declare class RunnerTeamService { * Update a runnerTeam object (id can't be changed). * @param id * @param requestBody UpdateRunnerTeam - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static runnerTeamControllerPut(id: number, requestBody?: UpdateRunnerTeam): Promise; @@ -40,8 +40,8 @@ export declare class RunnerTeamService { * Delete a specified runnerTeam (if it exists). * @param id * @param force - * @result ResponseRunnerTeam - * @result ResponseEmpty + * @returns ResponseRunnerTeam + * @returns ResponseEmpty * @throws ApiError */ static runnerTeamControllerRemove(id: number, force?: boolean): Promise; diff --git a/dist/services/RunnerTeamService.js b/dist/services/RunnerTeamService.js index aa4f8c3..afd72f4 100644 --- a/dist/services/RunnerTeamService.js +++ b/dist/services/RunnerTeamService.js @@ -6,7 +6,7 @@ class RunnerTeamService { /** * Get all * Lists all runnerTeams. - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static async runnerTeamControllerGetAll() { @@ -20,7 +20,7 @@ class RunnerTeamService { * Post * Create a new runnerTeam object (id will be generated automagicly). * @param requestBody CreateRunnerTeam - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static async runnerTeamControllerPost(requestBody) { @@ -35,7 +35,7 @@ class RunnerTeamService { * Get one * Returns a runnerTeam of a specified id (if it exists) * @param id - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static async runnerTeamControllerGetOne(id) { @@ -50,7 +50,7 @@ class RunnerTeamService { * Update a runnerTeam object (id can't be changed). * @param id * @param requestBody UpdateRunnerTeam - * @result ResponseRunnerTeam + * @returns ResponseRunnerTeam * @throws ApiError */ static async runnerTeamControllerPut(id, requestBody) { @@ -66,8 +66,8 @@ class RunnerTeamService { * Delete a specified runnerTeam (if it exists). * @param id * @param force - * @result ResponseRunnerTeam - * @result ResponseEmpty + * @returns ResponseRunnerTeam + * @returns ResponseEmpty * @throws ApiError */ static async runnerTeamControllerRemove(id, force) { diff --git a/dist/services/StatusService.d.ts b/dist/services/StatusService.d.ts new file mode 100644 index 0000000..f018a28 --- /dev/null +++ b/dist/services/StatusService.d.ts @@ -0,0 +1,9 @@ +export declare class StatusService { + /** + * Get + * Lists all tracks. + * @returns any Successful response + * @throws ApiError + */ + static statusControllerGet(): Promise; +} diff --git a/dist/services/StatusService.js b/dist/services/StatusService.js new file mode 100644 index 0000000..225ec5e --- /dev/null +++ b/dist/services/StatusService.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StatusService = void 0; +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +const request_1 = require("../core/request"); +class StatusService { + /** + * Get + * Lists all tracks. + * @returns any Successful response + * @throws ApiError + */ + static async statusControllerGet() { + const result = await request_1.request({ + method: 'GET', + path: `/api/status`, + }); + return result.body; + } +} +exports.StatusService = StatusService; diff --git a/dist/services/TrackService.d.ts b/dist/services/TrackService.d.ts index 3a96e6d..273db2f 100644 --- a/dist/services/TrackService.d.ts +++ b/dist/services/TrackService.d.ts @@ -5,8 +5,7 @@ import type { Track } from '../models/Track'; export declare class TrackService { /** * Get all - * Lists all tracks. - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static trackControllerGetAll(): Promise>; @@ -14,7 +13,7 @@ export declare class TrackService { * Post * Create a new track object (id will be generated automagicly). * @param requestBody CreateTrack - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static trackControllerPost(requestBody?: CreateTrack): Promise; @@ -22,7 +21,7 @@ export declare class TrackService { * Get one * Returns a track of a specified id (if it exists) * @param id - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static trackControllerGetOne(id: number): Promise; @@ -31,7 +30,7 @@ export declare class TrackService { * Update a track object (id can't be changed). * @param id * @param requestBody Track - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static trackControllerPut(id: number, requestBody?: Track): Promise; @@ -39,8 +38,8 @@ export declare class TrackService { * Remove * Delete a specified track (if it exists). * @param id - * @result ResponseTrack - * @result ResponseEmpty + * @returns ResponseTrack + * @returns ResponseEmpty * @throws ApiError */ static trackControllerRemove(id: number): Promise; diff --git a/dist/services/TrackService.js b/dist/services/TrackService.js index 0996dac..6f8dc0a 100644 --- a/dist/services/TrackService.js +++ b/dist/services/TrackService.js @@ -5,8 +5,7 @@ const request_1 = require("../core/request"); class TrackService { /** * Get all - * Lists all tracks. - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static async trackControllerGetAll() { @@ -20,7 +19,7 @@ class TrackService { * Post * Create a new track object (id will be generated automagicly). * @param requestBody CreateTrack - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static async trackControllerPost(requestBody) { @@ -35,7 +34,7 @@ class TrackService { * Get one * Returns a track of a specified id (if it exists) * @param id - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static async trackControllerGetOne(id) { @@ -50,7 +49,7 @@ class TrackService { * Update a track object (id can't be changed). * @param id * @param requestBody Track - * @result ResponseTrack + * @returns ResponseTrack * @throws ApiError */ static async trackControllerPut(id, requestBody) { @@ -65,8 +64,8 @@ class TrackService { * Remove * Delete a specified track (if it exists). * @param id - * @result ResponseTrack - * @result ResponseEmpty + * @returns ResponseTrack + * @returns ResponseEmpty * @throws ApiError */ static async trackControllerRemove(id) { diff --git a/dist/services/UserGroupService.d.ts b/dist/services/UserGroupService.d.ts index 1c8faa9..d3331be 100644 --- a/dist/services/UserGroupService.d.ts +++ b/dist/services/UserGroupService.d.ts @@ -1,12 +1,13 @@ import type { CreateUserGroup } from '../models/CreateUserGroup'; import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { ResponseUserGroup } from '../models/ResponseUserGroup'; import type { UserGroup } from '../models/UserGroup'; import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError'; export declare class UserGroupService { /** * Get all * Lists all usergroups. - * @result UserGroup + * @returns UserGroup * @throws ApiError */ static userGroupControllerGetAll(): Promise>; @@ -14,7 +15,7 @@ export declare class UserGroupService { * Post * Create a new usergroup object (id will be generated automagicly). * @param requestBody CreateUserGroup - * @result any + * @returns any * @throws ApiError */ static userGroupControllerPost(requestBody?: CreateUserGroup): Promise<(UserGroup | UserGroupNotFoundError)>; @@ -22,7 +23,7 @@ export declare class UserGroupService { * Get one * Returns a usergroup of a specified id (if it exists) * @param id - * @result UserGroup + * @returns UserGroup * @throws ApiError */ static userGroupControllerGetOne(id: number): Promise; @@ -31,7 +32,7 @@ export declare class UserGroupService { * Update a usergroup object (id can't be changed). * @param id * @param requestBody UserGroup - * @result UserGroup + * @returns UserGroup * @throws ApiError */ static userGroupControllerPut(id: number, requestBody?: UserGroup): Promise; @@ -39,9 +40,10 @@ export declare class UserGroupService { * Remove * Delete a specified usergroup (if it exists). * @param id - * @result UserGroup - * @result ResponseEmpty + * @param force + * @returns ResponseUserGroup + * @returns ResponseEmpty * @throws ApiError */ - static userGroupControllerRemove(id: number): Promise; + static userGroupControllerRemove(id: number, force?: boolean): Promise; } diff --git a/dist/services/UserGroupService.js b/dist/services/UserGroupService.js index c9fac7b..314466e 100644 --- a/dist/services/UserGroupService.js +++ b/dist/services/UserGroupService.js @@ -6,7 +6,7 @@ class UserGroupService { /** * Get all * Lists all usergroups. - * @result UserGroup + * @returns UserGroup * @throws ApiError */ static async userGroupControllerGetAll() { @@ -20,7 +20,7 @@ class UserGroupService { * Post * Create a new usergroup object (id will be generated automagicly). * @param requestBody CreateUserGroup - * @result any + * @returns any * @throws ApiError */ static async userGroupControllerPost(requestBody) { @@ -35,7 +35,7 @@ class UserGroupService { * Get one * Returns a usergroup of a specified id (if it exists) * @param id - * @result UserGroup + * @returns UserGroup * @throws ApiError */ static async userGroupControllerGetOne(id) { @@ -50,7 +50,7 @@ class UserGroupService { * Update a usergroup object (id can't be changed). * @param id * @param requestBody UserGroup - * @result UserGroup + * @returns UserGroup * @throws ApiError */ static async userGroupControllerPut(id, requestBody) { @@ -65,14 +65,18 @@ class UserGroupService { * Remove * Delete a specified usergroup (if it exists). * @param id - * @result UserGroup - * @result ResponseEmpty + * @param force + * @returns ResponseUserGroup + * @returns ResponseEmpty * @throws ApiError */ - static async userGroupControllerRemove(id) { + static async userGroupControllerRemove(id, force) { const result = await request_1.request({ method: 'DELETE', path: `/api/usergroups/${id}`, + query: { + 'force': force, + }, }); return result.body; } diff --git a/dist/services/UserService.d.ts b/dist/services/UserService.d.ts index de9f51e..c4bd719 100644 --- a/dist/services/UserService.d.ts +++ b/dist/services/UserService.d.ts @@ -1,12 +1,13 @@ import type { CreateUser } from '../models/CreateUser'; import type { ResponseEmpty } from '../models/ResponseEmpty'; +import type { UpdateUser } from '../models/UpdateUser'; import type { User } from '../models/User'; import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError'; export declare class UserService { /** * Get all * Lists all users. - * @result User + * @returns User * @throws ApiError */ static userControllerGetAll(): Promise>; @@ -14,7 +15,7 @@ export declare class UserService { * Post * Create a new user object (id will be generated automagicly). * @param requestBody CreateUser - * @result any + * @returns any * @throws ApiError */ static userControllerPost(requestBody?: CreateUser): Promise<(User | UserGroupNotFoundError)>; @@ -22,7 +23,7 @@ export declare class UserService { * Get one * Returns a user of a specified id (if it exists) * @param id - * @result User + * @returns User * @throws ApiError */ static userControllerGetOne(id: number): Promise; @@ -30,18 +31,19 @@ export declare class UserService { * Put * Update a user object (id can't be changed). * @param id - * @param requestBody User - * @result User + * @param requestBody UpdateUser + * @returns User * @throws ApiError */ - static userControllerPut(id: number, requestBody?: User): Promise; + static userControllerPut(id: number, requestBody?: UpdateUser): Promise; /** * Remove - * Delete a specified runner (if it exists). + * Delete a user runner (if it exists). * @param id - * @result User - * @result ResponseEmpty + * @param force + * @returns User + * @returns ResponseEmpty * @throws ApiError */ - static userControllerRemove(id: number): Promise; + static userControllerRemove(id: number, force?: boolean): Promise; } diff --git a/dist/services/UserService.js b/dist/services/UserService.js index 9e8014b..bc274a0 100644 --- a/dist/services/UserService.js +++ b/dist/services/UserService.js @@ -6,7 +6,7 @@ class UserService { /** * Get all * Lists all users. - * @result User + * @returns User * @throws ApiError */ static async userControllerGetAll() { @@ -20,7 +20,7 @@ class UserService { * Post * Create a new user object (id will be generated automagicly). * @param requestBody CreateUser - * @result any + * @returns any * @throws ApiError */ static async userControllerPost(requestBody) { @@ -35,7 +35,7 @@ class UserService { * Get one * Returns a user of a specified id (if it exists) * @param id - * @result User + * @returns User * @throws ApiError */ static async userControllerGetOne(id) { @@ -49,8 +49,8 @@ class UserService { * Put * Update a user object (id can't be changed). * @param id - * @param requestBody User - * @result User + * @param requestBody UpdateUser + * @returns User * @throws ApiError */ static async userControllerPut(id, requestBody) { @@ -63,16 +63,20 @@ class UserService { } /** * Remove - * Delete a specified runner (if it exists). + * Delete a user runner (if it exists). * @param id - * @result User - * @result ResponseEmpty + * @param force + * @returns User + * @returns ResponseEmpty * @throws ApiError */ - static async userControllerRemove(id) { + static async userControllerRemove(id, force) { const result = await request_1.request({ method: 'DELETE', path: `/api/users/${id}`, + query: { + 'force': force, + }, }); return result.body; } diff --git a/openapi.json b/openapi.json index 2052161..9404f41 100644 --- a/openapi.json +++ b/openapi.json @@ -1 +1 @@ -{"components":{"schemas":{"ExpiredJWTError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"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"]},"UserGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string","minLength":1},"description":{"type":"string"}},"type":"object","required":["id","name"]},"Permission":{"properties":{"id":{"type":"integer"},"target":{"type":"string","minLength":1},"action":{"type":"string","minLength":1}},"type":"object","required":["id","target","action"]},"UserAction":{"properties":{"id":{"type":"integer"},"target":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"changed":{"type":"string"}},"type":"object","required":["id","target","action"]},"User":{"properties":{"id":{"type":"integer"},"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"},"permissions":{},"groups":{},"enabled":{"type":"boolean"},"refreshTokenCount":{"type":"integer"},"profilePic":{"type":"string"},"actions":{}},"type":"object","required":["id","uuid","email","username","firstname","lastname","password","enabled","refreshTokenCount"]},"UserIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"Auth":{"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"},"password":{"type":"string"},"email":{"type":"string","format":"email"}},"type":"object","required":["password"]},"Logout":{"properties":{"timestamp":{"type":"string"}},"type":"object","required":["timestamp"]},"HandleLogout":{"properties":{"token":{"type":"string"}},"type":"object"},"RefreshAuth":{"properties":{"token":{"type":"string"}},"type":"object"},"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"]},"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"]},"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"]},"RunnerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["id","name"]},"RunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string"},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["parentGroup","id","name"]},"RunnerOrganisation":{"properties":{"address":{},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["id","name"]},"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"]},"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"]},"Scan":{"properties":{"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"valid":{"type":"boolean"}},"type":"object","required":["id","runner","distance","valid"]},"Track":{"properties":{"id":{"type":"integer"},"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","name","distance"]},"ScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"track":{"minLength":1,"type":"string"},"key":{"type":"string","minLength":1},"enabled":{"type":"boolean"}},"type":"object","required":["id","track","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":{"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"}},"type":"object","required":["track","card","station","distance","timestamp","id","runner","valid"]},"RunnerCard":{"properties":{"id":{"type":"integer"},"runner":{},"code":{"minLength":1,"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id","code","enabled"]},"Runner":{"properties":{"group":{"minLength":1,"type":"string"},"distance":{"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","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"]},"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"]},"UpdateRunner":{"properties":{"id":{"type":"integer"},"group":{"$ref":"#/components/schemas/RunnerGroup"},"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"]},"ResponseEmpty":{"properties":{"response":{"type":"string"}},"type":"object","required":["response"]},"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"]},"ResponseRunner":{"properties":{"distance":{"type":"integer"},"group":{"$ref":"#/components/schemas/RunnerGroup"},"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"]},"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"]},"ResponseRunnerGroup":{"properties":{"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["id","name"]},"ResponseRunnerOrganisation":{"properties":{"address":{"minLength":1,"type":"string","$ref":"#/components/schemas/Address"},"teams":{"items":{},"type":"array"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["address","teams","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":"string","$ref":"#/components/schemas/RunnerOrganisation"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["id","parentGroup","name"]},"ResponseRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string","$ref":"#/components/schemas/RunnerOrganisation"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["parentGroup","id","name"]},"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"]},"CreateTrack":{"properties":{"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["name","distance"]},"ResponseTrack":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"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"},"groupId":{}},"type":"object","required":["firstname","lastname","password"]},"CreateUserGroup":{"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["name"]}},"securitySchemes":{"AuthToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"info":{"title":"LfK! Backend API","version":"1.0.0","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/Auth"},{"$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":"Create a new access token object"}},"/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":"Create a new access token object"}},"/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/Auth"},{"$ref":"#/components/schemas/JwtNotProvidedError"},{"$ref":"#/components/schemas/IllegalJWTError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/RefreshTokenCountInvalidError"}]}}},"description":""}},"summary":"Refresh","tags":["Auth"],"description":"refresh a access token"}},"/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"],"description":"Lists all runners."},"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"],"description":"Create a new runner object (id will be generated automagicly)."}},"/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"],"description":"Returns a runner of a specified id (if it exists)"},"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"],"description":"Update a runner object (id 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"],"description":"Delete a specified runner (if it exists)."}},"/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"],"description":"Lists all runnerTeams."},"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"],"description":"Create a new runnerTeam object (id will be generated automagicly)."}},"/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"],"description":"Returns a runnerTeam of a specified id (if it exists)"},"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"],"description":"Update a runnerTeam object (id 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"],"description":"Delete a specified runnerTeam (if it exists)."}},"/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"],"description":"Lists all runnerOrganisations."},"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"],"description":"Create a new runnerOrganisation object (id will be generated automagicly)."}},"/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"],"description":"Returns a runnerOrganisation of a specified id (if it exists)"},"put":{"operationId":"RunnerOrganisationController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOrganisation"}}},"description":"RunnerOrganisation","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"],"description":"Update a runnerOrganisation object (id 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"],"description":"Delete a specified runnerOrganisation (if it exists)."}},"/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"],"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":""}},"summary":"Post","tags":["Track"],"description":"Create a new track object (id will be generated automagicly)."}},"/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"],"description":"Returns a track of a specified id (if it exists)"},"put":{"operationId":"TrackController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Track"}}},"description":"Track","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":{"$ref":"#/components/schemas/TrackIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Track"],"description":"Update a track object (id can't be changed)."},"delete":{"operationId":"TrackController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"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"],"description":"Delete a specified track (if it exists)."}},"/api/users":{"get":{"operationId":"UserController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/User"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User"],"description":"Lists all users."},"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/User"},{"$ref":"#/components/schemas/UserGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["User"],"description":"Create a new user object (id will be generated automagicly)."}},"/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/User"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User"],"description":"Returns a user of a specified id (if it exists)"},"put":{"operationId":"UserController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"User","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"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"],"description":"Update a user object (id can't be changed)."},"delete":{"operationId":"UserController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User"],"description":"Delete a specified runner (if it exists)."}},"/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"],"description":"Lists all usergroups."},"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"],"description":"Create a new usergroup object (id will be generated automagicly)."}},"/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"],"description":"Returns a usergroup of a specified id (if it exists)"},"put":{"operationId":"UserGroupController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":"UserGroup","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"],"description":"Update a usergroup object (id can't be changed)."},"delete":{"operationId":"UserGroupController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User Group"],"description":"Delete a specified usergroup (if it exists)."}}}} \ 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"]},"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","id"]},"Permission":{"properties":{"id":{"type":"integer"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION"],"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":{"type":"string"},"actions":{},"id":{"type":"integer"}},"type":"object","required":["uuid","email","username","firstname","lastname","password","enabled","refreshTokenCount","id"]},"UserIdsNotMatchingError":{"properties":{"name":{"type":"string"},"message":{"type":"string"}},"type":"object","required":["name","message"]},"Auth":{"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"]},"Logout":{"properties":{"timestamp":{"type":"string"}},"type":"object","required":["timestamp"]},"HandleLogout":{"properties":{"token":{"type":"string"}},"type":"object"},"RefreshAuth":{"properties":{"token":{"type":"string"}},"type":"object"},"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"]},"Donation":{"properties":{"id":{"type":"integer"},"donor":{"minLength":1,"type":"string"}},"type":"object","required":["id","donor"]},"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"]},"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"]},"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"]},"Scan":{"properties":{"id":{"type":"integer"},"runner":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"},"valid":{"type":"boolean"}},"type":"object","required":["id","runner","distance","valid"]},"Track":{"properties":{"id":{"type":"integer"},"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["id","name","distance"]},"ScanStation":{"properties":{"id":{"type":"integer"},"description":{"type":"string"},"track":{"minLength":1,"type":"string"},"key":{"type":"string","minLength":1},"enabled":{"type":"boolean"}},"type":"object","required":["id","track","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":{"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"}},"type":"object","required":["track","card","station","distance","timestamp","id","runner","valid"]},"RunnerCard":{"properties":{"id":{"type":"integer"},"runner":{},"code":{"minLength":1,"type":"string"},"enabled":{"type":"boolean"}},"type":"object","required":["id","code","enabled"]},"Runner":{"properties":{"group":{"minLength":1,"type":"string"},"distance":{"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","id","firstname","lastname"]},"RunnerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["id","name"]},"RunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string"},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["parentGroup","id","name"]},"RunnerOrganisation":{"properties":{"address":{},"id":{"type":"integer"},"name":{"type":"string","minLength":1},"contact":{}},"type":"object","required":["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"]},"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"]},"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"]},"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"]},"ResponseRunner":{"properties":{"distance":{"type":"integer"},"group":{"$ref":"#/components/schemas/RunnerGroup"},"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"]},"UpdateRunner":{"properties":{"id":{"type":"integer"},"group":{"$ref":"#/components/schemas/RunnerGroup"},"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"]},"ResponseEmpty":{"properties":{"response":{"type":"string"}},"type":"object","required":["response"]},"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"],"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":"string","$ref":"#/components/schemas/Principal"},"target":{"minLength":1,"type":"string"},"action":{"minLength":1,"type":"string"}},"type":"object","required":["id","principal","target","action"]},"ResponsePermission":{"properties":{"id":{"type":"integer"},"principal":{"minLength":1,"type":"string","$ref":"#/components/schemas/ResponsePrincipal"},"target":{"enum":["RUNNER","ORGANISATION","TEAM","TRACK","USER","USERGROUP","PERMISSION"],"type":"string","minLength":1},"action":{"enum":["GET","CREATE","UPDATE","DELETE","IMPORT"],"type":"string","minLength":1}},"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"]},"ResponseRunnerGroup":{"properties":{"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["id","name"]},"ResponseRunnerOrganisation":{"properties":{"address":{"minLength":1,"type":"string","$ref":"#/components/schemas/Address"},"teams":{"items":{},"type":"array"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["address","teams","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":"string","$ref":"#/components/schemas/RunnerOrganisation"},"name":{"type":"string","minLength":1},"contact":{"type":"integer"}},"type":"object","required":["id","parentGroup","name"]},"ResponseRunnerTeam":{"properties":{"parentGroup":{"minLength":1,"type":"string","$ref":"#/components/schemas/RunnerOrganisation"},"id":{"minLength":1,"type":"integer"},"name":{"minLength":1,"type":"string"},"contact":{"$ref":"#/components/schemas/GroupContact"}},"type":"object","required":["parentGroup","id","name"]},"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"]},"CreateTrack":{"properties":{"name":{"minLength":1,"type":"string"},"distance":{"exclusiveMinimum":true,"minimum":0,"type":"integer"}},"type":"object","required":["name","distance"]},"ResponseTrack":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"distance":{"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"},"groups":{}},"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":{}},"type":"object","required":["id","firstname","lastname","enabled"]},"CreateUserGroup":{"properties":{"name":{"type":"string"},"description":{"type":"string"}},"type":"object","required":["name"]}},"securitySchemes":{"AuthToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"info":{"title":"LfK! Backend API","version":"1.0.0","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/Auth"},{"$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":"Create a new access token object"}},"/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":"Create a new access token object"}},"/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/Auth"},{"$ref":"#/components/schemas/JwtNotProvidedError"},{"$ref":"#/components/schemas/IllegalJWTError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/RefreshTokenCountInvalidError"}]}}},"description":""}},"summary":"Refresh","tags":["Auth"],"description":"refresh a access token"}},"/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":[]}],"description":"Lists all runners."},"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":[]}],"description":"Create a new runner object (id will be generated automagicly)."}},"/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":[]}],"description":"Returns a runner of a specified id (if it exists)"},"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":[]}],"description":"Update a runner object (id 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":[]}],"description":"Delete a specified runner (if it exists)."}},"/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":[]}],"description":"Create new runners from json and insert them (or their teams) into the provided group"}},"/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":[]}],"description":"Create new runners from json and insert them (or their teams) into the provided org"}},"/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":[]}],"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":[]}],"description":"Create new runners from csv and insert them (or their teams) into the provided group"}},"/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":[]}],"description":"Create new runners from csv and insert them (or their teams) into the provided org"}},"/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":[]}],"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":[]}],"description":"Lists all permissions."},"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":[]}],"description":"Create a new runnerTeam object (id will be generated automagicly)."}},"/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":[]}],"description":"Returns a permissions of a specified id (if it exists)"},"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":[]}],"description":"Update a permission object (id 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":[]}],"description":"Delete a specified permission (if it exists)."}},"/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":[]}],"description":"Lists all runnerTeams."},"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":[]}],"description":"Create a new runnerTeam object (id will be generated automagicly)."}},"/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":[]}],"description":"Returns a runnerTeam of a specified id (if it exists)"},"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":[]}],"description":"Update a runnerTeam object (id 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":[]}],"description":"Delete a specified runnerTeam (if it exists)."}},"/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":[]}],"description":"Lists all runnerOrganisations."},"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":[]}],"description":"Create a new runnerOrganisation object (id will be generated automagicly)."}},"/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":[]}],"description":"Returns a runnerOrganisation of a specified id (if it exists)"},"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":[]}],"description":"Update a runnerOrganisation object (id 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":[]}],"description":"Delete a specified runnerOrganisation (if it exists)."}},"/api/status":{"get":{"operationId":"StatusController.get","responses":{"200":{"content":{"application/json":{}},"description":"Successful response"}},"summary":"Get","tags":["Status"],"description":"Lists all tracks."}},"/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":[]}]},"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":""}},"summary":"Post","tags":["Track"],"security":[{"AuthToken":[]}],"description":"Create a new track object (id will be generated automagicly)."}},"/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":[]}],"description":"Returns a track of a specified id (if it exists)"},"put":{"operationId":"TrackController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Track"}}},"description":"Track","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":{"$ref":"#/components/schemas/TrackIdsNotMatchingError"}}},"description":""}},"summary":"Put","tags":["Track"],"security":[{"AuthToken":[]}],"description":"Update a track object (id can't be changed)."},"delete":{"operationId":"TrackController.remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"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":[]}],"description":"Delete a specified track (if it exists)."}},"/api/users":{"get":{"operationId":"UserController.getAll","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/User"},"type":"array"}}},"description":""}},"summary":"Get all","tags":["User"],"security":[{"AuthToken":[]}],"description":"Lists all users."},"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/User"},{"$ref":"#/components/schemas/UserGroupNotFoundError"}]}}},"description":""}},"summary":"Post","tags":["User"],"security":[{"AuthToken":[]}],"description":"Create a new user object (id will be generated automagicly)."}},"/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/User"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFoundError"}}},"description":""}},"summary":"Get one","tags":["User"],"security":[{"AuthToken":[]}],"description":"Returns a user of a specified id (if it exists)"},"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/User"}}},"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":[]}],"description":"Update a user object (id 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/User"}}},"description":""},"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseEmpty"}}},"description":""}},"summary":"Remove","tags":["User"],"security":[{"AuthToken":[]}],"description":"Delete a user runner (if it exists)."}},"/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":[]}],"description":"Lists all usergroups."},"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":[]}],"description":"Create a new usergroup object (id will be generated automagicly)."}},"/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":[]}],"description":"Returns a usergroup of a specified id (if it exists)"},"put":{"operationId":"UserGroupController.put","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroup"}}},"description":"UserGroup","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":[]}],"description":"Update a usergroup object (id 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":[]}],"description":"Delete a specified usergroup (if it exists)."}}}} \ No newline at end of file