UNPKG

851 BTypeScriptView Raw
1import { APIGatewayProxyResult } from "aws-lambda";
2export interface APIGatewayResponse extends Omit<APIGatewayProxyResult, "body"> {
3 body: unknown | undefined;
4}
5export declare function badRequest(details: string | undefined): APIGatewayResponse;
6export declare function forbidden(details: string | undefined): APIGatewayResponse;
7export declare function unauthorized(details: string | undefined): APIGatewayResponse;
8export declare function internalServerError(): APIGatewayResponse;
9export declare function notFound(details: string | undefined): APIGatewayResponse;
10export declare function requestTimeout(details: string | undefined): APIGatewayResponse;
11export declare function ok<T>(result: T): APIGatewayResponse;
12export declare function created<T>(result: T): APIGatewayResponse;
13export declare function noContent<T>(): APIGatewayResponse;