37 lines
1.4 KiB
C#
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);
|
|
}
|
|
}
|