import { SQSContract } from '../sqsContract'; import { GetSQSHandlerOptions, SQSHandler, SqsMessageAttributesType, SqsMessageBodyType, SwarmionLambdaSQSHandler, SwarmionSQSHandler } from '../types'; /** * Returns the Swarmion handler for SQS. * The wrapper parses the body and attributes of the SQS messages * By default, * It calls the handle with only one record of the batch. * The record is parsed and typed. * It can throw an error if the record is invalid. * The wrapper will catch it and inform the SQS that the record couldn't be processed * following the batch failure reporting spec. * https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting * * If handleBatchedRecords option is set to false, * It calls the handler with all the records parsed and typed. * The handler must process all the records and handle errors if necessary. * * The handler function can define additional arguments */ export declare const getSQSHandler: , MessageAttributes = SqsMessageAttributesType, HandleRecords extends boolean = true>(contract: Contract, options: GetSQSHandlerOptions) => (handler: HandleRecords extends false ? SwarmionLambdaSQSHandler : SwarmionSQSHandler) => SQSHandler; //# sourceMappingURL=lambdaHandler.d.ts.map