new lib version [CI SKIP]

This commit is contained in:
Nicolai Ort 2020-12-30 18:01:24 +00:00
parent 33157c934e
commit 5b44c086f2
243 changed files with 3198 additions and 2011 deletions

View File

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

View File

@ -3,7 +3,7 @@ import type { ApiResult } from './ApiResult';
/**
* Request using fetch client
* @param options The request options from the the service
* @result ApiResult
* @returns ApiResult
* @throws ApiError
*/
export declare function request(options: ApiRequestOptions): Promise<ApiResult>;

View File

@ -111,6 +111,9 @@ async function sendRequest(options, url) {
headers: await getHeaders(options),
body: getRequestBody(options),
};
if (OpenAPI_1.OpenAPI.WITH_CREDENTIALS) {
request.credentials = 'include';
}
return await fetch(url, request);
}
function getResponseHeader(response, responseHeader) {
@ -162,7 +165,7 @@ function catchErrors(options, result) {
/**
* Request using fetch client
* @param options The request options from the the service
* @result ApiResult
* @returns ApiResult
* @throws ApiError
*/
async function request(options) {

39
dist/index.d.ts vendored
View File

@ -6,38 +6,59 @@ 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 { CreateResetToken } from './models/CreateResetToken';
export type { CreateRunner } from './models/CreateRunner';
export type { CreateRunnerGroup } from './models/CreateRunnerGroup';
export type { CreateRunnerOrganisation } from './models/CreateRunnerOrganisation';
export type { CreateRunnerTeam } from './models/CreateRunnerTeam';
export type { CreateStatsClient } from './models/CreateStatsClient';
export type { CreateTrack } from './models/CreateTrack';
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 { ResetAlreadyRequestedError } from './models/ResetAlreadyRequestedError';
export type { ResetPassword } from './models/ResetPassword';
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 { ResponseStats } from './models/ResponseStats';
export type { ResponseStatsClient } from './models/ResponseStatsClient';
export type { ResponseStatsOrgnisation } from './models/ResponseStatsOrgnisation';
export type { ResponseStatsRunner } from './models/ResponseStatsRunner';
export type { ResponseStatsTeam } from './models/ResponseStatsTeam';
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';
@ -58,14 +79,21 @@ export type { RunnerTeamNeedsParentError } from './models/RunnerTeamNeedsParentE
export type { RunnerTeamNotFoundError } from './models/RunnerTeamNotFoundError';
export type { Scan } from './models/Scan';
export type { ScanStation } from './models/ScanStation';
export type { StatsClient } from './models/StatsClient';
export type { StatsClientIdsNotMatchingError } from './models/StatsClientIdsNotMatchingError';
export type { StatsClientNotFoundError } from './models/StatsClientNotFoundError';
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 { UserDisabledError } from './models/UserDisabledError';
export type { UserGroup } from './models/UserGroup';
export type { UserGroupIdsNotMatchingError } from './models/UserGroupIdsNotMatchingError';
export type { UserGroupNotFoundError } from './models/UserGroupNotFoundError';
@ -75,9 +103,14 @@ 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 { StatsClientService } from './services/StatsClientService';
export { StatsService } from './services/StatsService';
export { StatusService } from './services/StatusService';
export { TrackService } from './services/TrackService';
export { UserGroupService } from './services/UserGroupService';
export { UserService } from './services/UserService';

20
dist/index.js vendored
View File

@ -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.StatsService = exports.StatsClientService = 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,32 @@ 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 StatsClientService_1 = require("./services/StatsClientService");
Object.defineProperty(exports, "StatsClientService", { enumerable: true, get: function () { return StatsClientService_1.StatsClientService; } });
var StatsService_1 = require("./services/StatsService");
Object.defineProperty(exports, "StatsService", { enumerable: true, get: function () { return StatsService_1.StatsService; } });
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");

View File

@ -1,5 +1,5 @@
export declare type CreateAuth = {
username?: string;
password: string;
email?: string;
password: string;
};

24
dist/models/CreatePermission.d.ts vendored Normal file
View File

@ -0,0 +1,24 @@
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",
STATSCLIENT = "STATSCLIENT"
}
enum action {
GET = "GET",
CREATE = "CREATE",
UPDATE = "UPDATE",
DELETE = "DELETE",
IMPORT = "IMPORT"
}
}

28
dist/models/CreatePermission.js vendored Normal file
View File

@ -0,0 +1,28 @@
"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["STATSCLIENT"] = "STATSCLIENT";
})(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 = {}));

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

@ -0,0 +1,4 @@
export declare type CreateResetToken = {
username?: string;
email?: string;
};

3
dist/models/CreateStatsClient.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
export declare type CreateStatsClient = {
description?: string;
};

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

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

View File

@ -6,5 +6,6 @@ export declare type CreateUser = {
email?: string;
phone?: string;
password: string;
groupId?: any;
enabled?: boolean;
groups?: any;
};

View File

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

7
dist/models/ImportRunner.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
export declare type ImportRunner = {
firstname: string;
middlename?: string;
lastname: string;
team?: string;
class?: string;
};

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

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

12
dist/models/JwtUser.d.ts vendored Normal file
View File

@ -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;
};

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

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

View File

@ -1,5 +1,24 @@
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",
STATSCLIENT = "STATSCLIENT"
}
enum action {
GET = "GET",
CREATE = "CREATE",
UPDATE = "UPDATE",
DELETE = "DELETE",
IMPORT = "IMPORT"
}
}

View File

@ -3,3 +3,26 @@
/* 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["STATSCLIENT"] = "STATSCLIENT";
})(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 = {}));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

3
dist/models/Principal.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
export declare type Principal = {
id: number;
};

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

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

View File

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

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

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

View File

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

View File

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

View File

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

View File

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

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

@ -0,0 +1,4 @@
export declare type ResetPassword = {
resetToken?: string;
password: string;
};

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

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

26
dist/models/ResponsePermission.d.ts vendored Normal file
View File

@ -0,0 +1,26 @@
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",
STATSCLIENT = "STATSCLIENT"
}
enum action {
GET = "GET",
CREATE = "CREATE",
UPDATE = "UPDATE",
DELETE = "DELETE",
IMPORT = "IMPORT"
}
}

28
dist/models/ResponsePermission.js vendored Normal file
View File

@ -0,0 +1,28 @@
"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["STATSCLIENT"] = "STATSCLIENT";
})(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 = {}));

3
dist/models/ResponsePrincipal.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
export declare type ResponsePrincipal = {
id: number;
};

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

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

10
dist/models/ResponseStats.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
export declare type ResponseStats = {
total_runners: number;
total_teams: number;
total_orgs: number;
total_users: number;
total_scans: number;
total_distance: number;
total_donation: number;
average_distance: number;
};

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

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

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

@ -0,0 +1,6 @@
export declare type ResponseStatsClient = {
id: number;
description?: string;
key?: string;
prefix: string;
};

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

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

View File

@ -0,0 +1,6 @@
export declare type ResponseStatsOrgnisation = {
id: number;
name: string;
distance: number;
donationAmount: number;
};

View File

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

10
dist/models/ResponseStatsRunner.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
import type { RunnerGroup } from './RunnerGroup';
export declare type ResponseStatsRunner = {
id: number;
firstname: string;
middlename: string;
lastname: string;
distance: number;
donationAmount: number;
group: RunnerGroup;
};

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

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

8
dist/models/ResponseStatsTeam.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
import type { RunnerGroup } from './RunnerGroup';
export declare type ResponseStatsTeam = {
id: number;
name: string;
distance: number;
donationAmount: number;
parent: RunnerGroup;
};

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

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

13
dist/models/ResponseUser.d.ts vendored Normal file
View File

@ -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<any>;
permissions?: Array<any>;
id: number;
};

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

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

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

@ -0,0 +1,6 @@
export declare type ResponseUserGroup = {
name: string;
description?: string;
permissions?: Array<any>;
id: number;
};

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

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

View File

@ -1,6 +1,7 @@
export declare type Runner = {
group: string;
distance: number;
distanceDonationAmount: number;
id: number;
firstname: string;
middlename?: string;

View File

@ -2,4 +2,6 @@ export declare type RunnerGroup = {
id: number;
name: string;
contact?: any;
distance: number;
distanceDonationAmount: number;
};

View File

@ -1,5 +1,7 @@
export declare type RunnerOrganisation = {
address?: any;
distance: number;
distanceDonationAmount: number;
id: number;
name: string;
contact?: any;

View File

@ -3,4 +3,6 @@ export declare type RunnerTeam = {
id: number;
name: string;
contact?: any;
distance: number;
distanceDonationAmount: number;
};

7
dist/models/StatsClient.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
export declare type StatsClient = {
id: number;
description?: string;
prefix: string;
key: string;
cleartextkey?: string;
};

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

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

View File

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

View File

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

View File

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

View File

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

7
dist/models/UpdatePermission.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
import type { Principal } from './Principal';
export declare type UpdatePermission = {
id: number;
principal: Principal;
target: string;
action: string;
};

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

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

View File

@ -0,0 +1,6 @@
export declare type UpdateRunnerOrganisation = {
id: number;
address?: number;
name: string;
contact?: number;
};

View File

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

12
dist/models/UpdateUser.d.ts vendored Normal file
View File

@ -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;
};

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

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

View File

@ -1,5 +1,4 @@
export declare type User = {
id: number;
uuid: string;
email: string;
phone?: string;
@ -8,10 +7,11 @@ export declare type User = {
middlename?: string;
lastname: string;
password: string;
permissions?: any;
groups?: any;
enabled: boolean;
refreshTokenCount: number;
profilePic?: string;
resetRequestedTimestamp?: string;
actions?: any;
id: number;
};

View File

@ -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"
}
}

View File

@ -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 = {}));

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

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

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

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

View File

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

View File

@ -1,5 +1,6 @@
import type { Auth } from '../models/Auth';
import type { CreateAuth } from '../models/CreateAuth';
import type { CreateResetToken } from '../models/CreateResetToken';
import type { HandleLogout } from '../models/HandleLogout';
import type { IllegalJWTError } from '../models/IllegalJWTError';
import type { InvalidCredentialsError } from '../models/InvalidCredentialsError';
@ -8,31 +9,53 @@ import type { Logout } from '../models/Logout';
import type { PasswordNeededError } from '../models/PasswordNeededError';
import type { RefreshAuth } from '../models/RefreshAuth';
import type { RefreshTokenCountInvalidError } from '../models/RefreshTokenCountInvalidError';
import type { ResetPassword } from '../models/ResetPassword';
import type { UsernameOrEmailNeededError } from '../models/UsernameOrEmailNeededError';
import type { UserNotFoundError } from '../models/UserNotFoundError';
export declare class AuthService {
/**
* Login
* Create a new access token object
* Login with your username/email and password. <br> You will receive:
* * access token (use it as a bearer token)
* * refresh token (will also be sent as a cookie)
* @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
* Logout using your refresh token. <br> This instantly invalidates all your access and refresh tokens.
* @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
* Refresh your access and refresh tokens using a valid refresh token. <br> You will receive:
* * access token (use it as a bearer token)
* * refresh token (will also be sent as a cookie)
* @param requestBody RefreshAuth
* @result any
* @returns any
* @throws ApiError
*/
static authControllerRefresh(requestBody?: RefreshAuth): Promise<(Auth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>;
/**
* Get reset token
* Request a password reset token. <br> This will provide you with a reset token that you can use by posting to /api/auth/reset/{token}.
* @param requestBody CreateResetToken
* @returns any
* @throws ApiError
*/
static authControllerGetResetToken(requestBody?: CreateResetToken): Promise<(Auth | UserNotFoundError | UsernameOrEmailNeededError)>;
/**
* Reset password
* Reset a user's utilising a valid password reset token. <br> This will set the user's password to the one you provided in the body. <br> To get a reset token post to /api/auth/reset with your username.
* @param token
* @param requestBody ResetPassword
* @returns any
* @throws ApiError
*/
static authControllerResetPassword(token: string, requestBody?: ResetPassword): Promise<(Auth | UserNotFoundError | UsernameOrEmailNeededError)>;
}

View File

@ -5,9 +5,11 @@ const request_1 = require("../core/request");
class AuthService {
/**
* Login
* Create a new access token object
* Login with your username/email and password. <br> You will receive:
* * access token (use it as a bearer token)
* * refresh token (will also be sent as a cookie)
* @param requestBody CreateAuth
* @result any
* @returns any
* @throws ApiError
*/
static async authControllerLogin(requestBody) {
@ -20,9 +22,9 @@ class AuthService {
}
/**
* Logout
* Create a new access token object
* Logout using your refresh token. <br> This instantly invalidates all your access and refresh tokens.
* @param requestBody HandleLogout
* @result any
* @returns any
* @throws ApiError
*/
static async authControllerLogout(requestBody) {
@ -35,9 +37,11 @@ class AuthService {
}
/**
* Refresh
* refresh a access token
* Refresh your access and refresh tokens using a valid refresh token. <br> You will receive:
* * access token (use it as a bearer token)
* * refresh token (will also be sent as a cookie)
* @param requestBody RefreshAuth
* @result any
* @returns any
* @throws ApiError
*/
static async authControllerRefresh(requestBody) {
@ -48,5 +52,36 @@ class AuthService {
});
return result.body;
}
/**
* Get reset token
* Request a password reset token. <br> This will provide you with a reset token that you can use by posting to /api/auth/reset/{token}.
* @param requestBody CreateResetToken
* @returns any
* @throws ApiError
*/
static async authControllerGetResetToken(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/auth/reset`,
body: requestBody,
});
return result.body;
}
/**
* Reset password
* Reset a user's utilising a valid password reset token. <br> This will set the user's password to the one you provided in the body. <br> To get a reset token post to /api/auth/reset with your username.
* @param token
* @param requestBody ResetPassword
* @returns any
* @throws ApiError
*/
static async authControllerResetPassword(token, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/auth/reset/${token}`,
body: requestBody,
});
return result.body;
}
}
exports.AuthService = AuthService;

55
dist/services/ImportService.d.ts vendored Normal file
View File

@ -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 into the provided group. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @param group
* @param requestBody ImportRunner
* @returns ResponseRunner
* @throws ApiError
*/
static importControllerPostJson(group?: number, requestBody?: Array<ImportRunner>): Promise<Array<ResponseRunner>>;
/**
* Post orgs json
* Create new runners from json and insert them into the provided org. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @param id
* @param requestBody ImportRunner
* @returns ResponseRunner
* @throws ApiError
*/
static importControllerPostOrgsJson(id: number, requestBody?: Array<ImportRunner>): Promise<Array<ResponseRunner>>;
/**
* 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<ImportRunner>): Promise<Array<ResponseRunner>>;
/**
* Post csv
* Create new runners from csv and insert them into the provided group. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @param group
* @returns ResponseRunner
* @throws ApiError
*/
static importControllerPostCsv(group?: number): Promise<Array<ResponseRunner>>;
/**
* Post orgs csv
* Create new runners from csv and insert them into the provided org. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @param id
* @returns ResponseRunner
* @throws ApiError
*/
static importControllerPostOrgsCsv(id: number): Promise<Array<ResponseRunner>>;
/**
* 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<Array<ResponseRunner>>;
}

103
dist/services/ImportService.js vendored Normal file
View File

@ -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 into the provided group. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @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 into the provided org. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @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 into the provided group. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @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 into the provided org. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
* @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;

49
dist/services/PermissionService.d.ts vendored Normal file
View File

@ -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 for all users and groups.
* @returns ResponsePermission
* @throws ApiError
*/
static permissionControllerGetAll(): Promise<Array<ResponsePermission>>;
/**
* Post
* Create a new permission for a existing principal(user/group). <br> If a permission with this target, action and prinicpal already exists that permission will be returned instead of creating a new one.
* @param requestBody CreatePermission
* @returns ResponsePermission
* @throws ApiError
*/
static permissionControllerPost(requestBody?: CreatePermission): Promise<ResponsePermission>;
/**
* Get one
* Lists all information about the permission whose id got provided.
* @param id
* @returns ResponsePermission
* @throws ApiError
*/
static permissionControllerGetOne(id: number): Promise<ResponsePermission>;
/**
* Put
* Update a permission object. <br> If updateing the permission object would result in duplicate permission (same target, action and principal) this permission will get deleted and the existing permission will be returned. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdatePermission
* @returns ResponsePrincipal
* @throws ApiError
*/
static permissionControllerPut(id: number, requestBody?: UpdatePermission): Promise<ResponsePrincipal>;
/**
* Remove
* Deletes the permission whose id you provide. <br> If no permission with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponsePermission
* @returns ResponseEmpty
* @throws ApiError
*/
static permissionControllerRemove(id: number, force?: boolean): Promise<ResponsePermission | ResponseEmpty>;
}

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

@ -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 for all users and groups.
* @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 permission for a existing principal(user/group). <br> If a permission with this target, action and prinicpal already exists that permission will be returned instead of creating a new one.
* @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
* Lists all information about the permission whose id got provided.
* @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. <br> If updateing the permission object would result in duplicate permission (same target, action and principal) this permission will get deleted and the existing permission will be returned. <br> Please remember that ids 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
* Deletes the permission whose id you provide. <br> If no permission with this id exists it will just return 204(no content).
* @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;

View File

@ -1,47 +1,47 @@
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
* Lists all organisations. <br> This includes their address, contact and teams (if existing/associated).
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerGetAll(): Promise<Array<ResponseRunnerOrganisation>>;
/**
* Post
* Create a new runnerOrganisation object (id will be generated automagicly).
* Create a new organsisation.
* @param requestBody CreateRunnerOrganisation
* @result ResponseRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerPost(requestBody?: CreateRunnerOrganisation): Promise<ResponseRunnerOrganisation>;
/**
* Get one
* Returns a runnerOrganisation of a specified id (if it exists)
* Lists all information about the organisation whose id got provided.
* @param id
* @result ResponseRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerGetOne(id: number): Promise<ResponseRunnerOrganisation>;
/**
* Put
* Update a runnerOrganisation object (id can't be changed).
* Update the organisation whose id you provided. <br> Please remember that ids 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<ResponseRunnerOrganisation>;
static runnerOrganisationControllerPut(id: number, requestBody?: UpdateRunnerOrganisation): Promise<ResponseRunnerOrganisation>;
/**
* Remove
* Delete a specified runnerOrganisation (if it exists).
* Delete the organsisation whose id you provided. <br> If the organisation still has runners and/or teams associated this will fail. <br> To delete the organisation with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while). <br> If no organisation with this id exists it will just return 204(no content).
* @param id
* @param force
* @result ResponseRunnerOrganisation
* @result ResponseEmpty
* @returns ResponseRunnerOrganisation
* @returns ResponseEmpty
* @throws ApiError
*/
static runnerOrganisationControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerOrganisation | ResponseEmpty>;

View File

@ -5,8 +5,8 @@ const request_1 = require("../core/request");
class RunnerOrganisationService {
/**
* Get all
* Lists all runnerOrganisations.
* @result ResponseRunnerOrganisation
* Lists all organisations. <br> This includes their address, contact and teams (if existing/associated).
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetAll() {
@ -18,9 +18,9 @@ class RunnerOrganisationService {
}
/**
* Post
* Create a new runnerOrganisation object (id will be generated automagicly).
* Create a new organsisation.
* @param requestBody CreateRunnerOrganisation
* @result ResponseRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPost(requestBody) {
@ -33,9 +33,9 @@ class RunnerOrganisationService {
}
/**
* Get one
* Returns a runnerOrganisation of a specified id (if it exists)
* Lists all information about the organisation whose id got provided.
* @param id
* @result ResponseRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetOne(id) {
@ -47,10 +47,10 @@ class RunnerOrganisationService {
}
/**
* Put
* Update a runnerOrganisation object (id can't be changed).
* Update the organisation whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody RunnerOrganisation
* @result ResponseRunnerOrganisation
* @param requestBody UpdateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPut(id, requestBody) {
@ -63,11 +63,11 @@ class RunnerOrganisationService {
}
/**
* Remove
* Delete a specified runnerOrganisation (if it exists).
* Delete the organsisation whose id you provided. <br> If the organisation still has runners and/or teams associated this will fail. <br> To delete the organisation with all associated runners and teams set the force QueryParam to true (cascading deletion might take a while). <br> If no organisation with this id exists it will just return 204(no content).
* @param id
* @param force
* @result ResponseRunnerOrganisation
* @result ResponseEmpty
* @returns ResponseRunnerOrganisation
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerOrganisationControllerRemove(id, force) {

View File

@ -7,43 +7,43 @@ import type { UpdateRunner } from '../models/UpdateRunner';
export declare class RunnerService {
/**
* Get all
* Lists all runners.
* @result ResponseRunner
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* @returns ResponseRunner
* @throws ApiError
*/
static runnerControllerGetAll(): Promise<Array<ResponseRunner>>;
/**
* Post
* Create a new runner object (id will be generated automagicly).
* Create a new runner. <br> Please remeber to provide the runner's group's id.
* @param requestBody CreateRunner
* @result any
* @returns any
* @throws ApiError
*/
static runnerControllerPost(requestBody?: CreateRunner): Promise<(ResponseRunner | RunnerGroupNeededError | RunnerGroupNotFoundError)>;
/**
* Get one
* Returns a runner of a specified id (if it exists)
* Lists all information about the runner whose id got provided.
* @param id
* @result ResponseRunner
* @returns ResponseRunner
* @throws ApiError
*/
static runnerControllerGetOne(id: number): Promise<ResponseRunner>;
/**
* Put
* Update a runner object (id can't be changed).
* Update the runner whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunner
* @result ResponseRunner
* @returns ResponseRunner
* @throws ApiError
*/
static runnerControllerPut(id: number, requestBody?: UpdateRunner): Promise<ResponseRunner>;
/**
* Remove
* Delete a specified runner (if it exists).
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content).
* @param id
* @param force
* @result ResponseRunner
* @result ResponseEmpty
* @returns ResponseRunner
* @returns ResponseEmpty
* @throws ApiError
*/
static runnerControllerRemove(id: number, force?: boolean): Promise<ResponseRunner | ResponseEmpty>;

View File

@ -5,8 +5,8 @@ const request_1 = require("../core/request");
class RunnerService {
/**
* Get all
* Lists all runners.
* @result ResponseRunner
* Lists all runners from all teams/orgs. <br> This includes the runner's group and distance ran.
* @returns ResponseRunner
* @throws ApiError
*/
static async runnerControllerGetAll() {
@ -18,9 +18,9 @@ class RunnerService {
}
/**
* Post
* Create a new runner object (id will be generated automagicly).
* Create a new runner. <br> Please remeber to provide the runner's group's id.
* @param requestBody CreateRunner
* @result any
* @returns any
* @throws ApiError
*/
static async runnerControllerPost(requestBody) {
@ -33,9 +33,9 @@ class RunnerService {
}
/**
* Get one
* Returns a runner of a specified id (if it exists)
* Lists all information about the runner whose id got provided.
* @param id
* @result ResponseRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async runnerControllerGetOne(id) {
@ -47,10 +47,10 @@ class RunnerService {
}
/**
* Put
* Update a runner object (id can't be changed).
* Update the runner whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunner
* @result ResponseRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async runnerControllerPut(id, requestBody) {
@ -63,11 +63,11 @@ class RunnerService {
}
/**
* Remove
* Delete a specified runner (if it exists).
* Delete the runner whose id you provided. <br> If no runner with this id exists it will just return 204(no content).
* @param id
* @param force
* @result ResponseRunner
* @result ResponseEmpty
* @returns ResponseRunner
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerControllerRemove(id, force) {

View File

@ -5,43 +5,43 @@ import type { UpdateRunnerTeam } from '../models/UpdateRunnerTeam';
export declare class RunnerTeamService {
/**
* Get all
* Lists all runnerTeams.
* @result ResponseRunnerTeam
* Lists all teams. <br> This includes their parent organisation and contact (if existing/associated).
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerGetAll(): Promise<Array<ResponseRunnerTeam>>;
/**
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* Create a new organsisation. <br> Please remember to provide it's parent group's id.
* @param requestBody CreateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerPost(requestBody?: CreateRunnerTeam): Promise<ResponseRunnerTeam>;
/**
* Get one
* Returns a runnerTeam of a specified id (if it exists)
* Lists all information about the team whose id got provided.
* @param id
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerGetOne(id: number): Promise<ResponseRunnerTeam>;
/**
* Put
* Update a runnerTeam object (id can't be changed).
* Update the team whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerPut(id: number, requestBody?: UpdateRunnerTeam): Promise<ResponseRunnerTeam>;
/**
* Remove
* Delete a specified runnerTeam (if it exists).
* Delete the team whose id you provided. <br> If the team still has runners associated this will fail. <br> To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while). <br> If no team with this id exists it will just return 204(no content).
* @param id
* @param force
* @result ResponseRunnerTeam
* @result ResponseEmpty
* @returns ResponseRunnerTeam
* @returns ResponseEmpty
* @throws ApiError
*/
static runnerTeamControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerTeam | ResponseEmpty>;

View File

@ -5,8 +5,8 @@ const request_1 = require("../core/request");
class RunnerTeamService {
/**
* Get all
* Lists all runnerTeams.
* @result ResponseRunnerTeam
* Lists all teams. <br> This includes their parent organisation and contact (if existing/associated).
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerGetAll() {
@ -18,9 +18,9 @@ class RunnerTeamService {
}
/**
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* Create a new organsisation. <br> Please remember to provide it's parent group's id.
* @param requestBody CreateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerPost(requestBody) {
@ -33,9 +33,9 @@ class RunnerTeamService {
}
/**
* Get one
* Returns a runnerTeam of a specified id (if it exists)
* Lists all information about the team whose id got provided.
* @param id
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerGetOne(id) {
@ -47,10 +47,10 @@ class RunnerTeamService {
}
/**
* Put
* Update a runnerTeam object (id can't be changed).
* Update the team whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerPut(id, requestBody) {
@ -63,11 +63,11 @@ class RunnerTeamService {
}
/**
* Remove
* Delete a specified runnerTeam (if it exists).
* Delete the team whose id you provided. <br> If the team still has runners associated this will fail. <br> To delete the team with all associated runners set the force QueryParam to true (cascading deletion might take a while). <br> If no team with this id exists it will just return 204(no content).
* @param id
* @param force
* @result ResponseRunnerTeam
* @result ResponseEmpty
* @returns ResponseRunnerTeam
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerTeamControllerRemove(id, force) {

37
dist/services/StatsClientService.d.ts vendored Normal file
View File

@ -0,0 +1,37 @@
import type { CreateStatsClient } from '../models/CreateStatsClient';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseStatsClient } from '../models/ResponseStatsClient';
export declare class StatsClientService {
/**
* Get all
* Lists all stats clients. Please remember that the key can only be viewed on creation.
* @returns ResponseStatsClient
* @throws ApiError
*/
static statsClientControllerGetAll(): Promise<Array<ResponseStatsClient>>;
/**
* Post
* Create a new stats client. <br> Please remember that the client's key will be generated automaticly and that it can only be viewed on creation.
* @param requestBody CreateStatsClient
* @returns ResponseStatsClient
* @throws ApiError
*/
static statsClientControllerPost(requestBody?: CreateStatsClient): Promise<ResponseStatsClient>;
/**
* Get one
* Lists all information about the stats client whose id got provided. Please remember that the key can only be viewed on creation.
* @param id
* @returns ResponseStatsClient
* @throws ApiError
*/
static statsClientControllerGetOne(id: number): Promise<ResponseStatsClient>;
/**
* Remove
* Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content).
* @param id
* @returns ResponseStatsClient
* @returns ResponseEmpty
* @throws ApiError
*/
static statsClientControllerRemove(id: number): Promise<ResponseStatsClient | ResponseEmpty>;
}

64
dist/services/StatsClientService.js vendored Normal file
View File

@ -0,0 +1,64 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatsClientService = void 0;
const request_1 = require("../core/request");
class StatsClientService {
/**
* Get all
* Lists all stats clients. Please remember that the key can only be viewed on creation.
* @returns ResponseStatsClient
* @throws ApiError
*/
static async statsClientControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/statsclients`,
});
return result.body;
}
/**
* Post
* Create a new stats client. <br> Please remember that the client's key will be generated automaticly and that it can only be viewed on creation.
* @param requestBody CreateStatsClient
* @returns ResponseStatsClient
* @throws ApiError
*/
static async statsClientControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/statsclients`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Lists all information about the stats client whose id got provided. Please remember that the key can only be viewed on creation.
* @param id
* @returns ResponseStatsClient
* @throws ApiError
*/
static async statsClientControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/statsclients/${id}`,
});
return result.body;
}
/**
* Remove
* Delete the stats client whose id you provided. <br> If no client with this id exists it will just return 204(no content).
* @param id
* @returns ResponseStatsClient
* @returns ResponseEmpty
* @throws ApiError
*/
static async statsClientControllerRemove(id) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/statsclients/${id}`,
});
return result.body;
}
}
exports.StatsClientService = StatsClientService;

62
dist/services/StatsService.d.ts vendored Normal file
View File

@ -0,0 +1,62 @@
import type { ResponseStats } from '../models/ResponseStats';
import type { ResponseStatsOrgnisation } from '../models/ResponseStatsOrgnisation';
import type { ResponseStatsRunner } from '../models/ResponseStatsRunner';
import type { ResponseStatsTeam } from '../models/ResponseStatsTeam';
export declare class StatsService {
/**
* Get
* A very basic stats endpoint providing basic counters for a dashboard or simmilar
* @returns ResponseStats
* @throws ApiError
*/
static statsControllerGet(): Promise<ResponseStats>;
/**
* Get top runners by distance
* Returns the top ten runners by distance.
* @returns ResponseStatsRunner
* @throws ApiError
*/
static statsControllerGetTopRunnersByDistance(): Promise<Array<ResponseStatsRunner>>;
/**
* Get top runners by donations
* Returns the top ten runners by donations.
* @returns ResponseStatsRunner
* @throws ApiError
*/
static statsControllerGetTopRunnersByDonations(): Promise<Array<ResponseStatsRunner>>;
/**
* Get top runners by track time
* Returns the top ten fastest track times (with their runner and the runner's group).
* @returns ResponseStatsRunner
* @throws ApiError
*/
static statsControllerGetTopRunnersByTrackTime(): Promise<Array<ResponseStatsRunner>>;
/**
* Get top teams by distance
* Returns the top ten teams by distance.
* @returns ResponseStatsTeam
* @throws ApiError
*/
static statsControllerGetTopTeamsByDistance(): Promise<Array<ResponseStatsTeam>>;
/**
* Get top teams by donations
* Returns the top ten teams by donations.
* @returns ResponseStatsTeam
* @throws ApiError
*/
static statsControllerGetTopTeamsByDonations(): Promise<Array<ResponseStatsTeam>>;
/**
* Get top orgs by distance
* Returns the top ten organisations by distance.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/
static statsControllerGetTopOrgsByDistance(): Promise<Array<ResponseStatsOrgnisation>>;
/**
* Get top orgs by donations
* Returns the top ten organisations by donations.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/
static statsControllerGetTopOrgsByDonations(): Promise<Array<ResponseStatsOrgnisation>>;
}

111
dist/services/StatsService.js vendored Normal file
View File

@ -0,0 +1,111 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatsService = void 0;
const request_1 = require("../core/request");
class StatsService {
/**
* Get
* A very basic stats endpoint providing basic counters for a dashboard or simmilar
* @returns ResponseStats
* @throws ApiError
*/
static async statsControllerGet() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats`,
});
return result.body;
}
/**
* Get top runners by distance
* Returns the top ten runners by distance.
* @returns ResponseStatsRunner
* @throws ApiError
*/
static async statsControllerGetTopRunnersByDistance() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/runners/distance`,
});
return result.body;
}
/**
* Get top runners by donations
* Returns the top ten runners by donations.
* @returns ResponseStatsRunner
* @throws ApiError
*/
static async statsControllerGetTopRunnersByDonations() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/runners/donations`,
});
return result.body;
}
/**
* Get top runners by track time
* Returns the top ten fastest track times (with their runner and the runner's group).
* @returns ResponseStatsRunner
* @throws ApiError
*/
static async statsControllerGetTopRunnersByTrackTime() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/scans`,
});
return result.body;
}
/**
* Get top teams by distance
* Returns the top ten teams by distance.
* @returns ResponseStatsTeam
* @throws ApiError
*/
static async statsControllerGetTopTeamsByDistance() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/teams/distance`,
});
return result.body;
}
/**
* Get top teams by donations
* Returns the top ten teams by donations.
* @returns ResponseStatsTeam
* @throws ApiError
*/
static async statsControllerGetTopTeamsByDonations() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/teams/donations`,
});
return result.body;
}
/**
* Get top orgs by distance
* Returns the top ten organisations by distance.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/
static async statsControllerGetTopOrgsByDistance() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/organisations/distance`,
});
return result.body;
}
/**
* Get top orgs by donations
* Returns the top ten organisations by donations.
* @returns ResponseStatsOrgnisation
* @throws ApiError
*/
static async statsControllerGetTopOrgsByDonations() {
const result = await request_1.request({
method: 'GET',
path: `/api/stats/organisations/donations`,
});
return result.body;
}
}
exports.StatsService = StatsService;

9
dist/services/StatusService.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
export declare class StatusService {
/**
* Get
* A very basic status/health endpoint that just checks if the database connection is available. <br> The available information depth will be expanded later.
* @returns any Successful response
* @throws ApiError
*/
static statusControllerGet(): Promise<any>;
}

23
dist/services/StatusService.js vendored Normal file
View File

@ -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
* A very basic status/health endpoint that just checks if the database connection is available. <br> The available information depth will be expanded later.
* @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;

View File

@ -6,41 +6,41 @@ export declare class TrackService {
/**
* Get all
* Lists all tracks.
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static trackControllerGetAll(): Promise<Array<ResponseTrack>>;
/**
* Post
* Create a new track object (id will be generated automagicly).
* Create a new track. <br> Please remember that the track's distance must be greater than 0.
* @param requestBody CreateTrack
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static trackControllerPost(requestBody?: CreateTrack): Promise<ResponseTrack>;
/**
* Get one
* Returns a track of a specified id (if it exists)
* Lists all information about the track whose id got provided.
* @param id
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static trackControllerGetOne(id: number): Promise<ResponseTrack>;
/**
* Put
* Update a track object (id can't be changed).
* Update the track whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody Track
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static trackControllerPut(id: number, requestBody?: Track): Promise<ResponseTrack>;
/**
* Remove
* Delete a specified track (if it exists).
* Delete the track whose id you provided. <br> If no track with this id exists it will just return 204(no content).
* @param id
* @result ResponseTrack
* @result ResponseEmpty
* @returns ResponseTrack
* @returns ResponseEmpty
* @throws ApiError
*/
static trackControllerRemove(id: number): Promise<ResponseTrack | ResponseEmpty>;

View File

@ -6,7 +6,7 @@ class TrackService {
/**
* Get all
* Lists all tracks.
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerGetAll() {
@ -18,9 +18,9 @@ class TrackService {
}
/**
* Post
* Create a new track object (id will be generated automagicly).
* Create a new track. <br> Please remember that the track's distance must be greater than 0.
* @param requestBody CreateTrack
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerPost(requestBody) {
@ -33,9 +33,9 @@ class TrackService {
}
/**
* Get one
* Returns a track of a specified id (if it exists)
* Lists all information about the track whose id got provided.
* @param id
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerGetOne(id) {
@ -47,10 +47,10 @@ class TrackService {
}
/**
* Put
* Update a track object (id can't be changed).
* Update the track whose id you provided. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody Track
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerPut(id, requestBody) {
@ -63,10 +63,10 @@ class TrackService {
}
/**
* Remove
* Delete a specified track (if it exists).
* Delete the track whose id you provided. <br> If no track with this id exists it will just return 204(no content).
* @param id
* @result ResponseTrack
* @result ResponseEmpty
* @returns ResponseTrack
* @returns ResponseEmpty
* @throws ApiError
*/
static async trackControllerRemove(id) {

View File

@ -1,47 +1,49 @@
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
* Lists all groups. <br> The information provided might change while the project continues to evolve.
* @returns UserGroup
* @throws ApiError
*/
static userGroupControllerGetAll(): Promise<Array<UserGroup>>;
/**
* Post
* Create a new usergroup object (id will be generated automagicly).
* Create a new group. <br> If you want to grant permissions to the group you have to create them seperately by posting to /api/permissions after creating the group.
* @param requestBody CreateUserGroup
* @result any
* @returns any
* @throws ApiError
*/
static userGroupControllerPost(requestBody?: CreateUserGroup): Promise<(UserGroup | UserGroupNotFoundError)>;
/**
* Get one
* Returns a usergroup of a specified id (if it exists)
* Lists all information about the group whose id got provided. <br> The information provided might change while the project continues to evolve.
* @param id
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static userGroupControllerGetOne(id: number): Promise<UserGroup>;
/**
* Put
* Update a usergroup object (id can't be changed).
* Update the group whose id you provided. <br> To change the permissions granted to the group please use /api/permissions instead. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UserGroup
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static userGroupControllerPut(id: number, requestBody?: UserGroup): Promise<UserGroup>;
/**
* Remove
* Delete a specified usergroup (if it exists).
* Delete the group whose id you provided. <br> If there are any permissions directly granted to the group they will get deleted as well. <br> Users associated with this group won't get deleted - just deassociated. <br> If no group with this id exists it will just return 204(no content).
* @param id
* @result UserGroup
* @result ResponseEmpty
* @param force
* @returns ResponseUserGroup
* @returns ResponseEmpty
* @throws ApiError
*/
static userGroupControllerRemove(id: number): Promise<UserGroup | ResponseEmpty>;
static userGroupControllerRemove(id: number, force?: boolean): Promise<ResponseUserGroup | ResponseEmpty>;
}

View File

@ -5,8 +5,8 @@ const request_1 = require("../core/request");
class UserGroupService {
/**
* Get all
* Lists all usergroups.
* @result UserGroup
* Lists all groups. <br> The information provided might change while the project continues to evolve.
* @returns UserGroup
* @throws ApiError
*/
static async userGroupControllerGetAll() {
@ -18,9 +18,9 @@ class UserGroupService {
}
/**
* Post
* Create a new usergroup object (id will be generated automagicly).
* Create a new group. <br> If you want to grant permissions to the group you have to create them seperately by posting to /api/permissions after creating the group.
* @param requestBody CreateUserGroup
* @result any
* @returns any
* @throws ApiError
*/
static async userGroupControllerPost(requestBody) {
@ -33,9 +33,9 @@ class UserGroupService {
}
/**
* Get one
* Returns a usergroup of a specified id (if it exists)
* Lists all information about the group whose id got provided. <br> The information provided might change while the project continues to evolve.
* @param id
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static async userGroupControllerGetOne(id) {
@ -47,10 +47,10 @@ class UserGroupService {
}
/**
* Put
* Update a usergroup object (id can't be changed).
* Update the group whose id you provided. <br> To change the permissions granted to the group please use /api/permissions instead. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UserGroup
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static async userGroupControllerPut(id, requestBody) {
@ -63,16 +63,20 @@ class UserGroupService {
}
/**
* Remove
* Delete a specified usergroup (if it exists).
* Delete the group whose id you provided. <br> If there are any permissions directly granted to the group they will get deleted as well. <br> Users associated with this group won't get deleted - just deassociated. <br> If no group with this id exists it will just return 204(no content).
* @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;
}

View File

@ -1,47 +1,49 @@
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
* Lists all users. <br> This includes their groups and permissions directly granted to them (if existing/associated).
* @returns User
* @throws ApiError
*/
static userControllerGetAll(): Promise<Array<User>>;
/**
* Post
* Create a new user object (id will be generated automagicly).
* Create a new user. <br> If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user.
* @param requestBody CreateUser
* @result any
* @returns any
* @throws ApiError
*/
static userControllerPost(requestBody?: CreateUser): Promise<(User | UserGroupNotFoundError)>;
/**
* Get one
* Returns a user of a specified id (if it exists)
* Lists all information about the user whose id got provided. <br> Please remember that only permissions granted directly to the user will show up here, not permissions inherited from groups.
* @param id
* @result User
* @returns User
* @throws ApiError
*/
static userControllerGetOne(id: number): Promise<User>;
/**
* Put
* Update a user object (id can't be changed).
* Update the user whose id you provided. <br> To change the permissions directly granted to the user please use /api/permissions instead. <br> Please remember that ids 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<User>;
static userControllerPut(id: number, requestBody?: UpdateUser): Promise<User>;
/**
* Remove
* Delete a specified runner (if it exists).
* Delete the user whose id you provided. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* @param id
* @result User
* @result ResponseEmpty
* @param force
* @returns User
* @returns ResponseEmpty
* @throws ApiError
*/
static userControllerRemove(id: number): Promise<User | ResponseEmpty>;
static userControllerRemove(id: number, force?: boolean): Promise<User | ResponseEmpty>;
}

View File

@ -5,8 +5,8 @@ const request_1 = require("../core/request");
class UserService {
/**
* Get all
* Lists all users.
* @result User
* Lists all users. <br> This includes their groups and permissions directly granted to them (if existing/associated).
* @returns User
* @throws ApiError
*/
static async userControllerGetAll() {
@ -18,9 +18,9 @@ class UserService {
}
/**
* Post
* Create a new user object (id will be generated automagicly).
* Create a new user. <br> If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user.
* @param requestBody CreateUser
* @result any
* @returns any
* @throws ApiError
*/
static async userControllerPost(requestBody) {
@ -33,9 +33,9 @@ class UserService {
}
/**
* Get one
* Returns a user of a specified id (if it exists)
* Lists all information about the user whose id got provided. <br> Please remember that only permissions granted directly to the user will show up here, not permissions inherited from groups.
* @param id
* @result User
* @returns User
* @throws ApiError
*/
static async userControllerGetOne(id) {
@ -47,10 +47,10 @@ class UserService {
}
/**
* Put
* Update a user object (id can't be changed).
* Update the user whose id you provided. <br> To change the permissions directly granted to the user please use /api/permissions instead. <br> Please remember that ids 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 the user whose id you provided. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* @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;
}

Some files were not shown because too many files have changed in this diff Show More