mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-28 03:32:56 +00:00
* [aws-lambda] Extended CloudFrontRequestEvent with body Source: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html This key is optional. See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html for details * [aws-lambda] Reordered keys in CloudFrontRequestEvent and CloudFrontResponseEvent. This is done so they match the order of https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html * [aws-lambda] CloudFrontEvent keys are all readonly. Source: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#lambda-event-structure-request * [aws-lambda] CloudFrontRequest keys are now readonly. Source: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#lambda-event-structure-request * [aws-lambda] Added jsdoc comment for CloudFrontRequestEvent and CloudFrontResponseEvent. * [aws-lambda] requestId is only available for viewer events Source: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html * [aws-lambda] request data of CloudFrontResponseEvent is readonly. > If the Lambda function modifies the request object, the changes are ignored. Source: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#lambda-event-structure-response * [aws-lambda] Added jsdoc comment for CloudFrontResultResponse Also corrected link * [aws-lambda] Added apepper as co-author * [aws-lambda] TypeScript version is now 3.5 in order to user "Omit<>" See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type Also bumped TypeScript version in packages, that do depend on "aws-lambda". * [aws-lambda] Use "older" Pick/Exclude instead of "newer" Omit Omit<> is introduced in 3.5 and is "too new". Exclude<> instead is introduced in 2.8, which is "old enough". * [aws-lambda] Downgraded TypeScript version to 2.8, so Exclude can be used. Omit<> which is introduced in 3.5 is "too new". Using Exclude<> instead, that got introduced in 2.8 (see [1]) [1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#predefined-conditional-types
20 lines
657 B
TypeScript
20 lines
657 B
TypeScript
// Type definitions for cfn-response 1.0
|
|
// Project: https://github.com/LukeMizuhashi/cfn-response
|
|
// Definitions by: Ivo Murrell <https://github.com/ivoisbelongtous>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.8
|
|
|
|
import { CloudFormationCustomResourceEvent, Context } from "aws-lambda";
|
|
|
|
export type ResponseStatus = "SUCCESS" | "FAILED";
|
|
export const SUCCESS: ResponseStatus;
|
|
export const FAILED: ResponseStatus;
|
|
|
|
export function send(
|
|
event: CloudFormationCustomResourceEvent,
|
|
context: Context,
|
|
responseStatus: ResponseStatus,
|
|
responseData?: object,
|
|
physicalResourceId?: string
|
|
): void;
|