@openstax/ts-utils 1.40.0 → 1.40.2

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.
@@ -29,11 +29,16 @@ const lambdaBatchRequestHandler = (config) => {
29
29
  const parsed = BatchRequestSchema.parse(payload);
30
30
  // Create modified requests for each batch item
31
31
  return parsed.requests.map(item => {
32
- var _a;
33
- return ({
32
+ const queryString = item.queryParams
33
+ ? new URLSearchParams(item.queryParams).toString()
34
+ : '';
35
+ return {
34
36
  id: item.id,
35
37
  request: {
36
38
  ...request,
39
+ rawPath: item.path,
40
+ rawQueryString: queryString,
41
+ queryStringParameters: item.queryParams,
37
42
  requestContext: {
38
43
  ...request.requestContext,
39
44
  http: {
@@ -43,12 +48,9 @@ const lambdaBatchRequestHandler = (config) => {
43
48
  }
44
49
  },
45
50
  headers: { ...request.headers, ...item.headers },
46
- body: (_a = item.body) !== null && _a !== void 0 ? _a : request.body,
47
- rawQueryString: item.queryParams
48
- ? new URLSearchParams(item.queryParams).toString()
49
- : request.rawQueryString,
51
+ body: item.body,
50
52
  }
51
- });
53
+ };
52
54
  });
53
55
  },
54
56
  composeBatchResponse: async (items) => {