lfk-client-js/dist/services/MeService.js
Nicolai Ort ad90844846
All checks were successful
continuous-integration/drone Build is passing
Fresh dist
2023-02-02 16:14:10 +01:00

66 lines
2.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MeService = void 0;
const request_1 = require("../core/request");
class MeService {
/**
* Get
* Lists all information about yourself.
* @returns ResponseUser
* @throws ApiError
*/
static async meControllerGet() {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/users/me/`,
});
return result.body;
}
/**
* Put
* Update the yourself. <br> You can't edit your own permissions or group memberships here - Please use the /api/users/:id enpoint instead. <br> Please remember that ids can't be changed.
* @param requestBody UpdateUser
* @returns ResponseUser
* @throws ApiError
*/
static async meControllerPut(requestBody) {
const result = await (0, request_1.request)({
method: 'PUT',
path: `/api/users/me/`,
body: requestBody,
});
return result.body;
}
/**
* Remove
* Delete yourself. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to you they will get deleted as well.
* @param force
* @returns ResponseUser
* @throws ApiError
*/
static async meControllerRemove(force) {
const result = await (0, request_1.request)({
method: 'DELETE',
path: `/api/users/me/`,
query: {
'force': force,
},
});
return result.body;
}
/**
* Get permissions
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
* @returns ResponseUserPermissions
* @throws ApiError
*/
static async meControllerGetPermissions() {
const result = await (0, request_1.request)({
method: 'GET',
path: `/api/users/me/permissions`,
});
return result.body;
}
}
exports.MeService = MeService;