@middy/http-json-body-parser 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +11 -1
  2. package/package.json +6 -4
package/index.d.ts CHANGED
@@ -1,9 +1,19 @@
1
1
  import middy from '@middy/core'
2
+ import { APIGatewayEvent } from 'aws-lambda'
3
+ import { JsonValue } from 'type-fest'
2
4
 
3
5
  interface Options {
4
6
  reviver?: (key: string, value: any) => any
5
7
  }
6
8
 
7
- declare function jsonBodyParser (options?: Options): middy.MiddlewareObj
9
+ export type Event = Omit<APIGatewayEvent, 'body'> & {
10
+ /**
11
+ * The body of the HTTP request.
12
+ */
13
+ body: JsonValue
14
+ rawBody: string
15
+ }
16
+
17
+ declare function jsonBodyParser (options?: Options): middy.MiddlewareObj<Event>
8
18
 
9
19
  export default jsonBodyParser
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-json-body-parser",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "Http JSON body parser middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -64,10 +64,12 @@
64
64
  },
65
65
  "homepage": "https://middy.js.org",
66
66
  "dependencies": {
67
- "@middy/util": "3.1.1"
67
+ "@middy/util": "3.2.0"
68
68
  },
69
69
  "devDependencies": {
70
- "@middy/core": "3.1.1"
70
+ "@middy/core": "3.2.0",
71
+ "@types/aws-lambda": "^8.10.101",
72
+ "type-fest": "^2.18.0"
71
73
  },
72
- "gitHead": "d53fc91d035b01d3fd296cb6c7d0acd8305e9f76"
74
+ "gitHead": "ac46270daa388b52a81472ae8f9b8808a0136940"
73
75
  }