Skip to content

basalt / drives-google/src / GoogleDriveOptions

Interface: GoogleDriveOptions ​

Defined in: drives-google/src/index.ts:149

Properties ​

ancestryMaxDepth? ​

> optional ancestryMaxDepth?: number

Defined in: drives-google/src/index.ts:193

Ancestry hops a scope check may walk. Default 32.


ancestryMaxLookups? ​

> optional ancestryMaxLookups?: number

Defined in: drives-google/src/index.ts:195

Metadata reads one delta call may spend on ancestry. Default 500.


clientId ​

> clientId: string

Defined in: drives-google/src/index.ts:151

OAuth client id from the Google Cloud console.


clientSecret? ​

> optional clientSecret?: string

Defined in: drives-google/src/index.ts:160

Client secret.

Optional: a public client uses PKCE alone. Unlike Dropbox it is not a webhook signing key — Google does not sign notifications at all, and authenticates them with the X-Goog-Channel-Token the engine generated per subscription.


includeUnscopedRemovals? ​

> optional includeUnscopedRemovals?: boolean

Defined in: drives-google/src/index.ts:191

Report deletions that cannot be scoped to the connection's rootId.

changes.list is account-wide. A hard deletion arrives as {fileId, removed: true} with no file resource, so for a root-scoped connection there is nothing left to test the ancestry of. Default false: such a change is dropped, because forwarding it would put an id from outside the connection's folder into onRemoved, the app's hooks and any ledger lookup they drive. Set it to true to receive them anyway and correlate against your own ledger — see the README.


listMode? ​

> optional listMode?: "recursive" | "children"

Defined in: drives-google/src/index.ts:175

How a listing treats a folder scope.

  • 'recursive' (default) — the connection's rootId, and any explicit folderId, is walked subtree-first, because Drive has no recursive query and a top-level-only backfill would silently miss most of a tenant's documents. Matches the Dropbox adapter's recursive: true.
  • 'children' — one folder's direct children only, the shape a file browser wants. An import that uses it sees exactly one level.

now? ​

> optional now?: () => number

Defined in: drives-google/src/index.ts:197

Injected clock (tests).

Returns ​

number


pageSize? ​

> optional pageSize?: number

Defined in: drives-google/src/index.ts:164

files.list / changes.list page size. Clamped to 1…1000. Default 100.


scopes? ​

> optional scopes?: readonly string[]

Defined in: drives-google/src/index.ts:162

Scopes to request. Default drive.readonly.


uploadMaxBytes? ​

> optional uploadMaxBytes?: number

Defined in: drives-google/src/index.ts:177

Hard ceiling for one upload. Default — and maximum — 5 MB.


watchTtlMs? ​

> optional watchTtlMs?: number

Defined in: drives-google/src/index.ts:179

Channel TTL to request. Clamped to Google's maximum. Default 7 days.

Released under the MIT License.