new lib version [CI SKIP]

This commit is contained in:
2020-12-22 14:30:44 +00:00
parent 284f3303c3
commit 52ac2efc67
66 changed files with 799 additions and 122 deletions

View File

@@ -15,23 +15,23 @@ export declare class AuthService {
* Login
* Create a new access token object
* @param requestBody CreateAuth
* @result any
* @returns any
* @throws ApiError
*/
static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>;
static authControllerLogin(requestBody?: CreateAuth): Promise<(Auth | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>;
/**
* Logout
* Create a new access token object
* @param requestBody HandleLogout
* @result any
* @returns any
* @throws ApiError
*/
static authControllerLogout(requestBody?: HandleLogout): Promise<(Logout | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError | InvalidCredentialsError)>;
static authControllerLogout(requestBody?: HandleLogout): Promise<(Logout | InvalidCredentialsError | UserNotFoundError | UsernameOrEmailNeededError | PasswordNeededError)>;
/**
* Refresh
* refresh a access token
* @param requestBody RefreshAuth
* @result any
* @returns any
* @throws ApiError
*/
static authControllerRefresh(requestBody?: RefreshAuth): Promise<(Auth | JwtNotProvidedError | IllegalJWTError | UserNotFoundError | RefreshTokenCountInvalidError)>;

View File

@@ -7,7 +7,7 @@ class AuthService {
* Login
* Create a new access token object
* @param requestBody CreateAuth
* @result any
* @returns any
* @throws ApiError
*/
static async authControllerLogin(requestBody) {
@@ -22,7 +22,7 @@ class AuthService {
* Logout
* Create a new access token object
* @param requestBody HandleLogout
* @result any
* @returns any
* @throws ApiError
*/
static async authControllerLogout(requestBody) {
@@ -37,7 +37,7 @@ class AuthService {
* Refresh
* refresh a access token
* @param requestBody RefreshAuth
* @result any
* @returns any
* @throws ApiError
*/
static async authControllerRefresh(requestBody) {

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 (or their teams) into the provided group
* @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 (or their teams) into the provided org
* @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 (or their teams) into the provided group
* @param group
* @returns ResponseRunner
* @throws ApiError
*/
static importControllerPostCsv(group?: number): Promise<Array<ResponseRunner>>;
/**
* Post orgs csv
* Create new runners from csv and insert them (or their teams) into the provided org
* @param id
* @returns ResponseRunner
* @throws ApiError
*/
static importControllerPostOrgsCsv(id: number): Promise<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 (or their teams) into the provided group
* @param group
* @param requestBody ImportRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async importControllerPostJson(group, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners/import`,
query: {
'group': group,
},
body: requestBody,
});
return result.body;
}
/**
* Post orgs json
* Create new runners from json and insert them (or their teams) into the provided org
* @param id
* @param requestBody ImportRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async importControllerPostOrgsJson(id, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/organisations/${id}/import`,
body: requestBody,
});
return result.body;
}
/**
* Post teams json
* Create new runners from json and insert them into the provided team
* @param id
* @param requestBody ImportRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async importControllerPostTeamsJson(id, requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/teams/${id}/import`,
body: requestBody,
});
return result.body;
}
/**
* Post csv
* Create new runners from csv and insert them (or their teams) into the provided group
* @param group
* @returns ResponseRunner
* @throws ApiError
*/
static async importControllerPostCsv(group) {
const result = await request_1.request({
method: 'POST',
path: `/api/runners/import/csv`,
query: {
'group': group,
},
});
return result.body;
}
/**
* Post orgs csv
* Create new runners from csv and insert them (or their teams) into the provided org
* @param id
* @returns ResponseRunner
* @throws ApiError
*/
static async importControllerPostOrgsCsv(id) {
const result = await request_1.request({
method: 'POST',
path: `/api/organisations/${id}/import/csv`,
});
return result.body;
}
/**
* Post teams csv
* Create new runners from csv and insert them into the provided team
* @param id
* @returns ResponseRunner
* @throws ApiError
*/
static async importControllerPostTeamsCsv(id) {
const result = await request_1.request({
method: 'POST',
path: `/api/teams/${id}/import/csv`,
});
return result.body;
}
}
exports.ImportService = ImportService;

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.
* @returns ResponsePermission
* @throws ApiError
*/
static permissionControllerGetAll(): Promise<Array<ResponsePermission>>;
/**
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* @param requestBody CreatePermission
* @returns ResponsePermission
* @throws ApiError
*/
static permissionControllerPost(requestBody?: CreatePermission): Promise<ResponsePermission>;
/**
* Get one
* Returns a permissions of a specified id (if it exists)
* @param id
* @returns ResponsePermission
* @throws ApiError
*/
static permissionControllerGetOne(id: number): Promise<ResponsePermission>;
/**
* Put
* Update a permission object (id can't be changed).
* @param id
* @param requestBody UpdatePermission
* @returns ResponsePrincipal
* @throws ApiError
*/
static permissionControllerPut(id: number, requestBody?: UpdatePermission): Promise<ResponsePrincipal>;
/**
* Remove
* Delete a specified permission (if it exists).
* @param id
* @param force
* @returns ResponsePermission
* @returns ResponseEmpty
* @throws ApiError
*/
static permissionControllerRemove(id: number, force?: boolean): Promise<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.
* @returns ResponsePermission
* @throws ApiError
*/
static async permissionControllerGetAll() {
const result = await request_1.request({
method: 'GET',
path: `/api/permissions`,
});
return result.body;
}
/**
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* @param requestBody CreatePermission
* @returns ResponsePermission
* @throws ApiError
*/
static async permissionControllerPost(requestBody) {
const result = await request_1.request({
method: 'POST',
path: `/api/permissions`,
body: requestBody,
});
return result.body;
}
/**
* Get one
* Returns a permissions of a specified id (if it exists)
* @param id
* @returns ResponsePermission
* @throws ApiError
*/
static async permissionControllerGetOne(id) {
const result = await request_1.request({
method: 'GET',
path: `/api/permissions/${id}`,
});
return result.body;
}
/**
* Put
* Update a permission object (id can't be changed).
* @param id
* @param requestBody UpdatePermission
* @returns ResponsePrincipal
* @throws ApiError
*/
static async permissionControllerPut(id, requestBody) {
const result = await request_1.request({
method: 'PUT',
path: `/api/permissions/${id}`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete a specified permission (if it exists).
* @param id
* @param force
* @returns ResponsePermission
* @returns ResponseEmpty
* @throws ApiError
*/
static async permissionControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/permissions/${id}`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.PermissionService = PermissionService;

View File

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

View File

@@ -6,7 +6,7 @@ class RunnerOrganisationService {
/**
* Get all
* Lists all runnerOrganisations.
* @result ResponseRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetAll() {
@@ -20,7 +20,7 @@ class RunnerOrganisationService {
* Post
* Create a new runnerOrganisation object (id will be generated automagicly).
* @param requestBody CreateRunnerOrganisation
* @result ResponseRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPost(requestBody) {
@@ -35,7 +35,7 @@ class RunnerOrganisationService {
* Get one
* Returns a runnerOrganisation of a specified id (if it exists)
* @param id
* @result ResponseRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerGetOne(id) {
@@ -49,8 +49,8 @@ class RunnerOrganisationService {
* Put
* Update a runnerOrganisation object (id can't be changed).
* @param id
* @param requestBody RunnerOrganisation
* @result ResponseRunnerOrganisation
* @param requestBody UpdateRunnerOrganisation
* @returns ResponseRunnerOrganisation
* @throws ApiError
*/
static async runnerOrganisationControllerPut(id, requestBody) {
@@ -66,8 +66,8 @@ class RunnerOrganisationService {
* Delete a specified runnerOrganisation (if it exists).
* @param id
* @param force
* @result ResponseRunnerOrganisation
* @result ResponseEmpty
* @returns ResponseRunnerOrganisation
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerOrganisationControllerRemove(id, force) {

View File

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

View File

@@ -6,7 +6,7 @@ class RunnerService {
/**
* Get all
* Lists all runners.
* @result ResponseRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async runnerControllerGetAll() {
@@ -20,7 +20,7 @@ class RunnerService {
* Post
* Create a new runner object (id will be generated automagicly).
* @param requestBody CreateRunner
* @result any
* @returns any
* @throws ApiError
*/
static async runnerControllerPost(requestBody) {
@@ -35,7 +35,7 @@ class RunnerService {
* Get one
* Returns a runner of a specified id (if it exists)
* @param id
* @result ResponseRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async runnerControllerGetOne(id) {
@@ -50,7 +50,7 @@ class RunnerService {
* Update a runner object (id can't be changed).
* @param id
* @param requestBody UpdateRunner
* @result ResponseRunner
* @returns ResponseRunner
* @throws ApiError
*/
static async runnerControllerPut(id, requestBody) {
@@ -66,8 +66,8 @@ class RunnerService {
* Delete a specified runner (if it exists).
* @param id
* @param force
* @result ResponseRunner
* @result ResponseEmpty
* @returns ResponseRunner
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerControllerRemove(id, force) {

View File

@@ -6,7 +6,7 @@ export declare class RunnerTeamService {
/**
* Get all
* Lists all runnerTeams.
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerGetAll(): Promise<Array<ResponseRunnerTeam>>;
@@ -14,7 +14,7 @@ export declare class RunnerTeamService {
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* @param requestBody CreateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerPost(requestBody?: CreateRunnerTeam): Promise<ResponseRunnerTeam>;
@@ -22,7 +22,7 @@ export declare class RunnerTeamService {
* Get one
* Returns a runnerTeam of a specified id (if it exists)
* @param id
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerGetOne(id: number): Promise<ResponseRunnerTeam>;
@@ -31,7 +31,7 @@ export declare class RunnerTeamService {
* Update a runnerTeam object (id can't be changed).
* @param id
* @param requestBody UpdateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static runnerTeamControllerPut(id: number, requestBody?: UpdateRunnerTeam): Promise<ResponseRunnerTeam>;
@@ -40,8 +40,8 @@ export declare class RunnerTeamService {
* Delete a specified runnerTeam (if it exists).
* @param id
* @param force
* @result ResponseRunnerTeam
* @result ResponseEmpty
* @returns ResponseRunnerTeam
* @returns ResponseEmpty
* @throws ApiError
*/
static runnerTeamControllerRemove(id: number, force?: boolean): Promise<ResponseRunnerTeam | ResponseEmpty>;

View File

@@ -6,7 +6,7 @@ class RunnerTeamService {
/**
* Get all
* Lists all runnerTeams.
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerGetAll() {
@@ -20,7 +20,7 @@ class RunnerTeamService {
* Post
* Create a new runnerTeam object (id will be generated automagicly).
* @param requestBody CreateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerPost(requestBody) {
@@ -35,7 +35,7 @@ class RunnerTeamService {
* Get one
* Returns a runnerTeam of a specified id (if it exists)
* @param id
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerGetOne(id) {
@@ -50,7 +50,7 @@ class RunnerTeamService {
* Update a runnerTeam object (id can't be changed).
* @param id
* @param requestBody UpdateRunnerTeam
* @result ResponseRunnerTeam
* @returns ResponseRunnerTeam
* @throws ApiError
*/
static async runnerTeamControllerPut(id, requestBody) {
@@ -66,8 +66,8 @@ class RunnerTeamService {
* Delete a specified runnerTeam (if it exists).
* @param id
* @param force
* @result ResponseRunnerTeam
* @result ResponseEmpty
* @returns ResponseRunnerTeam
* @returns ResponseEmpty
* @throws ApiError
*/
static async runnerTeamControllerRemove(id, force) {

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

@@ -0,0 +1,9 @@
export declare class StatusService {
/**
* Get
* Lists all tracks.
* @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
* Lists all tracks.
* @returns any Successful response
* @throws ApiError
*/
static async statusControllerGet() {
const result = await request_1.request({
method: 'GET',
path: `/api/status`,
});
return result.body;
}
}
exports.StatusService = StatusService;

View File

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

View File

@@ -5,8 +5,7 @@ const request_1 = require("../core/request");
class TrackService {
/**
* Get all
* Lists all tracks.
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerGetAll() {
@@ -20,7 +19,7 @@ class TrackService {
* Post
* Create a new track object (id will be generated automagicly).
* @param requestBody CreateTrack
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerPost(requestBody) {
@@ -35,7 +34,7 @@ class TrackService {
* Get one
* Returns a track of a specified id (if it exists)
* @param id
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerGetOne(id) {
@@ -50,7 +49,7 @@ class TrackService {
* Update a track object (id can't be changed).
* @param id
* @param requestBody Track
* @result ResponseTrack
* @returns ResponseTrack
* @throws ApiError
*/
static async trackControllerPut(id, requestBody) {
@@ -65,8 +64,8 @@ class TrackService {
* Remove
* Delete a specified track (if it exists).
* @param id
* @result ResponseTrack
* @result ResponseEmpty
* @returns ResponseTrack
* @returns ResponseEmpty
* @throws ApiError
*/
static async trackControllerRemove(id) {

View File

@@ -1,12 +1,13 @@
import type { CreateUserGroup } from '../models/CreateUserGroup';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseUserGroup } from '../models/ResponseUserGroup';
import type { UserGroup } from '../models/UserGroup';
import type { UserGroupNotFoundError } from '../models/UserGroupNotFoundError';
export declare class UserGroupService {
/**
* Get all
* Lists all usergroups.
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static userGroupControllerGetAll(): Promise<Array<UserGroup>>;
@@ -14,7 +15,7 @@ export declare class UserGroupService {
* Post
* Create a new usergroup object (id will be generated automagicly).
* @param requestBody CreateUserGroup
* @result any
* @returns any
* @throws ApiError
*/
static userGroupControllerPost(requestBody?: CreateUserGroup): Promise<(UserGroup | UserGroupNotFoundError)>;
@@ -22,7 +23,7 @@ export declare class UserGroupService {
* Get one
* Returns a usergroup of a specified id (if it exists)
* @param id
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static userGroupControllerGetOne(id: number): Promise<UserGroup>;
@@ -31,7 +32,7 @@ export declare class UserGroupService {
* Update a usergroup object (id can't be changed).
* @param id
* @param requestBody UserGroup
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static userGroupControllerPut(id: number, requestBody?: UserGroup): Promise<UserGroup>;
@@ -39,9 +40,10 @@ export declare class UserGroupService {
* Remove
* Delete a specified usergroup (if it exists).
* @param id
* @result UserGroup
* @result ResponseEmpty
* @param force
* @returns ResponseUserGroup
* @returns ResponseEmpty
* @throws ApiError
*/
static userGroupControllerRemove(id: number): Promise<UserGroup | ResponseEmpty>;
static userGroupControllerRemove(id: number, force?: boolean): Promise<ResponseUserGroup | ResponseEmpty>;
}

View File

@@ -6,7 +6,7 @@ class UserGroupService {
/**
* Get all
* Lists all usergroups.
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static async userGroupControllerGetAll() {
@@ -20,7 +20,7 @@ class UserGroupService {
* Post
* Create a new usergroup object (id will be generated automagicly).
* @param requestBody CreateUserGroup
* @result any
* @returns any
* @throws ApiError
*/
static async userGroupControllerPost(requestBody) {
@@ -35,7 +35,7 @@ class UserGroupService {
* Get one
* Returns a usergroup of a specified id (if it exists)
* @param id
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static async userGroupControllerGetOne(id) {
@@ -50,7 +50,7 @@ class UserGroupService {
* Update a usergroup object (id can't be changed).
* @param id
* @param requestBody UserGroup
* @result UserGroup
* @returns UserGroup
* @throws ApiError
*/
static async userGroupControllerPut(id, requestBody) {
@@ -65,14 +65,18 @@ class UserGroupService {
* Remove
* Delete a specified usergroup (if it exists).
* @param id
* @result UserGroup
* @result ResponseEmpty
* @param force
* @returns ResponseUserGroup
* @returns ResponseEmpty
* @throws ApiError
*/
static async userGroupControllerRemove(id) {
static async userGroupControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/usergroups/${id}`,
query: {
'force': force,
},
});
return result.body;
}

View File

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

View File

@@ -6,7 +6,7 @@ class UserService {
/**
* Get all
* Lists all users.
* @result User
* @returns User
* @throws ApiError
*/
static async userControllerGetAll() {
@@ -20,7 +20,7 @@ class UserService {
* Post
* Create a new user object (id will be generated automagicly).
* @param requestBody CreateUser
* @result any
* @returns any
* @throws ApiError
*/
static async userControllerPost(requestBody) {
@@ -35,7 +35,7 @@ class UserService {
* Get one
* Returns a user of a specified id (if it exists)
* @param id
* @result User
* @returns User
* @throws ApiError
*/
static async userControllerGetOne(id) {
@@ -49,8 +49,8 @@ class UserService {
* Put
* Update a user object (id can't be changed).
* @param id
* @param requestBody User
* @result User
* @param requestBody UpdateUser
* @returns User
* @throws ApiError
*/
static async userControllerPut(id, requestBody) {
@@ -63,16 +63,20 @@ class UserService {
}
/**
* Remove
* Delete a specified runner (if it exists).
* Delete a user runner (if it exists).
* @param id
* @result User
* @result ResponseEmpty
* @param force
* @returns User
* @returns ResponseEmpty
* @throws ApiError
*/
static async userControllerRemove(id) {
static async userControllerRemove(id, force) {
const result = await request_1.request({
method: 'DELETE',
path: `/api/users/${id}`,
query: {
'force': force,
},
});
return result.body;
}