#pragma warning disable 8625 using PrivaPub.ClientModels; using PrivaPub.ClientModels.User; namespace PrivaPub.Services { public interface IRootUsersService { Task LoginAsync(LoginForm loginForm, CancellationToken token = default); Task SignUpAsync(LoginForm signUpForm, CancellationToken token = default); Task BanUserAsync(UsersIds usersIds, CancellationToken token = default); Task UnbanUserAsync(UsersIds usersIds, CancellationToken token = default); Task RemoveUserAsync(UsersIds usersIds, CancellationToken token = default); Task RemoveSelfAsync(string rootId, string password, CancellationToken token = default); /// Whether a login's password is this one, after the same hashing whatever the answer. Task PasswordMatches(string rootId, string password, CancellationToken token = default); Task UpdateUserPasswordAsync(UserPasswordForm userPasswordForm, string userId, CancellationToken token = default); Task GetUserSettingsAsync(string userId, LoginForm loginForm = default, CancellationToken token = default); Task UpdateUserSettingsAsync(ViewUserSettings userSettings, string userId, CancellationToken token = default); Task SetupAndSendRecoveryEmail(PasswordRecoveryForm passwordRecoveryForm, string host, CancellationToken token = default); Task IsValidRecoveryCode(string recoveryCode, CancellationToken token = default); Task ChangePassword(NewPasswordForm newPasswordForm, CancellationToken token = default); Task AccountAsync(string rootId, CancellationToken token = default); Task RequestEmailChangeAsync(string rootId, EmailChangeForm form, CancellationToken token = default); Task VerifyEmailAsync(string rootId, string code, CancellationToken token = default); Task RemoveEmailAsync(string rootId, string password, CancellationToken token = default); Task TotpSetupAsync(string rootId, string password, CancellationToken token = default); Task TotpEnableAsync(string rootId, string code, CancellationToken token = default); Task TotpDisableAsync(string rootId, string password, string code, CancellationToken token = default); } }