Methods
# async createUser(userData) → {Promise.<TUser>}
Create a new user using the provided payload.
Parameters:
| Name | Type | Description |
|---|---|---|
userData |
CreateUserRequest
|
User creation payload from gRPC contract. |
Newly created gRPC user representation.
Promise.<TUser>
# async deleteUser(email, currentUserEmail) → {Promise.<void>}
Delete a user ensuring admins cannot remove themselves.
Parameters:
| Name | Type | Description |
|---|---|---|
email |
string
|
Target user's email. |
currentUserEmail |
string
|
Authenticated admin's email. |
Resolves when deletion completes.
Promise.<void>
# async getAllSmes(currentUserId, page, limit, searchopt) → {Promise.<IPaginatedResponse.<ISmeResponse>>}
Retrieve paginated SMEs/admins excluding the current user.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
currentUserId |
string
|
Authenticated admin ID to exclude. |
||
page |
number
|
1 | Page number (default: 1). |
|
limit |
number
|
10 | Page size (default: 10). |
|
search |
string
|
<optional> |
Optional search term. |
Paginated response payload.
Promise.<IPaginatedResponse.<ISmeResponse>>
# async resetPassword(resetData) → {Promise.<void>}
Reset a user's password by email.
Parameters:
| Name | Type | Description |
|---|---|---|
resetData |
IResetPasswordDto
|
DTO containing the email and new password. |
Resolves when the password is updated.
Promise.<void>