Interface: WebSocketHandlerConfig<T>
lambda.WebSocketHandlerConfig
Configuration for a WebSocket API Gateway Lambda handler.
Type parameters
Name |
---|
T |
Properties
coerceTypes
• Optional
coerceTypes: boolean
If schema validation should attempt to coerce the parsed types of the request. Defaults to
false
.
handler
• handler: (message
: T
, event
: APIGatewayProxyEvent
, context
: Context
) => Promise
<void
| APIGatewayProxyResult
>
Callback for the Lambda logic.
Type declaration
▸ (message
, event
, context
): Promise
<void
| APIGatewayProxyResult
>
Parameters
Name | Type |
---|---|
message |
T |
event |
APIGatewayProxyEvent |
context |
Context |
Returns
Promise
<void
| APIGatewayProxyResult
>
schema
• Optional
schema: any
Optional schema to enable automatic schema validation: failed schema validation will result
in a status: 'error'
response with the schema validation error in the message
field.