type alias DynamoAdapterOptions
Since 0.1.0

Options for the DynamoAdapter — the 'dynamodb' arm.

A union of two arms, so supplying neither region nor client is a compile error rather than a connect() throw — the guarantee every other built-in arm gives ('prisma' requires prismaClient, 'mongodb' requires url or client, 'custom' requires adapter). region is the lazy arm's required member because the AWS SDK cannot resolve a region from nothing, while endpoint stays optional: it names an emulator such as DynamoDB Local and is absent in production, where the region's own endpoint applies. Both members stay readable on either arm, so the adapter reads options.region and options.client without narrowing first.

Examples

Example 1

const lazy: DynamoAdapterOptions = { region: 'us-east-1' };
const injected: DynamoAdapterOptions = { client: myDynamoClient };

Definition

(
DynamoAdapterOptionsBase
& { readonly region: string; readonly endpoint?: string; readonly credentials?: unknown; readonly client?: IDynamoClient; }
)

| (
DynamoAdapterOptionsBase
& { readonly client: IDynamoClient; readonly region?: string; readonly endpoint?: string; readonly credentials?: unknown; }
)

Usage

import { type DynamoAdapterOptions } from "database-plugin/src/index.ts";