Skip to content

basalt / drives/src / SyncOptions

Interface: SyncOptions ​

Defined in: drives/src/sync.ts:67

Properties ​

enqueue ​

> enqueue: DriveEnqueue

Defined in: drives/src/sync.ts:71

Where to send discovered items. Required in production; see DriveEnqueue.


filter? ​

> optional filter?: (item) => boolean

Defined in: drives/src/sync.ts:82

Runs before enqueueing. Folders are always skipped.

Parameters ​

item ​

DriveItem

Returns ​

boolean


maxItems? ​

> optional maxItems?: number

Defined in: drives/src/sync.ts:91

Most items enqueued in one run. Default 1000.

A hard bound, not a hint: the first sync of a mature Google Drive can be hundreds of thousands of items, and a loop with no ceiling is how one tenant's connect request becomes an outage. The cursor is persisted as the run goes, so the next run picks up exactly where this one stopped.


maxPages? ​

> optional maxPages?: number

Defined in: drives/src/sync.ts:93

Pages read in one run. Default 50.


onRemoved? ​

> optional onRemoved?: (removal) => void | Promise<void>

Defined in: drives/src/sync.ts:80

Called for items the provider reports as deleted.

The framework does not delete anything on its own: whether a removal at the provider should delete the app's copy is a retention decision, and retention is a legal question the framework has no business answering. It reports, the app decides.

Parameters ​

removal ​

DriveRemoval

Returns ​

void | Promise<void>


signal? ​

> optional signal?: AbortSignal

Defined in: drives/src/sync.ts:94


strategy? ​

> optional strategy?: DriveImportStrategy

Defined in: drives/src/sync.ts:69


tenantId? ​

> optional tenantId?: string

Defined in: drives/src/sync.ts:68

Released under the MIT License.