1 | import middy from '@middy/core'
|
2 | import { APIGatewayProxyWebsocketEventV2 } from 'aws-lambda'
|
3 | import { JsonValue } from 'type-fest'
|
4 |
|
5 | interface Options {
|
6 | reviver?: (key: string, value: any) => any
|
7 | }
|
8 |
|
9 | export type Event = Omit<APIGatewayProxyWebsocketEventV2, 'body'> & {
|
10 | body: JsonValue
|
11 | }
|
12 |
|
13 | declare function jsonBodyParser (options?: Options): middy.MiddlewareObj<Event>
|
14 |
|
15 | export default jsonBodyParser
|
16 |
|
\ | No newline at end of file |