Interface: CachedScan
@arolariu/website / types/scans/Scan / CachedScan
Interface: CachedScan
Defined in: types/scans/Scan.ts:233
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
cachedAttracks cache freshness for stale-while-revalidate pattern
Example
const cachedScan: CachedScan = {
...scan,
cachedAt: new Date(),
};
Extends
Properties
id
readonlyid:string
Defined in: types/scans/Scan.ts:159
Unique identifier for the scan (UUIDv7). Assigned at upload time and immutable.
Inherited from
userIdentifier
readonlyuserIdentifier:string
Defined in: types/scans/Scan.ts:165
The user identifier of the scan owner. Stored in Azure Blob metadata for filtering by user.
Inherited from
name
name:
string
Defined in: types/scans/Scan.ts:171
Human-readable name for the scan. Defaults to original filename, can be edited by user.
Inherited from
blobUrl
readonlyblobUrl:string
Defined in: types/scans/Scan.ts:177
Full URL to the scan in Azure Blob Storage. Format: https://cdn.arolariu.ro/scans/{userIdentifier}/{scanId}_{timestamp}.{ext}
Inherited from
mimeType
readonlymimeType:string
Defined in: types/scans/Scan.ts:183
MIME type of the uploaded file. Examples: "image/jpeg", "image/png", "application/pdf"
Inherited from
sizeInBytes
readonlysizeInBytes:number
Defined in: types/scans/Scan.ts:188
File size in bytes.
Inherited from
scanType
readonlyscanType:ScanType
Defined in: types/scans/Scan.ts:194
Document format classification. Derived from mimeType during upload.
Inherited from
uploadedAt
readonlyuploadedAt:Date
Defined in: types/scans/Scan.ts:199
Timestamp when the scan was uploaded.
Inherited from
status
status:
ScanStatus
Defined in: types/scans/Scan.ts:204
Current lifecycle status of the scan.
Inherited from
metadata
metadata:
ScanMetadata
Defined in: types/scans/Scan.ts:210
Canonical typed metadata stored with the blob. Contains lifecycle tracking, document classification, and ownership information.
Inherited from
cachedAt
cachedAt:
Date
Defined in: types/scans/Scan.ts:238
Timestamp when this scan was cached in IndexedDB. Used to determine cache freshness.