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

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;