using adas_core.Domain.Models.Filter;
using adas_core.Domain.Models.MongoModels;
using MongoDB.Bson;

namespace adas_core.Application.Repositories.Interfaces;

public interface IConfigObservationRepository : IMongoRepository<ConfigObservation>
{
    Task<ConfigObservation?> FindById(ObjectId id);

    Task<ConfigObservation?> Update(ConfigObservation configObservation);

    Task<ConfigObservation?> Delete(ObjectId id);

    Task<List<ObjectId>> FindAllIds();

    Task<ICollection<ConfigObservation>> FindAll();

    Task<List<string>> GetConfigNames(string id);
    Task<List<string>> GetConfigNames();
    Task<long> Count();
    Task<ICollection<ConfigObservation>> GetPaginatedItems(PaginationFilter filter);
    Task<ConfigObservation?> FindByName(string name);
    Task<ConfigObservation?> GetByCodeSysAndCode(string? codingSystem, string? code);
    Task<ConfigObservation> InsertOneAsyncAndReturn(ConfigObservation configObservationItem);
    Task<List<ConfigObservation>> FindAllByName(string name);

    Task<ConfigObservation?> GetSingleConfigObservationItem(string? code, string? codingSystem, string? name,
        string? originalName);
}