using AutomationDAL.DTO.Run; using GB5Shared.DTO.Framework.Login; namespace AutomationBLL.Run; public interface IRunBLL { Task TriggerRun(int scriptId, int versionId, string? parametersJson, LoginDTO login, CancellationToken ct); Task EnqueueRun(int scriptId, int versionId, string triggeredBy, string? parametersJson, int? targetId, LoginDTO login, CancellationToken ct); // Same validation/insert path as EnqueueRun, but returns the raw RunId — for internal callers // (e.g. AutomationBLL.EventMap.EventDispatchBLL) that need to link the new run to other state // (TDOCUMENTFLOW) rather than surface a human-readable message. Task EnqueueRunRaw(int scriptId, int versionId, string triggeredBy, string? parametersJson, int? targetId, LoginDTO login, CancellationToken ct); Task AppendLog(long runId, string logLevel, string message, LoginDTO login, CancellationToken ct); Task CompleteRun(long runId, string status, string? summary, string? errorMessage, LoginDTO login, CancellationToken ct); Task GetLatestStatusForScript(int scriptId, LoginDTO login, CancellationToken ct); Task> GetHistory(int? scriptId, string? status, LoginDTO login, CancellationToken ct); Task GetDetail(long runId, LoginDTO login, CancellationToken ct); Task GetNextJob(string supportedRuntimes, int agentId, int waitSeconds, LoginDTO login, CancellationToken ct); Task SaveArtifact(long runId, string artifactType, string blobUri, LoginDTO login, CancellationToken ct); Task> GetArtifacts(long runId, LoginDTO login, CancellationToken ct); }