@types/aws-lambda
Advanced tools
Comparing version 0.0.29 to 0.0.30
@@ -21,6 +21,6 @@ // Type definitions for AWS Lambda | ||
// API Gateway "event" request context | ||
interface APIGatewayEventRequestContext { | ||
export interface APIGatewayEventRequestContext { | ||
accountId: string; | ||
apiId: string; | ||
authorizer?: AuthResponseContext | null | undefined; | ||
authorizer?: AuthResponseContext | null; | ||
httpMethod: string; | ||
@@ -40,3 +40,3 @@ identity: { | ||
userArn: string | null; | ||
}, | ||
}; | ||
stage: string; | ||
@@ -50,3 +50,3 @@ requestId: string; | ||
// API Gateway "event" | ||
interface APIGatewayEvent { | ||
export interface APIGatewayEvent { | ||
body: string | null; | ||
@@ -65,3 +65,3 @@ headers: { [name: string]: string }; | ||
// API Gateway CustomAuthorizer "event" | ||
interface CustomAuthorizerEvent { | ||
export interface CustomAuthorizerEvent { | ||
type: string; | ||
@@ -78,13 +78,13 @@ methodArn: string; | ||
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_AttributeValue.html | ||
interface AttributeValue { | ||
export interface AttributeValue { | ||
B?: string; | ||
BS?: Array<string>; | ||
BS?: string[]; | ||
BOOL?: boolean; | ||
L?: Array<AttributeValue>; | ||
L?: AttributeValue[]; | ||
M?: { [id: string]: AttributeValue }; | ||
N?: string; | ||
NS?: Array<string>; | ||
NS?: string[]; | ||
NULL?: boolean; | ||
S?: string; | ||
SS?: Array<string>; | ||
SS?: string[]; | ||
} | ||
@@ -94,3 +94,3 @@ | ||
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_StreamRecord.html | ||
interface StreamRecord { | ||
export interface StreamRecord { | ||
ApproximateCreationTime?: number; | ||
@@ -107,3 +107,3 @@ Keys?: { [key: string]: AttributeValue }; | ||
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_Record.html | ||
interface DynamoDBRecord { | ||
export interface DynamoDBRecord { | ||
awsRegion?: string; | ||
@@ -122,8 +122,8 @@ dynamodb?: StreamRecord; | ||
// http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-ddb-update | ||
interface DynamoDBStreamEvent { | ||
Records: Array<DynamoDBRecord>; | ||
export interface DynamoDBStreamEvent { | ||
Records: DynamoDBRecord[]; | ||
} | ||
// SNS "event" | ||
interface SNSMessageAttribute { | ||
export interface SNSMessageAttribute { | ||
Type: string; | ||
@@ -133,7 +133,7 @@ Value: string; | ||
interface SNSMessageAttributes { | ||
export interface SNSMessageAttributes { | ||
[name: string]: SNSMessageAttribute; | ||
} | ||
interface SNSMessage { | ||
export interface SNSMessage { | ||
SignatureVersion: string; | ||
@@ -152,3 +152,3 @@ Timestamp: string; | ||
interface SNSEventRecord { | ||
export interface SNSEventRecord { | ||
EventVersion: string; | ||
@@ -160,4 +160,4 @@ EventSubscriptionArn: string; | ||
interface SNSEvent { | ||
Records: Array<SNSEventRecord>; | ||
export interface SNSEvent { | ||
Records: SNSEventRecord[]; | ||
} | ||
@@ -169,6 +169,6 @@ | ||
*/ | ||
interface S3EventRecord { | ||
export interface S3EventRecord { | ||
eventVersion: string; | ||
eventSource: string; | ||
awsRegion: string | ||
awsRegion: string; | ||
eventTime: string; | ||
@@ -178,10 +178,10 @@ eventName: string; | ||
principalId: string; | ||
}, | ||
}; | ||
requestParameters: { | ||
sourceIPAddress: string; | ||
}, | ||
}; | ||
responseElements: { | ||
'x-amz-request-id': string; | ||
'x-amz-id-2': string; | ||
}, | ||
}; | ||
s3: { | ||
@@ -204,7 +204,7 @@ s3SchemaVersion: string; | ||
} | ||
} | ||
}; | ||
} | ||
interface S3CreateEvent { | ||
Records: Array<S3EventRecord>; | ||
export interface S3CreateEvent { | ||
Records: S3EventRecord[]; | ||
} | ||
@@ -216,5 +216,26 @@ | ||
*/ | ||
interface CognitoUserPoolEvent { | ||
export interface CognitoUserPoolEvent { | ||
version: number; | ||
triggerSource: "PreSignUp_SignUp" | "PostConfirmation_ConfirmSignUp" | "PreAuthentication_Authentication" | "PostAuthentication_Authentication" | "CustomMessage_SignUp" | "CustomMessage_AdminCreateUser" | "CustomMessage_ResendCode" | "CustomMessage_ForgotPassword" | "CustomMessage_UpdateUserAttribute" | "CustomMessage_VerifyUserAttribute" | "CustomMessage_Authentication" | "DefineAuthChallenge_Authentication" | "CreateAuthChallenge_Authentication" | "VerifyAuthChallengeResponse_Authentication" | "PreSignUp_AdminCreateUser" | "PostConfirmation_ConfirmForgotPassword" | "TokenGeneration_HostedAuth" | "TokenGeneration_Authentication" | "TokenGeneration_NewPasswordChallenge" | "TokenGeneration_AuthenticateDevice" | "TokenGeneration_RefreshTokens"; | ||
triggerSource: | ||
| "PreSignUp_SignUp" | ||
| "PostConfirmation_ConfirmSignUp" | ||
| "PreAuthentication_Authentication" | ||
| "PostAuthentication_Authentication" | ||
| "CustomMessage_SignUp" | ||
| "CustomMessage_AdminCreateUser" | ||
| "CustomMessage_ResendCode" | ||
| "CustomMessage_ForgotPassword" | ||
| "CustomMessage_UpdateUserAttribute" | ||
| "CustomMessage_VerifyUserAttribute" | ||
| "CustomMessage_Authentication" | ||
| "DefineAuthChallenge_Authentication" | ||
| "CreateAuthChallenge_Authentication" | ||
| "VerifyAuthChallengeResponse_Authentication" | ||
| "PreSignUp_AdminCreateUser" | ||
| "PostConfirmation_ConfirmForgotPassword" | ||
| "TokenGeneration_HostedAuth" | ||
| "TokenGeneration_Authentication" | ||
| "TokenGeneration_NewPasswordChallenge" | ||
| "TokenGeneration_AuthenticateDevice" | ||
| "TokenGeneration_RefreshTokens"; | ||
region: string; | ||
@@ -233,7 +254,7 @@ userPoolId: string; | ||
newDeviceUsed?: boolean; | ||
session?: { | ||
session?: Array<{ | ||
challengeName: "CUSTOM_CHALLENGE" | "PASSWORD_VERIFIER" | "SMS_MFA" | "DEVICE_SRP_AUTH" | "DEVICE_PASSWORD_VERIFIER" | "ADMIN_NO_SRP_AUTH"; | ||
challengeResult: boolean; | ||
challengeMetaData?: string; | ||
}[]; | ||
}>; | ||
challengeName?: string; | ||
@@ -262,3 +283,3 @@ privateChallengeParameters?: {[key: string]: string}; | ||
*/ | ||
type CloudFormationCustomResourceEventCommon = { | ||
export interface CloudFormationCustomResourceEventCommon { | ||
ServiceToken: string; | ||
@@ -273,10 +294,10 @@ ResponseURL: string; | ||
[Key: string]: any; | ||
} | ||
}; | ||
} | ||
type CloudFormationCustomResourceCreateEvent = CloudFormationCustomResourceEventCommon & { | ||
export interface CloudFormationCustomResourceCreateEvent extends CloudFormationCustomResourceEventCommon { | ||
RequestType: "Create"; | ||
} | ||
type CloudFormationCustomResourceUpdateEvent = CloudFormationCustomResourceEventCommon & { | ||
export interface CloudFormationCustomResourceUpdateEvent extends CloudFormationCustomResourceEventCommon { | ||
RequestType: "Update"; | ||
@@ -289,3 +310,3 @@ PhysicalResourceId: string; | ||
type CloudFormationCustomResourceDeleteEvent = CloudFormationCustomResourceEventCommon & { | ||
export interface CloudFormationCustomResourceDeleteEvent extends CloudFormationCustomResourceEventCommon { | ||
RequestType: "Delete"; | ||
@@ -297,3 +318,3 @@ PhysicalResourceId: string; | ||
type CloudFormationCustomResourceResponseCommon = { | ||
export interface CloudFormationCustomResourceResponseCommon { | ||
PhysicalResourceId: string; | ||
@@ -305,6 +326,6 @@ StackId: string; | ||
[Key: string]: any; | ||
} | ||
}; | ||
} | ||
type CloudFormationCustomResourceSuccessResponse = CloudFormationCustomResourceResponseCommon & { | ||
export interface CloudFormationCustomResourceSuccessResponse extends CloudFormationCustomResourceResponseCommon { | ||
Status: "SUCCESS"; | ||
@@ -314,3 +335,3 @@ Reason?: string; | ||
type CloudFormationCustomResourceFailedResponse = CloudFormationCustomResourceResponseCommon & { | ||
export interface CloudFormationCustomResourceFailedResponse extends CloudFormationCustomResourceResponseCommon { | ||
Status: "FAILED"; | ||
@@ -325,3 +346,3 @@ Reason: string; | ||
*/ | ||
interface ScheduledEvent { | ||
export interface ScheduledEvent { | ||
account: string; | ||
@@ -334,3 +355,3 @@ region: string; | ||
id: string; | ||
resources: string[] | ||
resources: string[]; | ||
} | ||
@@ -341,11 +362,11 @@ | ||
*/ | ||
interface CloudWatchLogsEvent { | ||
export interface CloudWatchLogsEvent { | ||
awslogs: CloudWatchLogsEventData; | ||
} | ||
interface CloudWatchLogsEventData { | ||
export interface CloudWatchLogsEventData { | ||
data: string; | ||
} | ||
interface CloudWatchLogsDecodedData { | ||
export interface CloudWatchLogsDecodedData { | ||
owner: string; | ||
@@ -362,3 +383,3 @@ logGroup: string; | ||
*/ | ||
interface CloudWatchLogsLogEvent { | ||
export interface CloudWatchLogsLogEvent { | ||
id: string; | ||
@@ -369,7 +390,5 @@ timestamp: number; | ||
// Context | ||
// http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html | ||
interface Context { | ||
export interface Context { | ||
// Properties | ||
@@ -393,10 +412,8 @@ callbackWaitsForEmptyEventLoop: boolean; | ||
done(error?: Error, result?: any): void; | ||
fail(error: Error): void; | ||
fail(message: string): void; | ||
succeed(message: string): void; | ||
succeed(object: any): void; | ||
fail(error: Error | string): void; | ||
succeed(messageOrObject: any): void; | ||
succeed(message: string, object: any): void; | ||
} | ||
interface CognitoIdentity { | ||
export interface CognitoIdentity { | ||
cognitoIdentityId: string; | ||
@@ -406,3 +423,3 @@ cognitoIdentityPoolId: string; | ||
interface ClientContext { | ||
export interface ClientContext { | ||
client: ClientContextClient; | ||
@@ -413,3 +430,3 @@ Custom?: any; | ||
interface ClientContextClient { | ||
export interface ClientContextClient { | ||
installationId: string; | ||
@@ -422,3 +439,3 @@ appTitle: string; | ||
interface ClientContextEnv { | ||
export interface ClientContextEnv { | ||
platformVersion: string; | ||
@@ -431,7 +448,7 @@ platform: string; | ||
interface ProxyResult { | ||
export interface ProxyResult { | ||
statusCode: number; | ||
headers?: { | ||
[header: string]: boolean | number | string; | ||
}, | ||
}; | ||
body: string; | ||
@@ -445,3 +462,3 @@ isBase64Encoded?: boolean; | ||
*/ | ||
interface AuthResponse { | ||
export interface AuthResponse { | ||
principalId: string; | ||
@@ -456,3 +473,3 @@ policyDocument: PolicyDocument; | ||
*/ | ||
interface PolicyDocument { | ||
export interface PolicyDocument { | ||
Version: string; | ||
@@ -466,3 +483,3 @@ Statement: [Statement]; | ||
*/ | ||
interface Statement { | ||
export interface Statement { | ||
Action: string | string[]; | ||
@@ -477,3 +494,3 @@ Effect: string; | ||
*/ | ||
interface AuthResponseContext { | ||
export interface AuthResponseContext { | ||
[name: string]: string | number | boolean; | ||
@@ -486,16 +503,16 @@ } | ||
*/ | ||
type CloudFrontHeaders = { | ||
[name: string]: { | ||
key: string; | ||
value: string; | ||
}[] | ||
}; | ||
export interface CloudFrontHeaders { | ||
[name: string]: Array<{ | ||
key: string; | ||
value: string; | ||
}>; | ||
} | ||
type CloudFrontResponse = { | ||
export interface CloudFrontResponse { | ||
status: string; | ||
statusDescription: string; | ||
headers: CloudFrontHeaders; | ||
}; | ||
} | ||
type CloudFrontRequest = { | ||
export interface CloudFrontRequest { | ||
clientIp: string; | ||
@@ -506,13 +523,13 @@ method: string; | ||
headers: CloudFrontHeaders; | ||
}; | ||
} | ||
type CloudFrontEvent = { | ||
export interface CloudFrontEvent { | ||
config: { | ||
distributionId: string; | ||
requestId: string; | ||
} | ||
}; | ||
} | ||
export type CloudFrontResponseEvent = { | ||
Records: { | ||
export interface CloudFrontResponseEvent { | ||
Records: Array<{ | ||
cf: CloudFrontEvent & { | ||
@@ -522,12 +539,12 @@ request: CloudFrontRequest; | ||
} | ||
}[] | ||
}; | ||
}>; | ||
} | ||
export type CloudFrontRequestEvent = { | ||
Records: { | ||
export interface CloudFrontRequestEvent { | ||
Records: Array<{ | ||
cf: CloudFrontEvent & { | ||
request: CloudFrontRequest; | ||
} | ||
}[] | ||
}; | ||
}>; | ||
} | ||
@@ -534,0 +551,0 @@ /** |
{ | ||
"name": "@types/aws-lambda", | ||
"version": "0.0.29", | ||
"version": "0.0.30", | ||
"description": "TypeScript definitions for AWS Lambda", | ||
@@ -83,4 +83,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "986cd23e4e011ebaf6d16f3f21a1d67df0b2abe40c6af5c6ed0581e3aa4b191d", | ||
"typesPublisherContentHash": "2c3f8db374af62f3ee3e99bfd0d5928f9dba385702b07bfc096a525cda1f99a6", | ||
"typeScriptVersion": "2.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 24 Jan 2018 01:25:26 GMT | ||
* Last updated: Wed, 24 Jan 2018 18:35:42 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: AWSLambda |
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
21096
485