using TakeoutSaaS.Application.App.Members.MessageReach.Dto;
namespace TakeoutSaaS.Application.App.Members.MessageReach.Services;
///
/// 会员消息触达应用服务。
///
public interface IMemberMessageReachAppService
{
///
/// 获取月度统计。
///
Task GetStatsAsync(long tenantId, CancellationToken cancellationToken = default);
///
/// 分页查询消息。
///
Task SearchMessagesAsync(
long tenantId,
SearchMemberMessageInput input,
CancellationToken cancellationToken = default);
///
/// 获取消息详情。
///
Task GetMessageDetailAsync(
long tenantId,
long messageId,
CancellationToken cancellationToken = default);
///
/// 获取消息调度元信息。
///
Task GetDispatchMetaAsync(
long tenantId,
long messageId,
CancellationToken cancellationToken = default);
///
/// 保存消息草稿或发送任务。
///
Task SaveMessageAsync(
long tenantId,
SaveMemberMessageInput input,
CancellationToken cancellationToken = default);
///
/// 绑定消息对应的 Hangfire 任务 ID。
///
Task BindDispatchJobAsync(
long tenantId,
long messageId,
string? hangfireJobId,
CancellationToken cancellationToken = default);
///
/// 删除消息并返回原任务 ID。
///
Task DeleteMessageAsync(
long tenantId,
long messageId,
CancellationToken cancellationToken = default);
///
/// 估算目标人群数量。
///
Task EstimateAudienceAsync(
long tenantId,
MemberMessageAudienceEstimateInput input,
CancellationToken cancellationToken = default);
///
/// 分页查询模板。
///
Task SearchTemplatesAsync(
long tenantId,
SearchMemberMessageTemplateInput input,
CancellationToken cancellationToken = default);
///
/// 获取模板详情。
///
Task GetTemplateAsync(
long tenantId,
long templateId,
CancellationToken cancellationToken = default);
///
/// 保存模板。
///
Task SaveTemplateAsync(
long tenantId,
SaveMemberMessageTemplateInput input,
CancellationToken cancellationToken = default);
///
/// 删除模板。
///
Task DeleteTemplateAsync(
long tenantId,
long templateId,
CancellationToken cancellationToken = default);
///
/// 执行消息发送。
///
Task ExecuteDispatchAsync(
long tenantId,
long messageId,
CancellationToken cancellationToken = default);
}