using DynamicData; namespace ZymonicServices; // TODO Remove this since this is a generic interface and we don't need to have the same name as the class // TODO-Phase2? Can we do this with fewer generic types? // Potentially replacing/customising the JSON serialiser allows us to Get down to TSearch and TResult // I'm pretty sure that it wouldn't need changes to the IZymonicFilterSearch and IZymonicFilterResult implementations public interface IZymonicFilter where TSearch : class, IZymonicFilterSearch, new() where TSearchAPI : class, IZymonicFilterApiRequest, new() where TResult : class, IZymonicFilterResult where TFilterResults : class, IZymonicFilterResults where TFilterResultsAPI : class, IZymonicFilterApiResponse { public IZymonicFilter ZymonicFilter(IZymonicDbContextFactory contextFactory, IZymonicSettings settings, IZymonicAA authService); public IObservable> Connect(); public readonly struct SearchProgress { public SearchProgress(int resultsRetrieved, int totalResults, Exception? e = null) { ResultsRetrieved = resultsRetrieved; TotalResults = totalResults; error = e; } public int ResultsRetrieved { get; init; } public int TotalResults { get; init; } public Exception? error { get; init; } } public IObservable Search(TSearch search, bool debugMode = false, bool requireAuthenticated = true); public List GetAll(); }