UNPKG

@aws-lambda-powertools/batch

Version:

The batch processing package for the Powertools for AWS Lambda (TypeScript) library.

29 lines (28 loc) 834 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DATA_CLASS_MAPPING = exports.DEFAULT_RESPONSE = exports.EventType = void 0; /** * Enum of supported event types for the utility */ const EventType = { SQS: 'SQS', KinesisDataStreams: 'KinesisDataStreams', DynamoDBStreams: 'DynamoDBStreams', }; exports.EventType = EventType; /** * Default response for the partial batch processor */ const DEFAULT_RESPONSE = { batchItemFailures: [], }; exports.DEFAULT_RESPONSE = DEFAULT_RESPONSE; /** * 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, }; exports.DATA_CLASS_MAPPING = DATA_CLASS_MAPPING;