using AmpDAL.DTO.RegisterApi; using GB5Shared.DTO.Framework.Login; namespace AMPBLL.RegisterApi; public interface IRegisterApiBLL { Task SaveAsync(RegisterApiSaveDTO dto, LoginDTO login, CancellationToken ct); Task GetAsync(int apiId, LoginDTO login, CancellationToken ct); Task> GetListAsync(LoginDTO login, CancellationToken ct); Task> GetSelectListAsync(LoginDTO login, CancellationToken ct); Task DeleteAsync(int apiId, LoginDTO login, CancellationToken ct); Task ParseSpecAsync(string base64Content, CancellationToken ct); Task ParseUrlAsync(string apiUrl, string? requestJson, string? responseJson, CancellationToken ct); /// /// Returns the APIDOMAINID for the given domain name, reusing an existing /// MAPIDOMAIN row if one already exists (e.g. one domain shared per module), /// otherwise creating it. /// Task ResolveDomainIdAsync(RegisterApiSaveDTO dto, int apiId, LoginDTO login, CancellationToken ct); /// Repoints MAPICAPABILITY.APIDOMAINID at the given domain id for this API. Task RepointCapabilityDomainAsync(int apiId, int apiDomainId, LoginDTO login, CancellationToken ct); /// /// Deletes MAPIDOMAIN rows for the tenant no longer referenced by any MAPI or /// MAPICAPABILITY row (leftovers from the old one-domain-per-API scheme). /// Returns the number of rows removed. /// Task CleanupOrphanedDomainsAsync(LoginDTO login, CancellationToken ct); }