using System; using System.Collections.Generic; using System.Threading.Tasks; using Data.Models; using SharedLibraryCore.Database.Models; using SharedLibraryCore.Dtos; using SharedLibraryCore.QueryHelper; namespace SharedLibraryCore.Interfaces { [Obsolete("Use IMetaServiceV2")] public interface IMetaService { /// /// adds or updates meta key and value to the database /// /// key of meta data /// value of the meta data /// client to save the meta for /// /// Task AddPersistentMeta(string metaKey, string metaValue, EFClient client, EFMeta linkedMeta = null); /// /// adds or updates meta key and value to the database /// /// key of meta data /// value of the meta data /// id of the client to save the meta for /// Task SetPersistentMeta(string metaKey, string metaValue, int clientId); /// /// increments meta value and persists to the database /// if the meta value does not already exist it will be set to the increment amount /// /// key of meta data /// value to increment by /// id of the client to save the meta for /// Task IncrementPersistentMeta(string metaKey, int incrementAmount, int clientId); /// /// decrements meta value and persists to the database /// if the meta value does not already exist it will be set to the decrement amount /// /// key of meta data /// value to increment by /// id of the client to save the meta for /// Task DecrementPersistentMeta(string metaKey, int decrementAmount, int clientId); /// /// adds or updates meta key and value to the database /// /// key of meta data /// value of the meta data /// Task AddPersistentMeta(string metaKey, string metaValue); /// /// removes meta key with given value /// /// key of meta data /// client to delete the meta for /// Task RemovePersistentMeta(string metaKey, EFClient client); /// /// removes meta key with given value /// /// key of the meta data /// value of the meta data /// Task RemovePersistentMeta(string metaKey, string metaValue = null); /// /// retrieves meta data for given client and key /// /// key to retrieve value for /// client to retrieve meta for /// Task GetPersistentMeta(string metaKey, EFClient client); /// /// retrieves collection of meta for given key /// /// key to retrieve values for /// Task> GetPersistentMeta(string metaKey); /// /// adds a meta task to the runtime meta list /// /// type of meta /// action to perform void AddRuntimeMeta(MetaType metaKey, Func>> metaAction) where V : IClientMeta where T : PaginationRequest; /// /// retrieves all the runtime meta information for given client idea /// /// request information /// Task> GetRuntimeMeta(ClientPaginationRequest request); /// /// retreives all the runtime of provided type /// /// >request information /// type of meta to retreive /// Task> GetRuntimeMeta(ClientPaginationRequest request, MetaType metaType) where T : IClientMeta; } }