@aws-lambda-powertools/batch
Version:
The batch processing package for the Powertools for AWS Lambda (TypeScript) library.
30 lines (29 loc) • 724 B
JavaScript
/**
* Enum of supported event types for the utility
*/
const EventType = {
SQS: 'SQS',
KinesisDataStreams: 'KinesisDataStreams',
DynamoDBStreams: 'DynamoDBStreams',
};
/**
* Enum of supported schema vendors for the utility
*/
const SchemaVendor = {
Zod: 'zod',
};
/**
* Default response for the partial batch processor
*/
const DEFAULT_RESPONSE = {
batchItemFailures: [],
};
/**
* Mapping of event types to their respective data classes
*/
const DATA_CLASS_MAPPING = {
[EventType.SQS]: (record) => record,
[EventType.KinesisDataStreams]: (record) => record,
[EventType.DynamoDBStreams]: (record) => record,
};
export { EventType, SchemaVendor, DEFAULT_RESPONSE, DATA_CLASS_MAPPING };