[aws-lambda] Split APIGatewayEventIdentity type (#42448)

This commit is contained in:
wengkhing
2020-02-19 11:00:55 -08:00
committed by GitHub
parent 6c59e79d0c
commit ecd6fb8f3c
+18 -16
View File
@@ -10,22 +10,7 @@ export interface APIGatewayEventRequestContext {
eventType?: string;
extendedRequestId?: string;
httpMethod: string;
identity: {
accessKey: string | null;
accountId: string | null;
apiKey: string | null;
apiKeyId: string | null;
caller: string | null;
cognitoAuthenticationProvider: string | null;
cognitoAuthenticationType: string | null;
cognitoIdentityId: string | null;
cognitoIdentityPoolId: string | null;
principalOrgId: string | null;
sourceIp: string;
user: string | null;
userAgent: string | null;
userArn: string | null;
};
identity: APIGatewayEventIdentity;
messageDirection?: string;
messageId?: string | null;
path: string;
@@ -38,6 +23,23 @@ export interface APIGatewayEventRequestContext {
routeKey?: string;
}
export interface APIGatewayEventIdentity {
accessKey: string | null;
accountId: string | null;
apiKey: string | null;
apiKeyId: string | null;
caller: string | null;
cognitoAuthenticationProvider: string | null;
cognitoAuthenticationType: string | null;
cognitoIdentityId: string | null;
cognitoIdentityPoolId: string | null;
principalOrgId: string | null;
sourceIp: string;
user: string | null;
userAgent: string | null;
userArn: string | null;
}
/**
* http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output
*/