namespace OASystem.API.OAMethodLib.MicrosoftGraphMailbox; public interface IMicrosoftGraphMailboxService { /// /// GET /me 原始 JSON(使用调用方提供的 Graph 访问令牌)。 /// Task GetMeRawJsonAsync(string graphAccessToken, CancellationToken cancellationToken = default); /// /// 拉取收件箱中 receivedDateTime >= startUtc 的邮件列表 JSON。 /// Task GetInboxMessagesJsonSinceAsync(DateTime startUtc, string graphAccessToken, CancellationToken cancellationToken = default); /// /// POST /me/sendMail 发送纯文本邮件。 /// Task SendMailAsync(string toEmail, string subject, string textBody, string graphAccessToken, CancellationToken cancellationToken = default); /// /// 刷新 access_token /// Task RefreshAccessTokenAsync(string clientId, string tenant, string[] scopes, string tokenCacheBase64, // 从Redis拿到的缓存(Base64字符串) string homeAccountId // 用户标识(建议存这个) ); }