Skip to main content

Type Alias: InvoiceScan

@arolariu/website


@arolariu/website / types/invoices/Invoice / InvoiceScan

Type Alias: InvoiceScan

InvoiceScan = object

Defined in: types/invoices/Invoice.ts:201

Represents a document scan (image or PDF) attached to an invoice.

Remarks

Invoice scans are the source documents from which invoice data is extracted. An invoice can have multiple scans (e.g., front and back of a receipt, or multi-page documents).

Storage: Scans are stored in Azure Blob Storage with the location property containing the full CDN URL (https://cdn.arolariu.ro/...).

Metadata: The metadata object stores scan-specific information such as:

  • OCR confidence scores
  • Page numbers (for multi-page documents)
  • Extraction timestamps
  • Original file dimensions

Immutability: Once created, scan locations are immutable. To replace a scan, delete the old one and create a new scan entry.

Example

const scan: InvoiceScan = {
scanType: InvoiceScanType.JPEG,
location: "https://cdn.arolariu.ro/invoices/user123/scan-001.jpg",
metadata: {
ocrConfidence: { score: 0.95 },
dimensions: { width: 1920, height: 2560 }
}
};

See

Properties

scanType

scanType: InvoiceScanType

Defined in: types/invoices/Invoice.ts:203

The type of the invoice scan.


location

location: string

Defined in: types/invoices/Invoice.ts:205

The location (URL or path) of the invoice scan.


metadata

metadata: Record<string, object>

Defined in: types/invoices/Invoice.ts:207

Additional metadata associated with the invoice scan.

// was this page useful?