import { Context } from "aws-lambda"; import { FastifyInstance, LightMyRequestResponse } from "fastify"; type AwsLambdaFastify = typeof awsLambdaFastify declare namespace awsLambdaFastify { export interface LambdaFastifyOptions { binaryMimeTypes?: string[]; callbackWaitsForEmptyEventLoop?: boolean; serializeLambdaArguments?: boolean; decorateRequest?: boolean; decorationPropertyName?: string; enforceBase64?: (response: LightMyRequestResponse) => boolean; retainStage?: boolean; } export interface LambdaResponse { statusCode: number; body: string; headers: Record; isBase64Encoded: boolean; cookies?: string[] } export type PromiseHandler = ( event: TEvent, context: Context ) => Promise; export type CallbackHandler = ( event: TEvent, context: Context, callback: (err?: Error, result?: TResult) => void ) => void; export const awsLambdaFastify: AwsLambdaFastify export { awsLambdaFastify as default } } declare function awsLambdaFastify( app: FastifyInstance, options?: awsLambdaFastify.LambdaFastifyOptions ): awsLambdaFastify.PromiseHandler; declare function awsLambdaFastify( app: FastifyInstance, options?: awsLambdaFastify.LambdaFastifyOptions ): awsLambdaFastify.CallbackHandler; export = awsLambdaFastify