mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
multi-valued headers and query string prarameters
This commit is contained in:
@@ -8,6 +8,7 @@ declare let error: Error;
|
||||
declare let bool: boolean;
|
||||
declare let boolOrUndefined: boolean | undefined;
|
||||
declare let apiGwEvtReqCtx: AWSLambda.APIGatewayEventRequestContext;
|
||||
declare let apiGwEvtReqCtxOpt: AWSLambda.APIGatewayEventRequestContext | null | undefined;
|
||||
declare let apiGwEvt: AWSLambda.APIGatewayEvent;
|
||||
declare let customAuthorizerEvt: AWSLambda.CustomAuthorizerEvent;
|
||||
declare let clientCtx: AWSLambda.ClientContext;
|
||||
@@ -102,11 +103,13 @@ str = apiGwEvtReqCtx.resourcePath;
|
||||
/* API Gateway Event */
|
||||
strOrNull = apiGwEvt.body;
|
||||
str = apiGwEvt.headers["example"];
|
||||
str = apiGwEvt.multiValueHeaders["example"][0];
|
||||
str = apiGwEvt.httpMethod;
|
||||
bool = apiGwEvt.isBase64Encoded;
|
||||
str = apiGwEvt.path;
|
||||
str = apiGwEvt.pathParameters!["example"];
|
||||
str = apiGwEvt.queryStringParameters!["example"];
|
||||
str = apiGwEvt.multiValueQueryStringParameters!["example"][0];
|
||||
str = apiGwEvt.stageVariables!["example"];
|
||||
apiGwEvtReqCtx = apiGwEvt.requestContext;
|
||||
str = apiGwEvt.resource;
|
||||
@@ -115,10 +118,12 @@ str = apiGwEvt.resource;
|
||||
str = customAuthorizerEvt.type;
|
||||
str = customAuthorizerEvt.methodArn;
|
||||
strOrUndefined = customAuthorizerEvt.authorizationToken;
|
||||
str = apiGwEvt.pathParameters!["example"];
|
||||
str = apiGwEvt.queryStringParameters!["example"];
|
||||
str = apiGwEvt.stageVariables!["example"];
|
||||
apiGwEvtReqCtx = apiGwEvt.requestContext;
|
||||
str = customAuthorizerEvt.headers!["example"];
|
||||
str = customAuthorizerEvt.multiValueHeaders!["example"][0];
|
||||
str = customAuthorizerEvt.pathParameters!["example"];
|
||||
str = customAuthorizerEvt.queryStringParameters!["example"];
|
||||
str = customAuthorizerEvt.multiValueQueryStringParameters!["example"][0];
|
||||
apiGwEvtReqCtxOpt = customAuthorizerEvt.requestContext;
|
||||
|
||||
/* DynamoDB Stream Event */
|
||||
const dynamoDBStreamEvent: AWSLambda.DynamoDBStreamEvent = {
|
||||
|
||||
Vendored
+5
@@ -22,6 +22,7 @@
|
||||
// Louis Larry <https://github.com/louislarry>
|
||||
// Daniel Papukchiev <https://github.com/dpapukchiev>
|
||||
// Oliver Hookins <https://github.com/ohookins>
|
||||
// Trevor Leach <https://github.com/trevor-leach>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -58,11 +59,13 @@ export interface APIGatewayEventRequestContext {
|
||||
export interface APIGatewayProxyEvent {
|
||||
body: string | null;
|
||||
headers: { [name: string]: string };
|
||||
multiValueHeaders: { [name: string]: string };
|
||||
httpMethod: string;
|
||||
isBase64Encoded: boolean;
|
||||
path: string;
|
||||
pathParameters: { [name: string]: string } | null;
|
||||
queryStringParameters: { [name: string]: string } | null;
|
||||
multiValueQueryStringParameters: { [name: string]: string[] } | null;
|
||||
stageVariables: { [name: string]: string } | null;
|
||||
requestContext: APIGatewayEventRequestContext;
|
||||
resource: string;
|
||||
@@ -75,8 +78,10 @@ export interface CustomAuthorizerEvent {
|
||||
methodArn: string;
|
||||
authorizationToken?: string;
|
||||
headers?: { [name: string]: string };
|
||||
multiValueHeaders?: { [name: string]: string[] };
|
||||
pathParameters?: { [name: string]: string } | null;
|
||||
queryStringParameters?: { [name: string]: string } | null;
|
||||
multiValueQueryStringParameters?: { [name: string]: string[] } | null;
|
||||
requestContext?: APIGatewayEventRequestContext;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user