UNPKG

@bitblit/ratchet-epsilon-common

Version:

Tiny adapter to simplify building API gateway Lambda APIS

18 lines (17 loc) 988 B
import { EpsilonRouter } from './route/epsilon-router.js'; import { APIGatewayEvent, Context, ProxyResult } from 'aws-lambda'; import { ExtendedAPIGatewayEvent } from '../config/http/extended-api-gateway-event.js'; import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler.js'; import { RouteAndParse } from './route/route-and-parse.js'; export declare class WebHandler implements EpsilonLambdaEventHandler<APIGatewayEvent> { private routerConfig; static readonly MAXIMUM_LAMBDA_BODY_SIZE_BYTES: number; constructor(routerConfig: EpsilonRouter); get router(): EpsilonRouter; extractLabel(evt: APIGatewayEvent, _context: Context): string; handlesEvent(evt: any): boolean; processEvent(event: APIGatewayEvent, context: Context): Promise<ProxyResult>; openApiLambdaHandler(evt: ExtendedAPIGatewayEvent, context: Context): Promise<ProxyResult>; findBestMatchingRoute(event: APIGatewayEvent): RouteAndParse; private cleanPath; }