using DXPBLL.Party; using DXPDAL.Common; using DXPDAL.Party; using DXPSL.Common; using GB5Shared.DTO.Framework.Enum; using GB5Shared.DTO.Framework.ResponseStandard; namespace DXPSL.Endpoints.Party; // NOTE: same RBAC caveat as SaveParty/LinkPartyToTenant — admin/onboarding-gated in a real // deployment. Missing from the original Phase 1.1 SL layer (IPartyBLL.LinkPartyBranchAsync had no // endpoint) — found via live verification (2026-07-16), since KYC submission needs a real // DxpPartyBranchLinkId to submit against. public class LinkPartyBranch : DXPBaseEndpoint> { private readonly IPartyBLL _bll; private readonly IDXPSystemContext _systemContext; public LinkPartyBranch(IPartyBLL bll, IDXPSystemContext systemContext) { _bll = bll; _systemContext = systemContext; } public override void Configure() => Post("/DXP/Party/LinkPartyBranch"); protected override async Task> ExecuteAsync( PartyBranchLinkDTO req, DXPCallerContext caller, CancellationToken ct) { var message = await _bll.LinkPartyBranchAsync(req, _systemContext.GetSystemLogin(caller.DxpUserId), ct); return new ResponseStandardDTO { Status = FrameworkEnumDTO.ResponseStatus.Ok, Body = message }; } }