using Fitness_core_BE.Models; namespace Fitness_core_BE.Interfaces { public interface IAccessDeviceRepo { Task AddDeviceAsync(AccessDevice device); Task RemoveDeviceAsync(Guid clientId); Task GetDeviceByDId(Guid deviceId); Task GetDeviceByIdAsync(Guid deviceId, CancellationToken ct = default); Task GetDeviceByHardwareIdAsync( Guid clientId, string hardwareId, CancellationToken ct = default); Task GetActiveDeviceForClientAsync( Guid clientId, Guid deviceId, CancellationToken ct = default); Task> GetAgentDevicesAsync( Guid clientId, Guid agentId, IReadOnlyCollection deviceIds, CancellationToken ct = default); Task GetDeviceByCId(Guid clientId); Task AddCustomerAccessAsync(CustomerAccess customerAccess); Task GetByIdAsync(int deviceUserId); Task GetByDeviceAndUserIdAsync(Guid deviceId, int deviceUserId); Task GetByCusGuidAsync(Guid CusId); Task UpdateAsync(CustomerAccess customerAccess); Task> GetDevicesByClientAsync(Guid clientId); Task DeviceBelongsToClientAsync(Guid deviceId, Guid clientId); Task GetCustomerByIdAsync(Guid customerId, CancellationToken ct = default); Task GetStaffByIdAsync(Guid clientId, Guid staffId, CancellationToken ct = default); /// /// The other active customers sharing this customer's active group/couple /// subscriptions at this gym (excludes the customer themselves). Empty for an /// Individual plan, so callers can cascade unconditionally. /// Task> GetCoMembersOnSharedSubscriptionsAsync( Guid clientId, Guid customerId, CancellationToken ct = default); Task IsActiveCustomerMemberAsync( Guid clientId, Guid customerId, CancellationToken ct = default); Task GetLatestActiveClientIdForCustomerAsync( Guid customerId, CancellationToken ct = default); Task GetAccessProfileAsync( Guid clientId, Guid userId, CancellationToken ct = default); Task GetAccessStatusProfileAsync( Guid clientId, Guid userId, CancellationToken ct = default); Task> GetAccessProfilesByClientAsync( Guid clientId, CancellationToken ct = default); Task AddAccessProfileAsync(AccessProfile profile, CancellationToken ct = default); Task GetBindingAsync( long accessProfileId, Guid deviceId, CancellationToken ct = default); Task GetBindingByEmployeeNoAsync( Guid deviceId, string employeeNo, CancellationToken ct = default); Task> GetBindingsForDeviceAsync( Guid deviceId, CancellationToken ct = default); Task AddBindingAsync(AccessDeviceBinding binding, CancellationToken ct = default); Task IsDeviceEmployeeNoOccupiedAsync( Guid deviceId, string employeeNo, Guid exceptUserId, CancellationToken ct = default); Task> GetDuplicateUnlinkedEnrollmentsAsync( Guid deviceId, string employeeNo, int deviceUserId, CancellationToken ct = default); Task GetUnlinkedEnrollmentByEmployeeNoAsync( Guid deviceId, string employeeNo, CancellationToken ct = default); Task AddUnlinkedEnrollmentAsync( UnlinkedDeviceEnrollment enrollment, CancellationToken ct = default); Task GetCustomerIdForUserAtClientAsync( Guid userId, Guid clientId, CancellationToken ct = default); Task IsDeviceCommandableAsync(Guid deviceId, CancellationToken ct = default); // Fingerprint-enrolled-directly-on-device reconciliation (req 3). Task UpsertUnlinkedEnrollmentAsync(Guid deviceId, int deviceUserId, string? reportedName); Task> GetUnlinkedEnrollmentsByClientAsync(Guid clientId); Task GetUnlinkedEnrollmentByIdAsync(Guid id); Task CustomerAccessIdExistsAsync(int id); } }