Variable APIGatewayEventRequestContextSchemaConst
APIGatewayEventRequestContextSchema: ZodEffects<
ZodObject<
{
accountId: ZodString;
apiId: ZodString;
authorizer: ZodOptional<
ZodNullable<
ZodUnion<
[
ZodObject<
{ integrationLatency: ZodNumber; principalId: ZodString },
"strip",
{ integrationLatency: number; principalId: string },
{ integrationLatency: number; principalId: string },
>,
ZodObject<
{
claims: ZodRecord<ZodAny>;
scopes: ZodOptional<ZodArray<(...)>>;
},
"strip",
{ claims: Record<string, any>; scopes?: (...)[] },
{ claims: Record<string, any>; scopes?: (...)[] },
>,
],
>,
>,
>;
connectedAt: ZodOptional<ZodNullable<ZodNumber>>;
connectionId: ZodOptional<ZodNullable<ZodString>>;
deploymentId: ZodOptional<ZodNullable<ZodString>>;
domainName: ZodOptional<ZodNullable<ZodString>>;
domainPrefix: ZodOptional<ZodNullable<ZodString>>;
eventType: ZodOptional<
ZodNullable<ZodEnum<["CONNECT", "MESSAGE", "DISCONNECT"]>>,
>;
extendedRequestId: ZodOptional<ZodNullable<ZodString>>;
httpMethod: ZodEnum<
["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"],
>;
identity: ZodObject<
{
accessKey: ZodOptional<ZodNullable<ZodString>>;
accountId: ZodOptional<ZodNullable<ZodString>>;
apiKey: ZodOptional<ZodNullable<ZodString>>;
apiKeyId: ZodOptional<ZodNullable<ZodString>>;
caller: ZodOptional<ZodNullable<ZodString>>;
clientCert: ZodOptional<
ZodNullable<
ZodObject<
{
clientCertPem: ZodString;
issuerDN: ZodString;
serialNumber: ZodString;
subjectDN: ZodString;
validity: ZodObject<
{ notAfter: ...; notBefore: ... },
"strip",
{ notAfter: ...; notBefore: ... },
{ notAfter: ...; notBefore: ... },
>;
},
"strip",
{
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
},
{
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
},
>,
>,
>;
cognitoAuthenticationProvider: ZodOptional<ZodNullable<ZodString>>;
cognitoAuthenticationType: ZodOptional<ZodNullable<ZodString>>;
cognitoIdentityId: ZodOptional<ZodNullable<ZodString>>;
cognitoIdentityPoolId: ZodOptional<ZodNullable<ZodString>>;
principalOrgId: ZodOptional<ZodNullable<ZodString>>;
sourceIp: ZodOptional<
ZodUnion<[ZodString, ZodLiteral<"test-invoke-source-ip">]>,
>;
user: ZodOptional<ZodNullable<ZodString>>;
userAgent: ZodOptional<ZodNullable<ZodString>>;
userArn: ZodOptional<ZodNullable<ZodString>>;
},
"strip",
{
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
},
{
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
},
>;
messageDirection: ZodOptional<ZodNullable<ZodString>>;
messageId: ZodOptional<ZodNullable<ZodString>>;
operationName: ZodOptional<ZodNullable<ZodString>>;
path: ZodString;
protocol: ZodString;
requestId: ZodString;
requestTime: ZodString;
requestTimeEpoch: ZodNumber;
resourceId: ZodOptional<ZodNullable<ZodString>>;
resourcePath: ZodString;
routeKey: ZodOptional<ZodNullable<ZodString>>;
stage: ZodString;
},
"strip",
{
accountId: string;
apiId: string;
authorizer?: | null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] };
connectedAt?: null | number;
connectionId?: null | string;
deploymentId?: null | string;
domainName?: null | string;
domainPrefix?: null | string;
eventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT";
extendedRequestId?: null | string;
httpMethod:
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "HEAD"
| "OPTIONS";
identity: {
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
};
messageDirection?: null
| string;
messageId?: null | string;
operationName?: null | string;
path: string;
protocol: string;
requestId: string;
requestTime: string;
requestTimeEpoch: number;
resourceId?: null | string;
resourcePath: string;
routeKey?: null | string;
stage: string;
},
{
accountId: string;
apiId: string;
authorizer?: | null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] };
connectedAt?: null | number;
connectionId?: null | string;
deploymentId?: null | string;
domainName?: null | string;
domainPrefix?: null | string;
eventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT";
extendedRequestId?: null | string;
httpMethod:
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "HEAD"
| "OPTIONS";
identity: {
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
};
messageDirection?: null
| string;
messageId?: null | string;
operationName?: null | string;
path: string;
protocol: string;
requestId: string;
requestTime: string;
requestTimeEpoch: number;
resourceId?: null | string;
resourcePath: string;
routeKey?: null | string;
stage: string;
},
>,
{
accountId: string;
apiId: string;
authorizer?: | null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] };
connectedAt?: null | number;
connectionId?: null | string;
deploymentId?: null | string;
domainName?: null | string;
domainPrefix?: null | string;
eventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT";
extendedRequestId?: null | string;
httpMethod:
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "HEAD"
| "OPTIONS";
identity: {
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
};
messageDirection?: null
| string;
messageId?: null | string;
operationName?: null | string;
path: string;
protocol: string;
requestId: string;
requestTime: string;
requestTimeEpoch: number;
resourceId?: null | string;
resourcePath: string;
routeKey?: null | string;
stage: string;
},
{
accountId: string;
apiId: string;
authorizer?: | null
| { integrationLatency: number; principalId: string }
| { claims: Record<string, any>; scopes?: string[] };
connectedAt?: null | number;
connectionId?: null | string;
deploymentId?: null | string;
domainName?: null | string;
domainPrefix?: null | string;
eventType?: null | "CONNECT" | "MESSAGE" | "DISCONNECT";
extendedRequestId?: null | string;
httpMethod:
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "HEAD"
| "OPTIONS";
identity: {
accessKey?: null
| string;
accountId?: null | string;
apiKey?: null | string;
apiKeyId?: null | string;
caller?: null | string;
clientCert?:
| null
| {
clientCertPem: string;
issuerDN: string;
serialNumber: string;
subjectDN: string;
validity: { notAfter: string; notBefore: string };
};
cognitoAuthenticationProvider?: null
| string;
cognitoAuthenticationType?: null | string;
cognitoIdentityId?: null | string;
cognitoIdentityPoolId?: null | string;
principalOrgId?: null | string;
sourceIp?: string;
user?: null | string;
userAgent?: null | string;
userArn?: null | string;
};
messageDirection?: null
| string;
messageId?: null | string;
operationName?: null | string;
path: string;
protocol: string;
requestId: string;
requestTime: string;
requestTimeEpoch: number;
resourceId?: null | string;
resourcePath: string;
routeKey?: null | string;
stage: string;
},
> = ...
A zod schema for an API Gateway Event Request Context