+
+
+
+
+
+
+
+
+ Enum of event types.
+
+ EventType
+
+
+ Type:
+ Symbol
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Read a JSON file.
+Takes a variable number of arguments with will be joined
+using path.join to a single file path.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
path (string)
+ The path.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Promise<Object>
:
+ The parsed event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a handler factory for EventBridge events.
+Handles EventBridge rule events and redriven events from SQS.
+See the README for an explanation of how to use the returned handler factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
options (Object)
+ Overrides passed to createHandler.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The handler factory.
+
+
+
+
+
+
+ Related
+
+
+ createHandler
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a basic event handler factory.
+See the README for an explanation of how to use the returned handler factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+ Description |
+
+
+
+
+
+ parameters.parser string
+
+ (default identityParser )
+ |
+ Event parser.
+ |
+
+
+
+
+
+ parameters.serializer string
+
+ (default identitySerializer )
+ |
+ Payload serializer.
+ |
+
+
+
+
+
+ parameters.createProcessor string
+
+ (default createNullProcessor )
+ |
+ Processor factory.
+ |
+
+
+
+
+
+ parameters.createWrapper string
+
+ (default createInvokeWrapper )
+ |
+ Wrapper factory.
+ |
+
+
+
+
+
+ parameters.createStrategy string
+
+ (default createEventStrategy )
+ |
+ Strategy factory.
+ |
+
+
+
+
+
+ parameters.registerDependencies string
+
+ (default registerEmptyDependencies )
+ |
+ Called to register dependencies.
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The handler factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a handler factory for invocation events.
+See the README for an explanation of how to use the returned handler factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
options (Object)
+ Overrides passed to createHandler.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The handler factory.
+
+
+
+
+
+
+ Related
+
+
+ createHandler
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a handler factory for SQS events.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
options (Object)
+ Overrides passed to createHandler.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The handler factory.
+
+
+
+
+
+
+ Related
+
+
+ createHandler
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a handler factory for SQS events with JSON body.
+See the README for an explanation of how to use the returned handler factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
options (Object)
+ Overrides passed to createHandler.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The handler factory.
+
+
+
+
+
+
+ Related
+
+
+ createHandler
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Security HTTP headers.
+
+ securityHeaders
+
+
+ Type:
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ API Gateway Proxy event parser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The event.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The parsed event.
+Includes searchParams as an instance of URLSearchParams.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ API Gateway Proxy JSON event parser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The event.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The parsed event with the body parsed as JSON.
+Includes searchParams as an instance of URLSearchParams.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parser for EventBridge events.
+Parses EventBridge rule events and redriven events from SQS.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The event.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Array<Object>
:
+ The parsed events.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Identity function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The event.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The parsed event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Records parser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The event.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Array<Object>
:
+ The records from the parsed event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SQS event parser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The event.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Array<Object>
:
+ The messages from the parsed event.
+Both attributes and messageAttributes are parsed into plain objects
+with proper types.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SQS JSON event parser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The event.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Array<Object>
:
+ The messages from the parsed event with the body parsed as JSON.
+Both attributes and messageAttributes are parsed into plain objects
+with proper types.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ API Gateway Proxy event serializer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The data.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The serialized data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ API Gateway Proxy JSON event serializer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
event (Object)
+ The data.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The serialized data with the body serialized to JSON.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Identity function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
data (Object)
+ The data.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Object
:
+ The serialized data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create an event strategy.
+Resolves and calls the processor for the event.
+Resolves and calls onError on an event error.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
container (Object)
+ The Awilix container.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Array<Object>
:
+ The strategy.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create an HTTP strategy.
+Resolves and calls the processor for the event.
+Swallows all errors, wraps them as a Boom object,
+resolves and calls onError on the wrapped error,
+and returns a matching status code response.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
container (Object)
+ The Awilix container.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ Array<Object>
:
+ The strategy.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a parallel strategy for an array of events.
+Resolves and calls the processor for each event element.
+Resolves and calls onError on each element error.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
container (Object)
+ The Awilix container.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ function
:
+ The strategy.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create an invoke wrapper.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
parentLog (Object)
+ The parent logger.
+
+
+
+
+
+
+
+
strategy (function)
+ The strategy.
+
+
+
+
+
+
+
+
+
+
serializer (function)
+ The serializer.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ function
:
+ The wrapper.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create a record wrapper.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters
+
+
+
+
+
parentLog (Object)
+ The parent logger.
+
+
+
+
+
+
+
+
strategy (function)
+ The strategy.
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns
+ function
:
+ The wrapper.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+