🚀New lib version v0.1.1 [CI SKIP]
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2021-01-16 20:37:13 +00:00
parent 60862b351d
commit 213e191db5
12 changed files with 100 additions and 7 deletions

28
dist/services/MeService.d.ts vendored Normal file
View File

@@ -0,0 +1,28 @@
import type { ResponseUser } from '../models/ResponseUser';
import type { ResponseUserPermissions } from '../models/ResponseUserPermissions';
import type { UpdateUser } from '../models/UpdateUser';
export declare class MeService {
/**
* Get permissions
* Lists all permissions granted to the you sorted into directly granted and inherited as permission response objects.
* @returns ResponseUserPermissions
* @throws ApiError
*/
static meControllerGetPermissions(): Promise<ResponseUserPermissions>;
/**
* 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 meControllerPut(requestBody?: UpdateUser): Promise<ResponseUser>;
/**
* 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 meControllerRemove(force?: boolean): Promise<ResponseUser>;
}

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

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MeService = void 0;
const request_1 = require("../core/request");
class MeService {
/**
* 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 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 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 request_1.request({
method: 'DELETE',
path: `/api/users/me/`,
query: {
'force': force,
},
});
return result.body;
}
}
exports.MeService = MeService;

View File

@@ -37,7 +37,7 @@ export declare class UserService {
static userControllerPut(id: number, requestBody?: UpdateUser): Promise<ResponseUser>;
/**
* Remove
* Delete the user whose id you provided. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* Delete the user whose id you provided. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseUser

View File

@@ -63,7 +63,7 @@ class UserService {
}
/**
* Remove
* Delete the user whose id you provided. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* Delete the user whose id you provided. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* @param id
* @param force
* @returns ResponseUser