@middy/http-multipart-body-parser 7.1.3 → 7.1.5

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 (3) hide show
  1. package/README.md +1 -5
  2. package/index.d.ts +11 -5
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -49,8 +49,4 @@ Everyone is very welcome to contribute to this repository. Feel free to [raise i
49
49
 
50
50
  ## License
51
51
 
52
- Licensed under [MIT License](LICENSE). Copyright (c) 2017-2026 [will Farrell](https://github.com/willfarrell), [Luciano Mammino](https://github.com/lmammino), and [Middy contributors](https://github.com/middyjs/middy/graphs/contributors).
53
-
54
- <a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy?ref=badge_large">
55
- <img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy.svg?type=large" alt="FOSSA Status" style="max-width:100%;">
56
- </a>
52
+ Licensed under [MIT License](LICENSE). Copyright (c) 2017-2026 [will Farrell](https://github.com/willfarrell), [Luciano Mammino](https://github.com/lmammino), and [Middy contributors](https://github.com/middyjs/middy/graphs/contributors).
package/index.d.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  // Copyright 2017 - 2026 will Farrell, Luciano Mammino, and Middy contributors.
2
2
  // SPDX-License-Identifier: MIT
3
3
  import type middy from "@middy/core";
4
- import type { APIGatewayEvent } from "aws-lambda";
4
+ import type {
5
+ ALBEvent,
6
+ APIGatewayEvent,
7
+ APIGatewayProxyEventV2,
8
+ } from "aws-lambda";
5
9
  import type { JsonValue } from "type-fest";
6
10
 
7
11
  export interface Options {
@@ -26,12 +30,14 @@ export interface Options {
26
30
  disableContentTypeError?: boolean;
27
31
  }
28
32
 
29
- export type Event = Omit<APIGatewayEvent, "body"> & {
33
+ export type RequestEvent = APIGatewayEvent | APIGatewayProxyEventV2 | ALBEvent;
34
+
35
+ export type Event<T extends RequestEvent = RequestEvent> = Omit<T, "body"> & {
30
36
  body: JsonValue;
31
37
  };
32
38
 
33
- declare function multipartBodyParser(
34
- options?: Options,
35
- ): middy.MiddlewareObj<Event, unknown, Error>;
39
+ declare function multipartBodyParser<
40
+ EventType extends RequestEvent = RequestEvent,
41
+ >(options?: Options): middy.MiddlewareObj<Event<EventType>, unknown, Error>;
36
42
 
37
43
  export default multipartBodyParser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-multipart-body-parser",
3
- "version": "7.1.3",
3
+ "version": "7.1.5",
4
4
  "description": "HTTP multipart body parser middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -66,10 +66,10 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@fastify/busboy": "3.2.0",
69
- "@middy/util": "7.1.3"
69
+ "@middy/util": "7.1.5"
70
70
  },
71
71
  "devDependencies": {
72
- "@middy/core": "7.1.3",
72
+ "@middy/core": "7.1.5",
73
73
  "@types/aws-lambda": "^8.0.0",
74
74
  "@types/node": "^22.0.0",
75
75
  "type-fest": "^5.0.0"