using System.Threading;
using System.Threading.Tasks;
using GB5Shared.DTO.Framework.Login;
using GB5Shared.QueryExecutor;
namespace GB5Shared.ScanIdentifier
{
///
/// The one generic engine behind the Generate/Print/List facilities — pure logic over
/// IQueryExecutor + AutoNumber + IScanTargetResolverDispatcher, with no entity-specific
/// code of its own. Registered per-host the same way AutoNumber/IQueryExecutor already are;
/// every host gets its own instance, all reading/writing the one shared MSCANIDENTIFIER table.
///
public interface IScanIdentifierEngine
{
Task GenerateAsync(GenerateScanIdentifierRequestDTO request, LoginDTO login, CancellationToken ct);
/// Effective MSCANTARGETCONFIG for an EntityType (tenant-aware, with sane defaults if unconfigured) — backs the Generate facility's Quantity-field enablement.
Task GetEffectiveConfigAsync(string entityType, LoginDTO login, CancellationToken ct);
Task GetByValueAsync(string identifierValue, LoginDTO login, CancellationToken ct);
Task> GetListPagedAsync(
string entityType, int statusFilter, string searchTerm, System.DateTime generatedFrom,
int page, int pageSize, LoginDTO login, CancellationToken ct);
Task RetireAsync(int scanIdentifierId, LoginDTO login, CancellationToken ct);
Task ReactivateAsync(int scanIdentifierId, LoginDTO login, CancellationToken ct);
Task MarkPrintedAsync(int scanIdentifierId, LoginDTO login, CancellationToken ct);
Task> GetPrinterTypesAsync(LoginDTO login, CancellationToken ct);
Task> GetLabelTypesAsync(LoginDTO login, CancellationToken ct);
/// Renders one PDF page per row (sized to the chosen label's real dimensions) and marks each row printed.
Task PrintBatchAsync(PrintBatchRequestDTO request, LoginDTO login, CancellationToken ct);
}
}