mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 23:33:10 +00:00
The rejection message now lists every type the media allowlist accepts, and a test fails if the message and the allowlist drift apart.
42 lines
1.7 KiB
C#
42 lines
1.7 KiB
C#
using Data.SeaHavenIndustries;
|
|
|
|
namespace SeaHaven.DataServices.Interfaces
|
|
{
|
|
public interface IWorkOrderMediaDataService
|
|
{
|
|
/// <summary>AsNoTracking base (+ optional account) scoped load for pre-mutation auth.</summary>
|
|
Task<WorkOrder?> GetWorkOrderForMediaAuthAsync(
|
|
int workOrderId,
|
|
int? accountId,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<WorkOrder?> GetTrackedWorkOrderAsync(
|
|
int workOrderId,
|
|
int? accountId,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<WorkOrderAttachments?> GetAttachmentForReadAsync(
|
|
int mediaId,
|
|
int workOrderId,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<WorkOrderAttachments?> GetTrackedAttachmentAsync(int mediaId, int workOrderId, CancellationToken cancellationToken);
|
|
void TrackAttachment(WorkOrderAttachments attachment);
|
|
|
|
/// <summary>Stored URLs of the work order's non-deleted attachments (photo/video counts).</summary>
|
|
Task<IReadOnlyList<string>> ListActiveAttachmentUrlsAsync(
|
|
int workOrderId,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Content types of the work order's current vendor-portal documents (not deleted, not
|
|
/// replaced by a newer completion version). The counts span both upload surfaces.
|
|
/// </summary>
|
|
Task<IReadOnlyList<string>> ListActiveVendorMediaContentTypesAsync(
|
|
int workOrderId,
|
|
CancellationToken cancellationToken);
|
|
void SetExpectedWorkOrderVersion(WorkOrder workOrder, byte[] version);
|
|
void MarkWorkOrderModified(WorkOrder workOrder);
|
|
Task SaveAsync(CancellationToken cancellationToken);
|
|
}
|
|
}
|