@types/aws-lambda
Advanced tools
Comparing version 0.0.6 to 0.0.7
// Type definitions for AWS Lambda | ||
// Project: http://docs.aws.amazon.com/lambda | ||
// Definitions by: James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede> | ||
// Definitions by: James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>, Rich Buggy <https://github.com/buggy> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// API Gateway "event" | ||
interface APIGatewayEvent { | ||
body: string | null; | ||
headers: { [name: string]: string }; | ||
httpMethod: string; | ||
isBase64Encoded: boolean; | ||
path: string; | ||
pathParameters: { [name: string]: string } | null; | ||
queryStringParameters: { [name: string]: string } | null; | ||
stageVariables: { [name: string]: string } | null; | ||
requestContext: { | ||
accountId: string; | ||
apiId: string; | ||
httpMethod: string; | ||
identity: { | ||
accessKey: string | null; | ||
accountId: string | null; | ||
apiKey: string | null; | ||
caller: string | null; | ||
cognitoAuthenticationProvider: string | null; | ||
cognitoAuthenticationType: string | null; | ||
cognitoIdentityId: string | null; | ||
cognitoIdentityPoolId: string | null; | ||
sourceIp: string; | ||
user: string | null; | ||
userAgent: string | null; | ||
userArn: string | null; | ||
}, | ||
stage: string; | ||
requestId: string; | ||
resourceId: string; | ||
resourcePath: string; | ||
}; | ||
resource: string; | ||
} | ||
// Context | ||
@@ -61,2 +97,10 @@ // http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html | ||
interface ProxyResult { | ||
statusCode: number; | ||
headers?: { | ||
[header: string]: string; | ||
}, | ||
body: string; | ||
} | ||
/** | ||
@@ -71,2 +115,3 @@ * AWS Lambda handler function. | ||
export type Handler = (event: any, context: Context, callback?: Callback) => void; | ||
export type ProxyHandler = (event: APIGatewayEvent, context: Context, callback?: ProxyCallback) => void; | ||
@@ -81,3 +126,4 @@ /** | ||
export type Callback = (error?: Error, result?: any) => void; | ||
export type ProxyCallback = (error?: Error, result?: ProxyResult) => void; | ||
export as namespace AWSLambda; |
{ | ||
"name": "@types/aws-lambda", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "TypeScript definitions for AWS Lambda", | ||
"license": "MIT", | ||
"author": "James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>", | ||
"author": "James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>, Rich Buggy <https://github.com/buggy>", | ||
"main": "", | ||
@@ -15,4 +15,4 @@ "repository": { | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "d4ecfa10d6928f16106deeb012babc11b466bd1d1abc02b220bd3d3ff7f02025", | ||
"typesPublisherContentHash": "6d053a9f83d99081729c0baff50f39fb1ed82aa26b5b1ed7b056140205e39a39", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 18 Jan 2017 08:47:10 GMT | ||
* Last updated: Tue, 07 Feb 2017 20:01:00 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: AWSLambda | ||
# Credits | ||
These definitions were written by James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>. | ||
These definitions were written by James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>, Rich Buggy <https://github.com/buggy>. |
@@ -6,3 +6,3 @@ { | ||
"data": { | ||
"authors": "James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>", | ||
"authors": "James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>, Rich Buggy <https://github.com/buggy>", | ||
"dependencies": {}, | ||
@@ -27,5 +27,5 @@ "pathMappings": {}, | ||
"hasPackageJson": false, | ||
"contentHash": "d4ecfa10d6928f16106deeb012babc11b466bd1d1abc02b220bd3d3ff7f02025" | ||
"contentHash": "6d053a9f83d99081729c0baff50f39fb1ed82aa26b5b1ed7b056140205e39a39" | ||
}, | ||
"isLatest": true | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6971
142