[][src]Trait em_client::UsersApiMut

pub trait UsersApiMut {
    type Error;
    fn blacklist_user(
        &mut self,
        body: UserBlacklistRequest
    ) -> Result<(), Self::Error>;
fn change_password(
        &mut self,
        body: PasswordChangeRequest
    ) -> Result<(), Self::Error>;
fn confirm_email(
        &mut self,
        body: ConfirmEmailRequest
    ) -> Result<ConfirmEmailResponse, Self::Error>;
fn create_user(&mut self, body: SignupRequest) -> Result<User, Self::Error>;
fn delete_user_from_account(
        &mut self,
        user_id: Uuid
    ) -> Result<(), Self::Error>;
fn forgot_password(
        &mut self,
        body: ForgotPasswordRequest
    ) -> Result<(), Self::Error>;
fn get_all_users(
        &mut self,
        all_search: Option<String>,
        limit: Option<i32>,
        offset: Option<i32>,
        sort_by: Option<String>
    ) -> Result<GetAllUsersResponse, Self::Error>;
fn get_logged_in_user(&mut self) -> Result<User, Self::Error>;
fn get_user(&mut self, user_id: Uuid) -> Result<User, Self::Error>;
fn invite_user(
        &mut self,
        body: InviteUserRequest
    ) -> Result<User, Self::Error>;
fn process_invitations(
        &mut self,
        body: ProcessInviteRequest
    ) -> Result<(), Self::Error>;
fn resend_confirm_email(&mut self) -> Result<(), Self::Error>;
fn resend_invitation(&mut self, user_id: Uuid) -> Result<(), Self::Error>;
fn reset_password(
        &mut self,
        user_id: Uuid,
        body: PasswordResetRequest
    ) -> Result<(), Self::Error>;
fn update_user(
        &mut self,
        user_id: Uuid,
        body: UpdateUserRequest
    ) -> Result<User, Self::Error>;
fn validate_password_reset_token(
        &mut self,
        user_id: Uuid,
        body: ValidateTokenRequest
    ) -> Result<ValidateTokenResponse, Self::Error>;
fn whitelist_user(
        &mut self,
        user_id: Uuid,
        user_token: Option<String>
    ) -> Result<User, Self::Error>; }

Associated Types

type Error

Loading content...

Required methods

fn blacklist_user(
    &mut self,
    body: UserBlacklistRequest
) -> Result<(), Self::Error>

Disable a user using its email

fn change_password(
    &mut self,
    body: PasswordChangeRequest
) -> Result<(), Self::Error>

Change user password

fn confirm_email(
    &mut self,
    body: ConfirmEmailRequest
) -> Result<ConfirmEmailResponse, Self::Error>

Confirms user's email address

fn create_user(&mut self, body: SignupRequest) -> Result<User, Self::Error>

Create a new user

fn delete_user_from_account(&mut self, user_id: Uuid) -> Result<(), Self::Error>

Removed user's association with an account

fn forgot_password(
    &mut self,
    body: ForgotPasswordRequest
) -> Result<(), Self::Error>

Initiate password reset sequence for a user

fn get_all_users(
    &mut self,
    all_search: Option<String>,
    limit: Option<i32>,
    offset: Option<i32>,
    sort_by: Option<String>
) -> Result<GetAllUsersResponse, Self::Error>

Get all users information

fn get_logged_in_user(&mut self) -> Result<User, Self::Error>

Get details of the current logged in user

fn get_user(&mut self, user_id: Uuid) -> Result<User, Self::Error>

Get details of a particular User

fn invite_user(&mut self, body: InviteUserRequest) -> Result<User, Self::Error>

Invite a user

fn process_invitations(
    &mut self,
    body: ProcessInviteRequest
) -> Result<(), Self::Error>

Process a user's pending account invitations

fn resend_confirm_email(&mut self) -> Result<(), Self::Error>

Resend email with link to confirm user's email address

fn resend_invitation(&mut self, user_id: Uuid) -> Result<(), Self::Error>

Resend invite to the user to join a specific account

fn reset_password(
    &mut self,
    user_id: Uuid,
    body: PasswordResetRequest
) -> Result<(), Self::Error>

Reset a user's password

fn update_user(
    &mut self,
    user_id: Uuid,
    body: UpdateUserRequest
) -> Result<User, Self::Error>

Update status, name, role of a user. User with MANAGER access role can only update another user

fn validate_password_reset_token(
    &mut self,
    user_id: Uuid,
    body: ValidateTokenRequest
) -> Result<ValidateTokenResponse, Self::Error>

Validates password reset token for the user

fn whitelist_user(
    &mut self,
    user_id: Uuid,
    user_token: Option<String>
) -> Result<User, Self::Error>

Whitelist a user

Loading content...

Implementors

impl<T, E> UsersApiMut for T where
    T: UsersApi<Error = E>, 
[src]

type Error = E

Loading content...