@swarmion/serverless-contracts
Version:
Generate and use type-safe contracts between your Serverless services.
9 lines • 1.01 kB
TypeScript
import { ApiGatewayEvent, ApiGatewayResult, HandlerEventType } from '../types';
import { ApiGatewayAuthorizerType, ApiGatewayIntegrationType } from '../types/constants';
export declare const proxyEventToHandlerEvent: <IntegrationType extends ApiGatewayIntegrationType, AuthorizerType extends ApiGatewayAuthorizerType, PathParameters, QueryStringParameters, Headers, CustomRequestContext, Body>({ requestContext, body: proxyEventBody, headers, pathParameters, queryStringParameters, }: ApiGatewayEvent<IntegrationType, AuthorizerType>) => HandlerEventType<IntegrationType, AuthorizerType, PathParameters, QueryStringParameters, Headers, CustomRequestContext, Body>;
export declare const handlerResponseToProxyResult: <IntegrationType extends ApiGatewayIntegrationType, Output>({ statusCode, headers, body, }: {
statusCode: string | number | symbol;
headers?: Record<string, string>;
body: unknown;
}) => ApiGatewayResult<IntegrationType, Output>;
//# sourceMappingURL=apiGatewayProxyTransformers.d.ts.map