using System; using System.Threading; using System.Threading.Tasks; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Qualifier; namespace FrameworkBLL.GOP { public interface IMappingEngineBLL { // ── Legacy overload (Guid-based) ────────────────────────────────────────── // Used by existing callers that pass a MappingVersionId directly. Task TransformAsync(string SourcePayloadJson, Guid MappingVersionId, LoginDTO LoginDTO); // ── Code-based overload (no FactBag) ────────────────────────────────────── // Used by GopExecutionPipeline / MapperNodeExecutor. // When the step does not carry a QualifierFactBag, [FactBag] source paths // will log a warning and resolve to an empty string. Task TransformAsync( string mapperCode, string sourcePayloadJson, LoginDTO loginDTO, CancellationToken ct = default); // ── Code-based overload (with FactBag) ──────────────────────────────────── // Used when the mapper is called from within a qualifier-aware context // (e.g. enrichment step that has already populated a QualifierFactBag). // [FactBag] source paths are resolved from the supplied bag instead of // falling back to an empty string. Task TransformAsync( string mapperCode, string sourcePayloadJson, LoginDTO loginDTO, QualifierFactBag? factBag, CancellationToken ct = default); } }