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