basalt / drives/src / DriveItem
Interface: DriveItem
Defined in: drives/src/provider.ts:58
One file or folder at the provider.
Properties
checksum?
> optional checksum?: DriveChecksum
Defined in: drives/src/provider.ts:88
Read DriveChecksum before comparing one against anything: it is comparable within a provider, and on Microsoft only within one account type, and a Google-native document has none at all.
contentType?
> optional contentType?: string
Defined in: drives/src/provider.ts:70
Media type as the provider reports it.
Never trusted. It is a hint for filtering and display only; the real type is decided by sniffing the bytes on the way in (@basaltkit/filesvalidate.sniff). Providers echo whatever the uploading client declared.
createdAt?
> optional createdAt?: number
Defined in: drives/src/provider.ts:90
Epoch ms.
exportOnly?
> optional exportOnly?: boolean
Defined in: drives/src/provider.ts:105
The item has no directly downloadable bytes — a Google Docs/Sheets file has to be exported to a concrete format first. The adapter decides what download produces for it (and may refuse); the engine only needs to know that size/checksum will usually be absent.
externalId
> externalId: string
Defined in: drives/src/provider.ts:60
Provider-assigned id, stable for the item's lifetime. Unique within a connection.
externalUrl?
> optional externalUrl?: string
Defined in: drives/src/provider.ts:98
A link a human can open at the provider. Stored and shown; never fetched by the framework — it is a provider-controlled URL, so treating it as a request target would be an SSRF sink.
kind
> kind: "file" | "folder"
Defined in: drives/src/provider.ts:62
name
> name: string
Defined in: drives/src/provider.ts:61
parentId?
> optional parentId?: string
Defined in: drives/src/provider.ts:74
Parent folder's externalId; absent at the connection root.
path?
> optional path?: string
Defined in: drives/src/provider.ts:76
Display path when the provider exposes one (/Finance/2026/invoice.pdf).
raw?
> optional raw?: Record<string, unknown>
Defined in: drives/src/provider.ts:107
Anything vendor-specific the app may want. Must be JSON-serialisable.
size?
> optional size?: number
Defined in: drives/src/provider.ts:72
Size in bytes when the provider reports one. A hint: the import enforces its own cap.
updatedAt?
> optional updatedAt?: number
Defined in: drives/src/provider.ts:92
Epoch ms.
version?
> optional version?: string
Defined in: drives/src/provider.ts:82
Opaque content-version marker — a revision id, an etag, a generation number. Together with checksum this is what tells an incremental sync that an item it already imported has actually changed.