Pular para o conteúdo
Português (BR)

D1Connection

Este conteúdo não está disponível em sua língua ainda.

D1Connection = object

Defined in: src/persistence/journals/D1Client.ts:47

Connection options shared by all three D1 stores.

readonly optional accountId?: string

Defined in: src/persistence/journals/D1Client.ts:49

Cloudflare account id. Required unless client is supplied.


readonly optional apiToken?: string

Defined in: src/persistence/journals/D1Client.ts:57

API token with the D1:Edit permission. Sent as a bearer token, so treat it like any other secret — read it from the environment rather than committing it.


readonly optional baseUrl?: string

Defined in: src/persistence/journals/D1Client.ts:59

API base URL. Override only for a proxy or a test double.


readonly optional client?: D1ClientLike

Defined in: src/persistence/journals/D1Client.ts:67

Pre-built transport — bypasses the HTTP client entirely. Use to share ONE transport across the journal, snapshot and durable-state stores (see registerD1Plugins), or to inject a fake in tests.


readonly optional databaseId?: string

Defined in: src/persistence/journals/D1Client.ts:51

D1 database id (the UUID, not the database name).


readonly optional timeoutMs?: number

Defined in: src/persistence/journals/D1Client.ts:61

Per-request timeout in milliseconds. Default 30 000.