Initial commit for the js version

This commit is contained in:
2020-12-22 15:17:25 +01:00
commit 94d26fcafc
182 changed files with 2524 additions and 0 deletions

38
dist/services/AuthService.d.ts vendored Normal file
View File

@@ -0,0 +1,38 @@
import type { Auth } from '../models/Auth';
import type { CreateAuth } from '../models/CreateAuth';
import type { HandleLogout } from '../models/HandleLogout';
import type { IllegalJWTError } from '../models/IllegalJWTError';
import type { InvalidCredentialsError } from '../models/InvalidCredentialsError';
import type { JwtNotProvidedError } from '../models/JwtNotProvidedError';
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 { UsernameOrEmailNeededError } from '../models/UsernameOrEmailNeededError';
import type { UserNotFoundError } from '../models/UserNotFoundError';
export declare class AuthService {
/**
* Login
* Create a new access token object
* @param requestBody CreateAuth
* @result any
* @throws ApiError
*/
static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>;
/**
* Logout
* Create a new access token object
* @param requestBody HandleLogout
* @result any
* @throws ApiError
*/
static authControllerLogout(requestBody?: HandleLogout): Promise<(Logout | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>;
/**
* Refresh
* refresh a access token
* @param requestBody RefreshAuth
* @result any
* @throws ApiError
*/
static authControllerRefresh(requestBody?: RefreshAuth): Promise<(Auth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>;
}

52
dist/services/AuthService.js vendored Normal file
View File

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthService = void 0;
const request_1 = require("../core/request");
class AuthService {
/**
* Login
* Create a new access token object
* @param requestBody CreateAuth
* @result any
* @throws ApiError
*/
static async authControllerLogin(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/auth/login`,
body: requestBody,
});
return result.body;
}
/**
* Logout
* Create a new access token object
* @param requestBody HandleLogout
* @result any
* @throws ApiError
*/
static async authControllerLogout(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/auth/logout`,
body: requestBody,
});
return result.body;
}
/**
* Refresh
* refresh a access token
* @param requestBody RefreshAuth
* @result any
* @throws ApiError
*/
static async authControllerRefresh(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/auth/refresh`,
body: requestBody,
});
return result.body;
}
}
exports.AuthService = AuthService;

View File

@@ -0,0 +1,48 @@
import type { CreateRunnerOrganisation } from '../models/CreateRunnerOrganisation';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunnerOrganisation } from '../models/ResponseRunnerOrganisation';
import type { RunnerOrganisation } from '../models/RunnerOrganisation';
export declare class RunnerOrganisationService {
/**
* Get all
* Lists all runnerOrganisations.
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerGetAll(): Promise<Array<ResponseRunnerOrganisation>>;
/**
* Post
* Create a new runnerOrganisation object (id will be generated automagicly).
* @param requestBody CreateRunnerOrganisation
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerPost(requestBody?: CreateRunnerOrganisation): Promise<ResponseRunnerOrganisation>;
/**
* Get one
* Returns a runnerOrganisation of a specified id (if it exists)
* @param id
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerGetOne(id: number): Promise<ResponseRunnerOrganisation>;
/**
* Put
* Update a runnerOrganisation object (id can't be changed).
* @param id
* @param requestBody RunnerOrganisation
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static runnerOrganisationControllerPut(id: number, requestBody?: RunnerOrganisation): Promise<ResponseRunnerOrganisation>;
/**
* Remove
* Delete a specified runnerOrganisation (if it exists).
* @param id
* @param force
* @result ResponseRunnerOrganisation
* @result ResponseEmpty
* @throws ApiError
*/
static runnerOrganisationControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerOrganisation | ResponseEmpty>;
}

View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunnerOrganisationService = void 0;
const request_1 = require("../core/request");
class RunnerOrganisationService {
/**
* Get all
* Lists all runnerOrganisations.
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/organisations`,
});
return result.body;
}
/**
* Post
* Create a new runnerOrganisation object (id will be generated automagicly).
* @param requestBody CreateRunnerOrganisation
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/organisations`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a runnerOrganisation of a specified id (if it exists)
* @param id
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/organisations/${id}`,
});
return result.body;
}
/**
* Put
* Update a runnerOrganisation object (id can't be changed).
* @param id
* @param requestBody RunnerOrganisation
* @result ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/organisations/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified runnerOrganisation (if it exists).
* @param id
* @param force
* @result ResponseRunnerOrganisation
* @result ResponseEmpty
* @throws ApiError
*/
static async runnerOrganisationControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/organisations/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.RunnerOrganisationService = RunnerOrganisationService;

50
dist/services/RunnerService.d.ts vendored Normal file
View File

@@ -0,0 +1,50 @@
import type { CreateRunner } from '../models/CreateRunner';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunner } from '../models/ResponseRunner';
import type { RunnerGroupNeededError } from '../models/RunnerGroupNeededError';
import type { RunnerGroupNotFoundError } from '../models/RunnerGroupNotFoundError';
import type { UpdateRunner } from '../models/UpdateRunner';
export declare class RunnerService {
/**
* Get all
* Lists all runners.
* @result ResponseRunner
* @throws ApiError
*/
static runnerControllerGetAll(): Promise<Array<ResponseRunner>>;
/**
* Post
* Create a new runner object (id will be generated automagicly).
* @param requestBody CreateRunner
* @result any
* @throws ApiError
*/
static runnerControllerPost(requestBody?: CreateRunner): Promise<(ResponseRunner | RunnerGroupNeededError | RunnerGroupNotFoundError)>;
/**
* Get one
* Returns a runner of a specified id (if it exists)
* @param id
* @result ResponseRunner
* @throws ApiError
*/
static runnerControllerGetOne(id: number): Promise<ResponseRunner>;
/**
* Put
* Update a runner object (id can't be changed).
* @param id
* @param requestBody UpdateRunner
* @result ResponseRunner
* @throws ApiError
*/
static runnerControllerPut(id: number, requestBody?: UpdateRunner): Promise<ResponseRunner>;
/**
* Remove
* Delete a specified runner (if it exists).
* @param id
* @param force
* @result ResponseRunner
* @result ResponseEmpty
* @throws ApiError
*/
static runnerControllerRemove(id: number, force?: boolean): Promise<ResponseRunner | ResponseEmpty>;
}

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

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunnerService = void 0;
const request_1 = require("../core/request");
class RunnerService {
/**
* Get all
* Lists all runners.
* @result ResponseRunner
* @throws ApiError
*/
static async runnerControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/runners`,
});
return result.body;
}
/**
* Post
* Create a new runner object (id will be generated automagicly).
* @param requestBody CreateRunner
* @result any
* @throws ApiError
*/
static async runnerControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a runner of a specified id (if it exists)
* @param id
* @result ResponseRunner
* @throws ApiError
*/
static async runnerControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/runners/${id}`,
});
return result.body;
}
/**
* Put
* Update a runner object (id can't be changed).
* @param id
* @param requestBody UpdateRunner
* @result ResponseRunner
* @throws ApiError
*/
static async runnerControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/runners/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified runner (if it exists).
* @param id
* @param force
* @result ResponseRunner
* @result ResponseEmpty
* @throws ApiError
*/
static async runnerControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/runners/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.RunnerService = RunnerService;

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

@@ -0,0 +1,48 @@
import type { CreateRunnerTeam } from '../models/CreateRunnerTeam';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseRunnerTeam } from '../models/ResponseRunnerTeam';
import type { UpdateRunnerTeam } from '../models/UpdateRunnerTeam';
export declare class RunnerTeamService {
/**
* Get all
* Lists all runnerTeams.
* @result ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerGetAll(): Promise<Array<ResponseRunnerTeam>>;
/**
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* @param requestBody CreateRunnerTeam
* @result ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerPost(requestBody?: CreateRunnerTeam): Promise<ResponseRunnerTeam>;
/**
* Get one
* Returns a runnerTeam of a specified id (if it exists)
* @param id
* @result ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerGetOne(id: number): Promise<ResponseRunnerTeam>;
/**
* Put
* Update a runnerTeam object (id can't be changed).
* @param id
* @param requestBody UpdateRunnerTeam
* @result ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerPut(id: number, requestBody?: UpdateRunnerTeam): Promise<ResponseRunnerTeam>;
/**
* Remove
* Delete a specified runnerTeam (if it exists).
* @param id
* @param force
* @result ResponseRunnerTeam
* @result ResponseEmpty
* @throws ApiError
*/
static runnerTeamControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerTeam | ResponseEmpty>;
}

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

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunnerTeamService = void 0;
const request_1 = require("../core/request");
class RunnerTeamService {
/**
* Get all
* Lists all runnerTeams.
* @result ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/teams`,
});
return result.body;
}
/**
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* @param requestBody CreateRunnerTeam
* @result ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/teams`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a runnerTeam of a specified id (if it exists)
* @param id
* @result ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/teams/${id}`,
});
return result.body;
}
/**
* Put
* Update a runnerTeam object (id can't be changed).
* @param id
* @param requestBody UpdateRunnerTeam
* @result ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/teams/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified runnerTeam (if it exists).
* @param id
* @param force
* @result ResponseRunnerTeam
* @result ResponseEmpty
* @throws ApiError
*/
static async runnerTeamControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/teams/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.RunnerTeamService = RunnerTeamService;

47
dist/services/TrackService.d.ts vendored Normal file
View File

@@ -0,0 +1,47 @@
import type { CreateTrack } from '../models/CreateTrack';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseTrack } from '../models/ResponseTrack';
import type { Track } from '../models/Track';
export declare class TrackService {
/**
* Get all
* Lists all tracks.
* @result ResponseTrack
* @throws ApiError
*/
static trackControllerGetAll(): Promise<Array<ResponseTrack>>;
/**
* Post
* Create a new track object (id will be generated automagicly).
* @param requestBody CreateTrack
* @result ResponseTrack
* @throws ApiError
*/
static trackControllerPost(requestBody?: CreateTrack): Promise<ResponseTrack>;
/**
* Get one
* Returns a track of a specified id (if it exists)
* @param id
* @result ResponseTrack
* @throws ApiError
*/
static trackControllerGetOne(id: number): Promise<ResponseTrack>;
/**
* Put
* Update a track object (id can't be changed).
* @param id
* @param requestBody Track
* @result ResponseTrack
* @throws ApiError
*/
static trackControllerPut(id: number, requestBody?: Track): Promise<ResponseTrack>;
/**
* Remove
* Delete a specified track (if it exists).
* @param id
* @result ResponseTrack
* @result ResponseEmpty
* @throws ApiError
*/
static trackControllerRemove(id: number): Promise<ResponseTrack | ResponseEmpty>;
}

80
dist/services/TrackService.js vendored Normal file
View File

@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TrackService = void 0;
const request_1 = require("../core/request");
class TrackService {
/**
* Get all
* Lists all tracks.
* @result ResponseTrack
* @throws ApiError
*/
static async trackControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/tracks`,
});
return result.body;
}
/**
* Post
* Create a new track object (id will be generated automagicly).
* @param requestBody CreateTrack
* @result ResponseTrack
* @throws ApiError
*/
static async trackControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/tracks`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a track of a specified id (if it exists)
* @param id
* @result ResponseTrack
* @throws ApiError
*/
static async trackControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/tracks/${id}`,
});
return result.body;
}
/**
* Put
* Update a track object (id can't be changed).
* @param id
* @param requestBody Track
* @result ResponseTrack
* @throws ApiError
*/
static async trackControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/tracks/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified track (if it exists).
* @param id
* @result ResponseTrack
* @result ResponseEmpty
* @throws ApiError
*/
static async trackControllerRemove(id) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/tracks/${id}`,
});
return result.body;
}
}
exports.TrackService = TrackService;

47
dist/services/UserGroupService.d.ts vendored Normal file
View File

@@ -0,0 +1,47 @@
import type { CreateUserGroup } from '../models/CreateUserGroup';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { UserGroup } from '../models/UserGroup';
import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError';
export declare class UserGroupService {
/**
* Get all
* Lists all usergroups.
* @result UserGroup
* @throws ApiError
*/
static userGroupControllerGetAll(): Promise<Array<UserGroup>>;
/**
* Post
* Create a new usergroup object (id will be generated automagicly).
* @param requestBody CreateUserGroup
* @result any
* @throws ApiError
*/
static userGroupControllerPost(requestBody?: CreateUserGroup): Promise<(UserGroup | UserGroupNotFoundError)>;
/**
* Get one
* Returns a usergroup of a specified id (if it exists)
* @param id
* @result UserGroup
* @throws ApiError
*/
static userGroupControllerGetOne(id: number): Promise<UserGroup>;
/**
* Put
* Update a usergroup object (id can't be changed).
* @param id
* @param requestBody UserGroup
* @result UserGroup
* @throws ApiError
*/
static userGroupControllerPut(id: number, requestBody?: UserGroup): Promise<UserGroup>;
/**
* Remove
* Delete a specified usergroup (if it exists).
* @param id
* @result UserGroup
* @result ResponseEmpty
* @throws ApiError
*/
static userGroupControllerRemove(id: number): Promise<UserGroup | ResponseEmpty>;
}

80
dist/services/UserGroupService.js vendored Normal file
View File

@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserGroupService = void 0;
const request_1 = require("../core/request");
class UserGroupService {
/**
* Get all
* Lists all usergroups.
* @result UserGroup
* @throws ApiError
*/
static async userGroupControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/usergroups`,
});
return result.body;
}
/**
* Post
* Create a new usergroup object (id will be generated automagicly).
* @param requestBody CreateUserGroup
* @result any
* @throws ApiError
*/
static async userGroupControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/usergroups`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a usergroup of a specified id (if it exists)
* @param id
* @result UserGroup
* @throws ApiError
*/
static async userGroupControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/usergroups/${id}`,
});
return result.body;
}
/**
* Put
* Update a usergroup object (id can't be changed).
* @param id
* @param requestBody UserGroup
* @result UserGroup
* @throws ApiError
*/
static async userGroupControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/usergroups/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified usergroup (if it exists).
* @param id
* @result UserGroup
* @result ResponseEmpty
* @throws ApiError
*/
static async userGroupControllerRemove(id) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/usergroups/${id}`,
});
return result.body;
}
}
exports.UserGroupService = UserGroupService;

47
dist/services/UserService.d.ts vendored Normal file
View File

@@ -0,0 +1,47 @@
import type { CreateUser } from '../models/CreateUser';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { User } from '../models/User';
import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError';
export declare class UserService {
/**
* Get all
* Lists all users.
* @result User
* @throws ApiError
*/
static userControllerGetAll(): Promise<Array<User>>;
/**
* Post
* Create a new user object (id will be generated automagicly).
* @param requestBody CreateUser
* @result any
* @throws ApiError
*/
static userControllerPost(requestBody?: CreateUser): Promise<(User | UserGroupNotFoundError)>;
/**
* Get one
* Returns a user of a specified id (if it exists)
* @param id
* @result User
* @throws ApiError
*/
static userControllerGetOne(id: number): Promise<User>;
/**
* Put
* Update a user object (id can't be changed).
* @param id
* @param requestBody User
* @result User
* @throws ApiError
*/
static userControllerPut(id: number, requestBody?: User): Promise<User>;
/**
* Remove
* Delete a specified runner (if it exists).
* @param id
* @result User
* @result ResponseEmpty
* @throws ApiError
*/
static userControllerRemove(id: number): Promise<User | ResponseEmpty>;
}

80
dist/services/UserService.js vendored Normal file
View File

@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UserService = void 0;
const request_1 = require("../core/request");
class UserService {
/**
* Get all
* Lists all users.
* @result User
* @throws ApiError
*/
static async userControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/users`,
});
return result.body;
}
/**
* Post
* Create a new user object (id will be generated automagicly).
* @param requestBody CreateUser
* @result any
* @throws ApiError
*/
static async userControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/users`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a user of a specified id (if it exists)
* @param id
* @result User
* @throws ApiError
*/
static async userControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/users/${id}`,
});
return result.body;
}
/**
* Put
* Update a user object (id can't be changed).
* @param id
* @param requestBody User
* @result User
* @throws ApiError
*/
static async userControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/users/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified runner (if it exists).
* @param id
* @result User
* @result ResponseEmpty
* @throws ApiError
*/
static async userControllerRemove(id) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/users/${id}`,
});
return result.body;
}
}
exports.UserService = UserService;