Skip to content

DynamoEntityConfig

type DynamoEntityConfig<Schema> = object;

Configuration type for creating a DynamoEntity.

Schema extends ZodObject

The Zod schema representing the entity’s structure.

optional globalSecondaryIndexes: GlobalSecondaryIndexKeyBuilders<EntitySchema<Schema>>;

Mapping of global secondary index names to their key builders.


optional localSecondaryIndexes: LocalSecondaryIndexKeyBuilders<EntitySchema<Schema>>;

Mapping of local secondary index names to their key builders.


optional partitionKey: DynamoKeyBuilder<EntitySchema<Schema>>;

Key builder function to build the partition key from an entity item.


schema: Schema;

The Zod schema defining the entity’s structure.


optional sortKey: DynamoKeyBuilder<EntitySchema<Schema>>;

Key builder function to build the sort key from an entity item.


table: DynamoTable;

The DynamoTable instance associated with the entity.