using GB5Shared.DTO.Framework.Login; using PartnerDAL.DTO.PartnerApiKey; namespace PartnerDAL.CustomCode.PartnerApiKey { public interface IPartnerApiKeyDAL { Task GetPartnerApiKeyList(int partnerProductId, LoginDTO loginDTO); Task GetApiKeyByHash(string hashedKey, LoginDTO loginDTO); Task SavePartnerApiKey(PartnerApiKeyDTO dto, LoginDTO loginDTO); Task DeletePartnerApiKey(int apiKeyId, int modifiedById, LoginDTO loginDTO); Task UpdateApiKeyLastUsed(int apiKeyId, LoginDTO loginDTO); /// Pre-auth lookup against the shared GB5 system DB directly (no LoginDTO/tenant /// routing — there is no tenant context yet at this point in the M2M flow). Mirrors /// ApiKeyAuthMiddleware's own inline lookup exactly, extracted here so the new M2M token /// endpoint doesn't duplicate it a third time. Task GetApiKeyByHashFromSystemDbAsync(string hashedKey, CancellationToken ct); /// Pre-auth last-used stamp against the shared GB5 system DB directly — same /// rationale as GetApiKeyByHashFromSystemDbAsync. Task UpdateApiKeyLastUsedInSystemDbAsync(int apiKeyId, CancellationToken ct); } }