namespace OASystem.API.OAMethodLib.MicrosoftGraphMailbox;
///
/// Microsoft Graph 邮箱轮询(公共客户端 MSAL + 交互式首次登录)配置。
///
public class MicrosoftGraphMailboxOptions
{
public const string SectionName = "MicrosoftGraphMailbox";
///
/// 是否启用后台收件箱轮询。关闭时不初始化 MSAL、不弹浏览器。
///
public bool Enabled { get; set; }
///
/// Azure AD 应用程序(公共客户端)ID。
///
public string ClientId { get; set; } = string.Empty;
///
/// 租户,例如 common、organizations 或具体租户 GUID。
///
public string Tenant { get; set; } = "common";
///
/// 须在 Azure 门户中注册的公共客户端重定向 URI(与交互式登录一致)。
///
public string RedirectUri { get; set; } = "http://localhost:55649";
///
/// 轮询间隔(秒)。
///
public int PollIntervalSeconds { get; set; } = 30;
///
/// 每次拉取的邮件条数上限。
///
public int TopMessages { get; set; } = 50;
///
/// MSAL 令牌缓存目录;为空则使用 %LocalAppData%\OASystem\MicrosoftGraphMailbox。
///
public string? CacheDirectory { get; set; }
///
/// 令牌缓存文件名。
///
public string CacheFileName { get; set; } = "msal_graph_mailbox_cache.bin";
///
/// 启动并成功取 token 后是否调用 /me 打一条日志(便于确认账号)。
///
public bool LogProfileOnStartup { get; set; } = true;
///
/// 无新邮件时是否仍输出轮询心跳日志。
///
public bool LogEachPollWhenEmpty { get; set; }
}