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.
30 lines (29 loc) • 1.61 kB
TypeScript
import type { IncomingMessage, ServerResponse } from "http";
import type { LambdaEndpoint } from "../../lib/parseEvents/endpoints";
import { BufferedStreamResponse } from "../../lib/runtime/bufferedStreamResponse";
export declare enum InvokationType {
DryRun = 204,
Event = 202,
RequestResponse = 200
}
export declare enum errorType {
invalidRequest = "InvalidRequestContentException",
notFound = "ResourceNotFoundException"
}
export declare const parseClientContext: (contextAsBase64?: string) => any;
export declare const unsupportedMethod: (res: ServerResponse, method: string) => true | undefined;
export declare const collectBody: (req: IncomingMessage, isBase64?: boolean) => Promise<string | undefined>;
export declare const parseBody: (collecteBody: any) => any;
export declare const isStreamResponse: (result: any) => result is BufferedStreamResponse;
export declare const chunkToJs: (chunk: Uint8Array) => any;
export declare const setRequestId: (res: ServerResponse) => `${string}-${string}-${string}-${string}-${string}`;
export declare const invalidPayloadErrorMsg: (msg: string) => string;
export declare const base64ErorMsg: string;
export declare const notFound: (lambdaName: string) => string;
export declare const internalServerError: (res: ServerResponse) => void;
export declare const isDelimiter: (chunk: Buffer) => boolean;
export declare const getMultiValueHeaders: (rawHeaders: string[]) => any;
export declare const checkHeaders: (headers: {
[key: string]: any;
}, kind: LambdaEndpoint["kind"]) => void;
export declare const capitalize: (word: string) => string;