@aws-lambda-powertools/batch
Version:
The batch processing package for the Powertools for AWS Lambda (TypeScript) library.
30 lines • 1.42 kB
TypeScript
import '@aws/lambda-invoke-store';
import type { BaseRecord, BatchProcessingOptions, EventSourceDataClassTypes, PartialItemFailureResponse } from './types.js';
/**
* Manages storage of batch processing state with automatic context detection.
*
* This class abstracts the storage mechanism for batch processing state,
* automatically choosing between InvokeStore (when in Lambda context) and
* fallback instance variables (when outside Lambda context). The decision is
* made at runtime on every method call to support Lambda's concurrent execution
* isolation.
*/
declare class BatchProcessingStore {
#private;
getRecords(): BaseRecord[];
setRecords(records: BaseRecord[]): void;
getHandler(): CallableFunction;
setHandler(handler: CallableFunction): void;
getOptions(): BatchProcessingOptions | undefined;
setOptions(options: BatchProcessingOptions | undefined): void;
getFailureMessages(): EventSourceDataClassTypes[];
setFailureMessages(messages: EventSourceDataClassTypes[]): void;
getSuccessMessages(): EventSourceDataClassTypes[];
setSuccessMessages(messages: EventSourceDataClassTypes[]): void;
getBatchResponse(): PartialItemFailureResponse;
setBatchResponse(response: PartialItemFailureResponse): void;
getErrors(): Error[];
setErrors(errors: Error[]): void;
}
export { BatchProcessingStore };
//# sourceMappingURL=BatchProcessingStore.d.ts.map