@swarmion/serverless-contracts
Version:
Generate and use type-safe contracts between your Serverless services.
4 lines • 586 B
TypeScript
import { APIGatewayEventRequestContextJWTAuthorizer, APIGatewayEventRequestContextLambdaAuthorizer, APIGatewayProxyCognitoAuthorizer } from 'aws-lambda';
import { ApiGatewayAuthorizerType } from './constants';
export type AuthorizerContext<AuthorizerType extends ApiGatewayAuthorizerType> = AuthorizerType extends 'cognito' ? APIGatewayProxyCognitoAuthorizer : AuthorizerType extends 'jwt' ? APIGatewayEventRequestContextJWTAuthorizer : AuthorizerType extends 'lambda' ? APIGatewayEventRequestContextLambdaAuthorizer<unknown> : undefined;
//# sourceMappingURL=authorizerContext.d.ts.map