using Bit.Core.Auth.UserFeatures.UserKey; using Bit.Core.Entities; using Bit.Core.Models.Data; namespace Bit.Core.Repositories; public interface IUserRepository : IRepository { Task GetByEmailAsync(string email); Task GetBySsoUserAsync(string externalId, Guid? organizationId); Task GetKdfInformationByEmailAsync(string email); Task> SearchAsync(string email, int skip, int take); Task> GetManyByPremiumAsync(bool premium); Task GetPublicKeyAsync(Guid id); Task GetAccountRevisionDateAsync(Guid id); Task UpdateStorageAsync(Guid id); Task UpdateRenewalReminderDateAsync(Guid id, DateTime renewalReminderDate); Task> GetManyAsync(IEnumerable ids); /// /// Sets a new user key and updates all encrypted data. /// Warning: Any user key encrypted data not included will be lost. /// /// The user to update /// Registered database calls to update re-encrypted data. [Obsolete("Intended for future improvements to key rotation. Do not use.")] Task UpdateUserKeyAndEncryptedDataAsync(User user, IEnumerable updateDataActions); }