export * from './events'; export * from './registry'; export interface IStringDict { [key: string]: string; } export interface IRequestEvent { /** * @format uuid */ id: string; error: Error | undefined; } export declare type IHttpMethod = ('GET' | 'PUT' | 'POST' | 'DELETE' | 'PATCH' | 'HEAD'); export declare type IHttpBody = string | {}; export interface IHttpRequest { headers: IStringDict; query: IStringDict; params: IStringDict; method: IHttpMethod; path: string; body: IHttpBody; } export interface IHttpRequestResponse { statusCode: number; headers?: IStringDict; body?: IHttpBody; } export interface IHttpRequestEvent extends IRequestEvent { request: IHttpRequest; response: IHttpRequestResponse; } export interface IInputLambdaHttpEvent { headers: IStringDict; pathParameters: IStringDict; httpMethod: IHttpMethod; queryStringParameters: IStringDict; requestContext: { [key: string]: any; }; body: string; path: string; } export interface IInputLambdaHttpContext { [key: string]: any; } export declare type ILambdaCompleter = (error: E | null | undefined, response?: R) => void; export interface ILambdaHandlerGenerics { event: {}; context?: {}; response: {}; error?: {}; } export declare type ILambdaHandler = (event: G['event'], context: G['context'], done: ILambdaCompleter) => Promise; export declare type ILambdaHttpHandler = ILambdaHandler<{ event: IInputLambdaHttpEvent; context: IInputLambdaHttpContext; response: IHttpRequestResponse; }>;