UNPKG

@setho/dynamodb-repository

Version:

DynamoDB repository for hash-key and hash-key/range indexed tables. Designed for Lambda use. Handles nice-to-haves like created and updated timestamps and default id creation.

11 lines (10 loc) 264 B
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'; export type ConstructorArgs = { tableName: string; keyName: string; idOptions?: IdOptions; documentClient: DynamoDBDocumentClient; }; export type IdOptions = { prefix?: string; };