Skip to content

basalt / drives/src / DriveImportRecord

Interface: DriveImportRecord ​

Defined in: drives/src/store.ts:157

One line in the dedup ledger: "this external file, at this version, has already been imported for this tenant and connection".

Keyed by (tenantId, connectionId, externalId) — connection-scoped, not tenant-scoped, because the same Google file id can legitimately be reachable through two connections and each import lands in its own place.

Properties ​

connectionId ​

> connectionId: string

Defined in: drives/src/store.ts:159


externalId ​

> externalId: string

Defined in: drives/src/store.ts:160


importedAt ​

> importedAt: number

Defined in: drives/src/store.ts:173


strategy ​

> strategy: DriveImportStrategy

Defined in: drives/src/store.ts:172

Which strategy produced it. A reference row has no bytes anywhere.


targetId ​

> targetId: string

Defined in: drives/src/store.ts:170

What the sink returned — a @basaltkit/files record id, or an app row id.


tenantId ​

> tenantId: string

Defined in: drives/src/store.ts:158


version ​

> version: string

Defined in: drives/src/store.ts:168

The identity of the content that was imported: the provider's version, or its checksum, or a digest of both. Re-importing is decided by comparing this, not by timestamps — updatedAt moves when a file is renamed or re-shared, and re-downloading a gigabyte because someone renamed it is a bill, not a feature.

Released under the MIT License.