@@ -38,7 +38,7 @@ import {
38
38
*
39
39
* @see {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-access-control.html }
40
40
*/
41
- const APIGatewayV2RequestAuthorizer = z . object ( {
41
+ const APIGatewayRequestAuthorizerV2Schema = z . object ( {
42
42
jwt : z
43
43
. object ( {
44
44
claims : z . record ( z . string ( ) , z . any ( ) ) ,
@@ -91,10 +91,10 @@ const APIGatewayV2RequestAuthorizer = z.object({
91
91
* }
92
92
* ```
93
93
*/
94
- const APIGatewayV2RequestContext = z . object ( {
94
+ const APIGatewayRequestContextV2Schema = z . object ( {
95
95
accountId : z . string ( ) ,
96
96
apiId : z . string ( ) ,
97
- authorizer : APIGatewayV2RequestAuthorizer . optional ( ) ,
97
+ authorizer : APIGatewayRequestAuthorizerV2Schema . optional ( ) ,
98
98
authentication : z
99
99
. object ( {
100
100
clientCert : APIGatewayCert . optional ( ) ,
@@ -171,7 +171,7 @@ const APIGatewayProxyEventV2Schema = z.object({
171
171
cookies : APIGatewayStringArray . optional ( ) ,
172
172
headers : APIGatewayRecord ,
173
173
queryStringParameters : APIGatewayRecord . optional ( ) ,
174
- requestContext : APIGatewayV2RequestContext ,
174
+ requestContext : APIGatewayRequestContextV2Schema ,
175
175
body : z . string ( ) . optional ( ) ,
176
176
pathParameters : APIGatewayRecord . nullish ( ) ,
177
177
isBase64Encoded : z . boolean ( ) ,
@@ -237,12 +237,14 @@ const APIGatewayRequestAuthorizerEventV2Schema = z.object({
237
237
cookies : APIGatewayStringArray . optional ( ) ,
238
238
headers : APIGatewayRecord . optional ( ) ,
239
239
queryStringParameters : APIGatewayRecord . optional ( ) ,
240
- requestContext : APIGatewayV2RequestContext ,
240
+ requestContext : APIGatewayRequestContextV2Schema ,
241
241
pathParameters : APIGatewayRecord . nullish ( ) ,
242
242
stageVariables : APIGatewayRecord . nullish ( ) ,
243
243
} ) ;
244
244
245
245
export {
246
246
APIGatewayProxyEventV2Schema ,
247
247
APIGatewayRequestAuthorizerEventV2Schema ,
248
+ APIGatewayRequestAuthorizerV2Schema ,
249
+ APIGatewayRequestContextV2Schema ,
248
250
} ;
0 commit comments