using Data.SeaHavenIndustries; using Data.SeaHavenIndustries.Enums; using SeaHaven.DataServices.Interfaces; namespace SeaHaven.DataServices.Interfaces { public interface IWorkOrderDetailDataService { Task ExistsAsync( int workOrderId, CancellationToken cancellationToken = default, int? accountId = null); Task GetExtendedFieldsAsync(int workOrderId); Task> GetCommentsAsync(int workOrderId); Task> GetAuditLogsAsync(int workOrderId, int? limit = null); Task> GetAttachmentsAsync( int workOrderId, CancellationToken cancellationToken = default); Task> GetDispatchSignoffsAsync(int workOrderId); Task GetWorkOrderForMediaAsync( int workOrderId, CancellationToken cancellationToken = default, int? accountId = null); } public interface ICompletionDocTemplateDataService { Task ResolveForWorkOrderAsync(string? trade, WorkOrderType? workOrderType); Task> ListAsync( string? search, string? serviceKey, WorkOrderType? workOrderType, CancellationToken cancellationToken); Task GetDetailAsync(int id, CancellationToken cancellationToken); /// Tracked, not-deleted template with its procedures loaded, for editing. Task GetTrackedForEditAsync(int id, CancellationToken cancellationToken); Task CreateAsync(CompletionDocTemplate template, CancellationToken cancellationToken); /// /// Commits edits to a template from . A non-null /// replaces the whole procedure list. /// Task SaveEditAsync( CompletionDocTemplate template, IReadOnlyList? replacementProcedures, CancellationToken cancellationToken); /// /// Soft-deletes the template and clears every Service link to it in the same commit. /// Services keep RequiresCompletionDocument. False when the template does not exist. /// Task DeleteAndUnlinkServicesAsync(int id, string? deleterUserId, CancellationToken cancellationToken); /// /// Ids of open (non-terminal) work orders whose Service links this template, /// restricted to when set. /// Task> GetOpenLinkedWorkOrderIdsAsync( int templateId, int? accountId, CancellationToken cancellationToken); } }