using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using FrameworkDAL.DTO.MailTemplate; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; namespace FrameworkDAL.CustomCode.MailTemplate { public interface IMailTemplateDAL { Task GetMailTemplate(int MailTemplateId, LoginDTO LoginDTO); Task GetSelectListMailTemplate(int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, bool IsCount = false); Task SaveMailTemplate(MailTemplateDTO MailTemplateDTO, LoginDTO LoginDTO); Task UpdateMailTemplate(MailTemplateDTO MailTemplateDTO, LoginDTO LoginDTO); Task DeleteMailTemplate(int MailTemplateId, LoginDTO LoginDTO); /// /// Returns the FLOWCODE configured on a mail template, or null when the template /// does not exist, is inactive, or has no flow code set. /// Used by MessageHubWebhookBLL to resolve the EIP flow for button-press webhooks. /// Task GetFlowCodeByTemplateIdAsync(int templateId, LoginDTO login, CancellationToken ct = default); /// /// Returns the most specific template for the given code: client-specific row wins over /// the global (NULL CLIENTID) platform default. Used for per-partner email branding. /// Task GetMailTemplateByCode(string mailTemplateCode, LoginDTO loginDTO); } }