@mcma/aws-dynamodb
Version:
Node module with code for using DynamoDB as the backing data storage for MCMA API handlers and workers.
17 lines (16 loc) • 587 B
TypeScript
import { CustomQuery } from "@mcma/data";
import { QueryInput } from "@aws-sdk/client-dynamodb";
type AttributeValueRetriever = (partitionKey: any, sortKey: any, resource: any) => any;
export type CustomQueryFactory = (customQuery: CustomQuery) => QueryInput;
export type CustomQueryRegistry = {
[key: string]: CustomQueryFactory;
};
export interface DynamoDbTableOptions {
consistentGet?: boolean;
consistentQuery?: boolean;
topLevelAttributeMappings?: {
[key: string]: AttributeValueRetriever;
};
customQueryRegistry?: CustomQueryRegistry;
}
export {};