2021-01-16 20:37:14 +00:00
"use strict" ;
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
exports . MeService = void 0 ;
const request _1 = require ( "../core/request" ) ;
class MeService {
/ * *
2021-03-19 16:46:01 +00:00
* Get
* Lists all information about yourself .
* @ returns ResponseUser
2021-01-16 20:37:14 +00:00
* @ throws ApiError
* /
2021-03-19 16:46:01 +00:00
static async meControllerGet ( ) {
2023-02-02 09:47:35 +00:00
const result = await ( 0 , request _1 . request ) ( {
2021-01-16 20:37:14 +00:00
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 ) {
2023-02-02 09:47:35 +00:00
const result = await ( 0 , request _1 . request ) ( {
2021-01-16 20:37:14 +00:00
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 ) {
2023-02-02 09:47:35 +00:00
const result = await ( 0 , request _1 . request ) ( {
2021-01-16 20:37:14 +00:00
method : 'DELETE' ,
path : ` /api/users/me/ ` ,
query : {
'force' : force ,
} ,
} ) ;
return result . body ;
}
2021-03-19 16:46:01 +00:00
/ * *
* 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 ( ) {
2023-02-02 09:47:35 +00:00
const result = await ( 0 , request _1 . request ) ( {
2021-03-19 16:46:01 +00:00
method : 'GET' ,
path : ` /api/users/me/permissions ` ,
} ) ;
return result . body ;
}
2021-01-16 20:37:14 +00:00
}
exports . MeService = MeService ;