@types/aws-lambda
Advanced tools
Comparing version 0.0.2 to 0.0.3
// Type definitions for AWS Lambda | ||
// Project: http://docs.aws.amazon.com/lambda | ||
// Definitions by: Michael Skarum <https://github.com/skarum> | ||
// Definitions by: James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
export interface Records { | ||
Records: Record[]; | ||
} | ||
interface Record { | ||
EventVersion: string; | ||
EventSubscriptionArn: string; | ||
EnventSource: string; | ||
Sns: SNS; | ||
kinesis: Kinesis; | ||
} | ||
interface SNS { | ||
Type: string; | ||
MessageId: string; | ||
TopicArn: string; | ||
Subject: string; | ||
Message: string; | ||
Timestamp: Date; | ||
} | ||
interface Kinesis { | ||
data: string; | ||
} | ||
// Context | ||
// http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html | ||
interface Context { | ||
// Properties | ||
callbackWaitsForEmptyEventLoop: boolean; | ||
functionName: string; | ||
functionVersion: string; | ||
invokedFunctionArn: string; | ||
memoryLimitInMB: number; | ||
awsRequestId: string; | ||
logGroupName: string; | ||
logStreamName: string; | ||
identity?: CognitoIdentity; | ||
clientContext?: ClientContext; | ||
// Functions | ||
getRemainingTimeInMillis(): number; | ||
export interface Context { | ||
// Functions for compatibility with earlier Node.js Runtime v0.10.42 | ||
log(message: string, object: any): void; | ||
@@ -34,7 +30,39 @@ fail(message: string): void; | ||
succeed(object: any): void; | ||
succeed(message: string, object: any): void; | ||
awsRequestId: string; | ||
getRemainingTimeInMillis(): number; | ||
succeed(message: string, object: any): void; | ||
} | ||
export type Callback = (error?: Error, message?: string) => void; | ||
interface CognitoIdentity { | ||
cognitoIdentityId: string; | ||
cognitoIdentityPoolId: string; | ||
} | ||
interface ClientContext { | ||
client: ClientContextClient; | ||
Custom?: any; | ||
env: ClientContextEnv; | ||
} | ||
interface ClientContextClient { | ||
installationId: string; | ||
appTitle: string; | ||
appVersionName: string; | ||
appVersionCode: string; | ||
appPackageName: string; | ||
} | ||
interface ClientContextEnv { | ||
platformVersion: string; | ||
platform: string; | ||
make: string; | ||
model: string; | ||
locale: string; | ||
} | ||
/** | ||
* Optional callback parameter. | ||
* http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html | ||
* | ||
* @param error – an optional parameter that you can use to provide results of the failed Lambda function execution. | ||
* @param result – an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible. | ||
*/ | ||
export type Callback = (error?: Error, result?: any) => void; |
{ | ||
"name": "@types/aws-lambda", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "TypeScript definitions for AWS Lambda", | ||
"license": "MIT", | ||
"author": "Michael Skarum <https://github.com/skarum>", | ||
"author": "James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>", | ||
"main": "", | ||
@@ -14,3 +14,4 @@ "repository": { | ||
"dependencies": {}, | ||
"typings": "index.d.ts" | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "660286a208811aabbf55b7efcfebd12610ed8ea6bdadfce4d973066182ed8488" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 22 Aug 2016 18:53:15 GMT | ||
* Last updated: Sat, 17 Sep 2016 00:31:31 GMT | ||
* File structure: ProperModule | ||
@@ -19,2 +19,2 @@ * Library Dependencies: none | ||
# Credits | ||
These definitions were written by Michael Skarum <https://github.com/skarum>. | ||
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>. |
{ | ||
"authors": "Michael Skarum <https://github.com/skarum>", | ||
"authors": "James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>", | ||
"definitionFilename": "index.d.ts", | ||
@@ -22,3 +22,3 @@ "libraryDependencies": [], | ||
"hasPackageJson": false, | ||
"contentHash": "4ef87abefb576afdaf96b1a01f38a6c0b1d0179a07c979115ca0204899cb88f3" | ||
"contentHash": "660286a208811aabbf55b7efcfebd12610ed8ea6bdadfce4d973066182ed8488" | ||
} |
4349
79