Type Alias: InvoiceScanMetadataValue
@arolariu/website / types/invoices/Invoice / InvoiceScanMetadataValue
Type Alias: InvoiceScanMetadataValue
InvoiceScanMetadataValue =
string|object
Defined in: types/invoices/Invoice.ts:195
Represents a value that can be stored in InvoiceScan metadata.
Remarks
Invoice scan metadata supports both object structures (for complex nested data) and string primitives (for simple canonical scan metadata values).
Use Cases:
- String values: Canonical scan metadata fields (scanId, ownerId, status, timestamps, etc.)
- Object values: Legacy OCR confidence scores, dimensions, custom nested structures
Example
const metadata: Record<string, InvoiceScanMetadataValue> = {
// String values from canonical scan metadata
scanId: "scan-123",
status: "attached",
uploadedAt: "2026-01-01T00:00:00.000Z",
// Object values for nested data
ocrConfidence: { score: 0.95 },
dimensions: { width: 1920, height: 2560 }
};
// was this page useful?