common-types
Advanced tools
Comparing version 1.6.28 to 1.6.29
@@ -28,2 +28,17 @@ import { IDictionary, booleanAsString } from "./basics"; | ||
/** | ||
* Provides a logical test to see if the passed in event is a LambdaProxy request or just a | ||
* straight JS object response. This is useful when you have both an HTTP event and a Lambda-to-Lambda | ||
* or Step-Function-to-Lambda interaction. | ||
* | ||
* @param message the body of the request (which is either of type T or a LambdaProxy event) | ||
*/ | ||
export declare function isLambdaProxyRequest<T>(message: T | IAWSLambdaProxyIntegrationRequest): message is IAWSLambdaProxyIntegrationRequest; | ||
/** | ||
* Returns the message body regardless of whether Lambda was called by API Gateway's LambdaProxy | ||
* or from another Lambda function. | ||
* | ||
* @param input either the LambdaProxy object or type T | ||
*/ | ||
export declare function getBodyFromPossibleLambdaProxyRequest<T>(input: T | IAWSLambdaProxyIntegrationRequest): IAWSLambdaProxyIntegrationRequest | T; | ||
/** | ||
* When a Lambda function is executed by API Gateway, the default option is | ||
@@ -30,0 +45,0 @@ * to turn on "Lambda Proxy Integration" which provides a lot of meta data |
@@ -13,2 +13,3 @@ "use strict"; | ||
} | ||
exports.isLambdaProxyRequest = isLambdaProxyRequest; | ||
/** | ||
@@ -25,2 +26,3 @@ * Returns the message body regardless of whether Lambda was called by API Gateway's LambdaProxy | ||
} | ||
exports.getBodyFromPossibleLambdaProxyRequest = getBodyFromPossibleLambdaProxyRequest; | ||
//# sourceMappingURL=aws.js.map |
@@ -7,2 +7,3 @@ "use strict"; | ||
__export(require("./basics")); | ||
__export(require("./aws")); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "common-types", | ||
"version": "1.6.28", | ||
"version": "1.6.29", | ||
"description": "Common types not included in Typescript", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/lifegadget/common-types", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24742
470