feat: add DOCX workbench and Word automation
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DocumentAutomation.Shared;
|
||||
|
||||
public sealed record DocumentInspectionResult
|
||||
{
|
||||
public required string FilePath { get; init; }
|
||||
public long FileSize { get; init; }
|
||||
public DateTime LastWriteTimeUtc { get; init; }
|
||||
public int Sections { get; init; }
|
||||
public int Paragraphs { get; init; }
|
||||
public int Tables { get; init; }
|
||||
public int Images { get; init; }
|
||||
public int Headers { get; init; }
|
||||
public int Footers { get; init; }
|
||||
public bool HasPageFields { get; init; }
|
||||
public bool HasNumPagesFields { get; init; }
|
||||
public bool HasSectionPagesFields { get; init; }
|
||||
public int Bookmarks { get; init; }
|
||||
public int ContentControls { get; init; }
|
||||
public int Comments { get; init; }
|
||||
public bool HasTrackedChanges { get; init; }
|
||||
public bool HasProtectedParts { get; init; }
|
||||
public IReadOnlyList<string> Styles { get; init; } = [];
|
||||
public IReadOnlyList<string> Warnings { get; init; } = [];
|
||||
}
|
||||
|
||||
public sealed record WordDocumentBuildRequest
|
||||
{
|
||||
public required string TemplatePath { get; init; }
|
||||
public required string BodyPath { get; init; }
|
||||
public required string OutputDocxPath { get; init; }
|
||||
public string? RulesProfilePath { get; init; }
|
||||
public bool PreserveBodyFormatting { get; init; } = true;
|
||||
public bool PreservePageBreaks { get; init; } = true;
|
||||
}
|
||||
|
||||
public sealed record WordDocumentResult
|
||||
{
|
||||
public required string OutputDocxPath { get; init; }
|
||||
public string? OutputPdfPath { get; init; }
|
||||
public required string LogPath { get; init; }
|
||||
public required TimeSpan Duration { get; init; }
|
||||
public required string InsertionPoint { get; init; }
|
||||
}
|
||||
|
||||
public sealed record WordPreviewResult
|
||||
{
|
||||
public required string PdfPath { get; init; }
|
||||
public required TimeSpan Duration { get; init; }
|
||||
}
|
||||
|
||||
public enum RuleEvaluationStatus { Pass, Fail, NotApplicable, NeedsReview, Error }
|
||||
|
||||
public sealed record RuleEvaluationResult
|
||||
{
|
||||
public required string RuleId { get; init; }
|
||||
public required RuleEvaluationStatus Status { get; init; }
|
||||
public required string Message { get; init; }
|
||||
public string? ClauseId { get; init; }
|
||||
public int? SourcePage { get; init; }
|
||||
public string? DocumentLocation { get; init; }
|
||||
public bool CanAutoFix { get; init; }
|
||||
}
|
||||
|
||||
public sealed record OllamaSettings
|
||||
{
|
||||
public string BaseUrl { get; init; } = "http://192.168.200.112:11434";
|
||||
public string Model { get; init; } = "";
|
||||
public int TimeoutSeconds { get; init; } = 120;
|
||||
}
|
||||
Reference in New Issue
Block a user