UNPKG

@faceteer/cdk

Version:

CDK 2.0 constructs and helpers that make composing a Lambda powered service easier.

36 lines (35 loc) 1.54 kB
import { CfnApi, CfnApiProps, CfnAuthorizer, CfnAuthorizerProps, CfnStage, CfnStageProps } from 'aws-cdk-lib/aws-apigatewayv2'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { Construct } from 'constructs'; export declare class ApiGateway extends CfnApi { constructor(scope: Construct, id: string, props: CfnApiProps); } export declare class ApiStage extends CfnStage { constructor(scope: Construct, id: string, props: Omit<CfnStageProps, 'apiId' | 'stageName'> & { api: CfnApi; }); } export type LambdaAuthorizerConfig = { fn: lambda.IFunction; identitySource: string[]; enableSimpleResponses?: boolean; }; export type JwtAuthorizerConfig = { identitySource: string[]; audience: string[]; issuer: string; }; export declare function isLambdaAuthorizerConfig(config: LambdaAuthorizerConfig | JwtAuthorizerConfig | undefined): config is LambdaAuthorizerConfig; export declare function isJwtAuthorizerConfig(config: LambdaAuthorizerConfig | JwtAuthorizerConfig | undefined): config is JwtAuthorizerConfig; export declare class LambdaAuthorizer extends CfnAuthorizer { constructor(scope: Construct, id: string, props: Omit<CfnAuthorizerProps, 'apiId' | 'authorizerType'> & { api: CfnApi; config: LambdaAuthorizerConfig; }); } export declare class JwtAuthorizer extends CfnAuthorizer { constructor(scope: Construct, id: string, props: Omit<CfnAuthorizerProps, 'apiId' | 'authorizerType'> & { api: CfnApi; config: JwtAuthorizerConfig; }); }