feat(documents): expose content-index provenance on the document DTO

Surface the content-search index's source (vision vs local extraction) on
the list + detail DTO so the vault UI can tell an AI-read document from a
locally-indexed one. Threads the source through both read paths and the
serialisers, regenerates the OpenAPI contract, and adds a narrowing helper
for the free-String column.
This commit is contained in:
Marc-André Bombeck committed 2026-07-08 21:15:52 +02:00
1 parent d7ff74bb2e
commit bb0ebb1dce
9 files changed
+108 -14

No files matched your search

+24 -2
View File
@@ -26193,6 +26193,15 @@ components:
- attachment
hasContentIndex:
type: boolean
contentIndexSource:
anyOf:
- type: string
enum:
- vision
- text-ocr
- local-pdf
- local-ocr
- type: "null"
createdAt:
type: string
updatedAt:
@@ -26214,6 +26223,7 @@ components:
- conditionLinks
- servingClass
- hasContentIndex
- contentIndexSource
- createdAt
- updatedAt
additionalProperties: false
@@ -26222,8 +26232,10 @@ components:
(plaintext); `documentDate` is the user filing date; `reportDate` is the model-transcribed date (null until
extraction runs). `servingClass` says how `/original` delivers the file — render inline (`inline`) or
download-only (`attachment`); render/download by it, never by MIME guess. `hasContentIndex` is true when the
document has a content-search index (drives the re-index affordance). Treat an unknown `kind` value as OTHER
when decoding.
document has a content-search index (auto-indexed on upload); `contentIndexSource` says how that index was
produced — `vision` means an AI provider read the original, the other values are provider-free local
extractions, and it is null when `hasContentIndex` is false. Treat an unknown `kind` value as OTHER when
decoding.
DocumentConditionLink:
type: object
properties:
@@ -26448,6 +26460,15 @@ components:
- attachment
hasContentIndex:
type: boolean
contentIndexSource:
anyOf:
- type: string
enum:
- vision
- text-ocr
- local-pdf
- local-ocr
- type: "null"
createdAt:
type: string
updatedAt:
@@ -26473,6 +26494,7 @@ components:
- conditionLinks
- servingClass
- hasContentIndex
- contentIndexSource
- createdAt
- updatedAt
- facts