Auth Storage Adapter
Interfaces
Interfaces
Adapter
QueryByFieldOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
domainId | string | Yes | |
collectionName | string | Yes | |
version | number | Yes | |
field | string | Yes | |
value | any | Yes |
QueryByConditionsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
domainId | string | Yes | |
collectionName | string | Yes | |
version | number | Yes | |
conditions | Record<string, any> | Yes |
DeleteByFieldOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
domainId | string | Yes | |
collectionName | string | Yes | |
version | number | Yes | |
field | string | Yes | |
value | any | Yes |
FindAndDeleteOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
domainId | string | Yes | |
collectionName | string | Yes | |
version | number | Yes | |
conditions | Record<string, any> | Yes |
RemoteStorageConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
accountId | string | undefined | No | |
accessKeyId | string | undefined | No | |
secretAccessKey | string | undefined | No | |
bucketName | string | undefined | No | |
r2Binding | any | No |
SyncDoc
Type definitions for
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
createdAt | string | Yes | |
updatedAt | string | Yes |
UserDoc
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
email | string | Yes | |
emailVerified | string | null | Yes | |
name | string | null | undefined | No | |
image | string | null | undefined | No |
AccountDoc
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
provider | string | Yes | |
providerAccountId | string | Yes | |
type | "email" | "oauth" | "oidc" | "webauthn" | Yes | |
userId | string | Yes | |
access_token | string | undefined | No | |
expires_at | number | undefined | No | |
id_token | string | undefined | No | |
refresh_token | string | undefined | No | |
scope | string | undefined | No | |
session_state | string | undefined | No | |
token_type | string | undefined | No |
SessionDoc
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sessionToken | string | Yes | |
userId | string | Yes | |
expires | string | Yes |
VerificationTokenDoc
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
token | string | Yes | |
identifier | string | Yes | |
expires | string | Yes |
AuthenticatorDoc
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
credentialID | string | Yes | |
userId | string | Yes | |
providerAccountId | string | Yes | |
credentialPublicKey | string | Yes | |
counter | number | Yes | |
credentialDeviceType | string | Yes | |
credentialBackedUp | boolean | Yes | |
transports | string | null | undefined | No |
R2Bucket
R2ObjectBody
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
key | string | Yes | |
body | ReadableStream<any> | Yes | |
bodyUsed | boolean | Yes |
R2Object
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
key | string | Yes | |
size | number | Yes | |
etag | string | Yes | |
httpMetadata | { contentType?: string; } | undefined | No | |
customMetadata | Record<string, string> | undefined | No |
R2GetOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
range | { offset?: number; length?: number; } | undefined | No | |
onlyIf | R2Conditional | Headers | undefined | No |
R2PutOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
httpMetadata | { contentType?: string; } | undefined | No | |
customMetadata | Record<string, string> | undefined | No |
R2Conditional
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
etagMatches | string | undefined | No | |
etagDoesNotMatch | string | undefined | No | |
uploadedBefore | Date | undefined | No | |
uploadedAfter | Date | undefined | No |
R2ListOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
prefix | string | undefined | No | |
delimiter | string | undefined | No | |
cursor | string | undefined | No | |
include | ("httpMetadata" | "customMetadata")[] | undefined | No | |
limit | number | undefined | No |
R2Objects
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
objects | { key: string; size: number; etag: string; httpMetadata?: { contentType?: string; }; customMetadata?: Record<string, string>; }[] | Yes | |
truncated | boolean | Yes | |
cursor | string | undefined | No | |
delimitedPrefixes | string[] | Yes |
AuthStorageAdapterConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
domainId | string | Yes | |
version | number | undefined | No | |
storageConfig | { remote?: { accountId?: string; accessKeyId?: string; secretAccessKey?: string; bucketName?: string; r2Binding?: R2Bucket; }; } | undefined | No |