"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.
     * @result 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
     * @result 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
     * @result 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.
     * @result 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;
