shoc-backend/SeaHaven.DataServices/Interfaces/INotificationFeedDataService.cs

30 lines
1.5 KiB
C#
Raw Normal View History

using SeaHaven.DataServices.Models;
namespace SeaHaven.DataServices.Interfaces
{
/// <summary>
/// Live work-order conditions behind the notification feed. Every query applies the
/// base scope (no templates, no deleted rows), the caller's account scope, and the
/// shared open rule (not Completed/Canceled, including legacy terminal statuses).
/// </summary>
public interface INotificationFeedDataService
{
/// <summary>Open work orders with no dispatcher assigned in <paramref name="accountId"/> (null is org-wide).</summary>
Task<UnassignedWorkOrdersSummary> GetUnassignedSummaryAsync(int? accountId, CancellationToken cancellationToken);
/// <summary>
/// Open, Aveta-required work orders scheduled on <paramref name="today"/> or the next day with no
/// Aveta document attached. Items are the <paramref name="limit"/> latest scheduled.
/// </summary>
Task<NotificationCandidatePage> GetAvetaMissingAsync(
NotificationFeedScope scope, DateOnly today, int limit, CancellationToken cancellationToken);
/// <summary>
/// Open work orders scheduled at or before <paramref name="cutoff"/> with no active vendor dispatch,
/// direct or linked. Items are the <paramref name="limit"/> latest scheduled.
/// </summary>
Task<NotificationCandidatePage> GetNoVendorAsync(
NotificationFeedScope scope, DateTime cutoff, int limit, CancellationToken cancellationToken);
}
}