using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using SwDAL.DTO.UpgradePackage; namespace SwBLL.UpgradePackage; public interface IUpgradePackageBLL { Task GetById(int packageId, LoginDTO loginDTO, CancellationToken ct); Task> GetDdlLines(int packageId, LoginDTO loginDTO, CancellationToken ct); Task> GetMetaLines(int packageId, LoginDTO loginDTO, CancellationToken ct); Task GetList(CriteriaDTO criteria, string? searchText, int pageOffset, int pageSize, LoginDTO loginDTO, CancellationToken ct = default); Task GetSelectListUpgradePackage(int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO loginDTO); /// Resolves one DbModel's real provisioning chain — every Released Universal /// package plus any Released overlay package matching the given scope filter, always /// collapsed to the latest (non-superseded) version per chain, ordered by ScopeType then /// SequenceInChain. `scope` may be null (or any/all of its fields null) — only Universal /// packages resolve in that case. Task> GetProvisioningChain( int dbModelId, PackageScopeFilterDTO? scope, LoginDTO loginDTO, CancellationToken ct); /// Whole-DbModel package lineage (PackageId/PackageCode/ReleaseVersion/ /// SupersedesPackageId), unfiltered by STATUS/PKGSTATUS/scope — used by /// ProvisioningBLL.GetCurrentVersion to walk SupersedesPackageId back to the nearest /// package carrying a ReleaseVersion. Task> GetLineage(int dbModelId, LoginDTO loginDTO, CancellationToken ct); Task Save(UpgradePackageDTO dto, LoginDTO loginDTO, CancellationToken ct); Task Delete(int packageId, LoginDTO loginDTO, CancellationToken ct); // Attach/detach a single DdlScript — the only previously-missing wiring; // ReplaceDdlLines/GetDdlLines themselves already existed at the DAL layer. Task AttachDdlScript(AttachDdlScriptRequestDTO req, LoginDTO loginDTO, CancellationToken ct); Task DetachDdlScript(DetachDdlScriptRequestDTO req, LoginDTO loginDTO, CancellationToken ct); }