using e_suite.API.Common.models;
using e_suite.Database.Audit;
using e_suite.Utilities.Pagination;
using eSuite.Core.Miscellaneous;

namespace e_suite.API.Common;

public interface ICustomFieldManager
{
    Task<IPaginatedData<CustomFieldDefinition>> GetFieldsAsync(Paging paging, CancellationToken cancellationToken);
    Task CreateFieldAsync(AuditUserDetails auditUserDetails, CreateCustomField custimField, CancellationToken cancellationToken);
    Task EditFieldAsync(AuditUserDetails auditUserDetails, EditCustomFields custimField, CancellationToken cancellationToken);
    Task PatchFieldAsync(AuditUserDetails auditUserDetails, IGeneralIdRef Id, PatchCustomFields customField, CancellationToken cancellationToken);
    
    Task<CustomFieldDefinition> GetFieldAsync(IGeneralIdRef id, CancellationToken cancellationToken);

    Task<CustomFieldDefinition> GetFieldAsync(string name, CancellationToken cancellationToken);

    Task DeleteFieldAsync(AuditUserDetails auditUserDetails, IGeneralIdRef id, CancellationToken cancellationToken);
    
}
