import { APIGatewayProxyStructuredResultV2, APIGatewayProxyEventV2, Context, EventBridgeEvent, SQSEvent } from 'aws-lambda';

type LambdaResponseOrError<T = any> = Omit<APIGatewayProxyStructuredResultV2, 'body'> & {
    body?: T | string | {
        error: {
            message: string;
        } & Record<string, any>;
    };
};
declare function lambdaApiHandler<T = any>(event: APIGatewayProxyEventV2, context: Context, handler: (event: APIGatewayProxyEventV2, context: Context) => Promise<LambdaResponseOrError<T>>): Promise<APIGatewayProxyStructuredResultV2>;
declare function eventBridgeHandler(event: EventBridgeEvent<any, any>, context: Context, handler: (event: EventBridgeEvent<any, any>, context: Context) => Promise<void>): Promise<void>;
declare function sqsHandler(event: SQSEvent, context: Context, handler: (event: SQSEvent, context: Context) => Promise<PromiseSettledResult<void>[]>): Promise<PromiseSettledResult<void>[]>;

export { type LambdaResponseOrError, eventBridgeHandler, lambdaApiHandler, sqsHandler };
