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 { 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 /// 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; } }