Files
Core_Be/Interfaces/IDeviceCommandRepo.cs
Dhananjaya99 bffc9b1686 first commit
2026-09-28 11:44:26 +05:30

37 lines
1.4 KiB
C#

using Fitness_core_BE.Models;
namespace Fitness_core_BE.Interfaces
{
public interface IDeviceCommandRepo
{
Task<DeviceCommand> AddAsync(DeviceCommand command);
Task<List<DeviceCommand>> GetPendingByClientAsync(Guid clientId);
Task<DeviceCommand?> GetByIdAsync(Guid commandId);
Task<bool> IsQueuedAsync(
Guid bindingId,
string commandType,
int desiredVersion,
CancellationToken ct = default);
Task<List<DeviceCommand>> GetPendingStateCommandsAsync(
Guid bindingId,
CancellationToken ct = default);
Task<List<DeviceCommand>> GetPendingFacePhotoCommandsAsync(
Guid bindingId,
CancellationToken ct = default);
Task<List<DeviceCommand>> GetExhaustedLeasesAsync(
Guid clientId,
DateTime now,
CancellationToken ct = default);
Task<List<DeviceCommand>> GetLeaseableCommandsAsync(
Guid clientId,
Guid agentId,
DateTime now,
int take,
CancellationToken ct = default);
Task<DeviceCommand?> GetForAgentResultAsync(
Guid commandId,
CancellationToken ct = default);
Task UpdateStatusAsync(DeviceCommand command, string status, string? resultJson = null, DateTime? processedAt = null);
}
}