chore: init project

This commit is contained in:
cesnimda
2026-06-30 15:53:32 +02:00
commit f43ef5f945
94 changed files with 4405 additions and 0 deletions
@@ -0,0 +1,33 @@
using InboxIntel.Application.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace InboxIntel.Api.Controllers;
/// <summary>
/// AI endpoints are read-only / advisory. They never trigger destructive
/// actions - suggestions are returned for the user to act on via /cleanup.
/// </summary>
public class AiController : ApiControllerBase
{
private readonly IAiService _ai;
public AiController(IAiService ai) => _ai = ai;
[HttpGet("status")]
public IActionResult Status() => Ok(new { enabled = _ai.IsEnabled });
[HttpPost("classify/{emailId:guid}")]
public async Task<IActionResult> Classify(Guid emailId, CancellationToken ct)
=> Ok(await _ai.ClassifyAsync(UserId, emailId, ct));
[HttpGet("summary")]
public async Task<IActionResult> Summary(CancellationToken ct)
=> Ok(await _ai.SummarizeInboxAsync(UserId, ct));
[HttpGet("suggestions")]
public async Task<IActionResult> Suggestions(CancellationToken ct)
=> Ok(await _ai.SuggestCleanupAsync(UserId, ct));
[HttpPost("generate-query")]
public async Task<IActionResult> GenerateQuery([FromBody] string naturalLanguage, CancellationToken ct)
=> Ok(await _ai.GenerateQueryAsync(UserId, naturalLanguage, ct));
}