AyCode.Core/AyCode.Interfaces/Logins/IAcLoginServiceCommon.cs

29 lines
1.6 KiB
C#

using AyCode.Core.Consts;
using AyCode.Interfaces.Addresses;
using AyCode.Interfaces.Profiles;
using AyCode.Interfaces.ServiceProviders;
using AyCode.Interfaces.Users;
namespace AyCode.Interfaces.Logins;
public interface IAcLoginServiceCommon<TUser, TProfile, TCompany, TUserToServiceProvider, TProfileAddress> : IAcLoginServiceBase<TUser, TProfile, TCompany, TUserToServiceProvider, TProfileAddress>
where TUser : class, IAcUser<TProfile, TCompany, TUserToServiceProvider, TProfileAddress>
where TProfile : class, IAcProfile<TProfileAddress>
where TCompany : class, IAcCompanyBase
where TUserToServiceProvider : class, IAcUserToCompanyBase
where TProfileAddress : class, IAcAddress
{
public bool Logout();
public Task<bool> LogoutAsync();
public AcErrorCode Registration(string email, string password, string? phoneNumber = null, Guid? referralId = null);
public AcErrorCode Registration(Guid userId, string email, string password, string? phoneNumber = null, Guid? referralId = null);
public Task<AcErrorCode> RegistrationAsync(string email, string password, string? phoneNumber = null, Guid? referralId = null);
public Task<AcErrorCode> RegistrationAsync(Guid userId, string email, string password, string? phoneNumber = null, Guid? referralId = null);
public AcErrorCode ChangePassword(Guid userId, string oldPassword, string newPassword);
public Task<AcErrorCode> ChangePasswordAsync(Guid userId, string oldPassword, string newPassword);
public AcErrorCode ForgotPassword(string email, string newPassword);
public Task<AcErrorCode> ForgotPasswordAsync(string email, string newPassword);
}