UNPKG

serverless-aws-lambda

Version:

AWS Application Load Balancer and API Gateway - Lambda dev tool for Serverless. Allows Express synthax in handlers. Supports packaging, local invoking and offline ALB, APG, S3, SNS, SQS, DynamoDB Stream server mocking.

27 lines (26 loc) 973 B
import type { ILambdaMock, LambdaEndpoint } from "../runtime/rapidApi"; import type { normalizedSearchParams } from "../../plugins/lambda/events/common"; export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "ANY"; export declare class Handlers { #private; static handlers: ILambdaMock[]; static PORT: number; static ip: string; debug: boolean; constructor(config: any); static parseNameFromUrl(lambdaName: string): string; static getHandlerByName(lambdaName?: string | null): ILambdaMock | undefined; static findHandler: ({ method, path, kind, headers, query, }: { method: HttpMethod; path: string; headers: { [key: string]: string[]; }; kind?: string | null; query: normalizedSearchParams; }) => { event: LambdaEndpoint; handler: ILambdaMock; } | undefined; addHandler(lambdaController: ILambdaMock): void; }