feature: Optional OCR-Assisted Draft Pre-Fill

This commit is contained in:
voltsrage
2026-06-28 01:28:54 +08:00
parent 5039dbb979
commit c160c5f912
42 changed files with 3592 additions and 33 deletions
@@ -22,7 +22,10 @@ public enum DigitizationEventType
DocumentAccessed,
Cancelled,
DraftFieldUpdated,
DraftObservationDeleted
DraftObservationDeleted,
OcrStarted,
OcrCompleted,
OcrFailed
}
public static class DigitizationEventTypeExtensions
@@ -52,6 +55,9 @@ public static class DigitizationEventTypeExtensions
DigitizationEventType.Cancelled => "cancelled",
DigitizationEventType.DraftFieldUpdated => "draft_field_updated",
DigitizationEventType.DraftObservationDeleted => "draft_observation_deleted",
DigitizationEventType.OcrStarted => "ocr_started",
DigitizationEventType.OcrCompleted => "ocr_completed",
DigitizationEventType.OcrFailed => "ocr_failed",
_ => throw new ArgumentOutOfRangeException(nameof(t))
};
@@ -80,6 +86,9 @@ public static class DigitizationEventTypeExtensions
"cancelled" => DigitizationEventType.Cancelled,
"draft_field_updated" => DigitizationEventType.DraftFieldUpdated,
"draft_observation_deleted" => DigitizationEventType.DraftObservationDeleted,
"ocr_started" => DigitizationEventType.OcrStarted,
"ocr_completed" => DigitizationEventType.OcrCompleted,
"ocr_failed" => DigitizationEventType.OcrFailed,
_ => throw new ArgumentOutOfRangeException(nameof(v), $"Unknown digitization event type: '{v}'")
};
}