Table of Contents

**@arolariu/website**


@arolariu/website / types / CachedScan

Interface: CachedScan

Defined in: types/scans/Scan.ts:215

Cached version of Scan with local-only fields for IndexedDB persistence.

Remarks

Extends the base Scan type with fields that are only relevant for local caching and hydration. These fields are not stored in Azure.

Cache Strategy:

  • Scans are cached in IndexedDB for fast initial page load
  • Background sync fetches fresh data from Azure
  • cachedAt tracks cache freshness for stale-while-revalidate pattern

Example

const cachedScan: CachedScan = {
  ...scan,
  cachedAt: new Date(),
};

Extends

Properties

id

readonly id: string

Defined in: types/scans/Scan.ts:141

Unique identifier for the scan (UUIDv7). Assigned at upload time and immutable.

Inherited from

Scan.id


userIdentifier

readonly userIdentifier: string

Defined in: types/scans/Scan.ts:147

The user identifier of the scan owner. Stored in Azure Blob metadata for filtering by user.

Inherited from

Scan.userIdentifier


name

name: string

Defined in: types/scans/Scan.ts:153

Human-readable name for the scan. Defaults to original filename, can be edited by user.

Inherited from

Scan.name


blobUrl

readonly blobUrl: string

Defined in: types/scans/Scan.ts:159

Full URL to the scan in Azure Blob Storage. Format: https://cdn.arolariu.ro/scans/{userIdentifier}/{scanId}_{timestamp}.{ext}

Inherited from

Scan.blobUrl


mimeType

readonly mimeType: string

Defined in: types/scans/Scan.ts:165

MIME type of the uploaded file. Examples: "image/jpeg", "image/png", "application/pdf"

Inherited from

Scan.mimeType


sizeInBytes

readonly sizeInBytes: number

Defined in: types/scans/Scan.ts:170

File size in bytes.

Inherited from

Scan.sizeInBytes


scanType

readonly scanType: ScanType

Defined in: types/scans/Scan.ts:176

Document format classification. Derived from mimeType during upload.

Inherited from

Scan.scanType


uploadedAt

readonly uploadedAt: Date

Defined in: types/scans/Scan.ts:181

Timestamp when the scan was uploaded.

Inherited from

Scan.uploadedAt


status

status: ScanStatus

Defined in: types/scans/Scan.ts:186

Current lifecycle status of the scan.

Inherited from

Scan.status


metadata

metadata: Record<string, string>

Defined in: types/scans/Scan.ts:192

Additional metadata stored with the blob. Can include OCR hints, original dimensions, etc.

Inherited from

Scan.metadata


cachedAt

cachedAt: Date

Defined in: types/scans/Scan.ts:220

Timestamp when this scan was cached in IndexedDB. Used to determine cache freshness.