mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #32855 from loikg/master
[@types/aws-lambda] Add WebSocket integration props to APIGatewayEventRequestContext
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
declare let str: string;
|
||||
declare let strOrNull: string | null;
|
||||
declare let strOrUndefined: string | undefined;
|
||||
declare let strOrUndefinedOrNull: string | undefined | null;
|
||||
declare let date: Date;
|
||||
declare let anyObj: any;
|
||||
declare let num: number;
|
||||
declare let error: Error;
|
||||
declare let bool: boolean;
|
||||
declare let boolOrUndefined: boolean | undefined;
|
||||
declare let numOrUndefined: number | undefined;
|
||||
declare let apiGwEvtReqCtx: AWSLambda.APIGatewayEventRequestContext;
|
||||
declare let apiGwEvtReqCtxOpt: AWSLambda.APIGatewayEventRequestContext | null | undefined;
|
||||
declare let apiGwEvt: AWSLambda.APIGatewayEvent;
|
||||
@@ -80,6 +82,11 @@ declare const scheduledEvent: AWSLambda.ScheduledEvent;
|
||||
str = apiGwEvtReqCtx.accountId;
|
||||
str = apiGwEvtReqCtx.apiId;
|
||||
authResponseContextOpt = apiGwEvtReqCtx.authorizer;
|
||||
numOrUndefined = apiGwEvtReqCtx.connectedAt;
|
||||
strOrUndefined = apiGwEvtReqCtx.connectionId;
|
||||
strOrUndefined = apiGwEvtReqCtx.domainName;
|
||||
strOrUndefined = apiGwEvtReqCtx.eventType;
|
||||
strOrUndefined = apiGwEvtReqCtx.extendedRequestId;
|
||||
str = apiGwEvtReqCtx.httpMethod;
|
||||
strOrNull = apiGwEvtReqCtx.identity.accessKey;
|
||||
strOrNull = apiGwEvtReqCtx.identity.accountId;
|
||||
@@ -94,11 +101,15 @@ str = apiGwEvtReqCtx.identity.sourceIp;
|
||||
strOrNull = apiGwEvtReqCtx.identity.user;
|
||||
strOrNull = apiGwEvtReqCtx.identity.userAgent;
|
||||
strOrNull = apiGwEvtReqCtx.identity.userArn;
|
||||
strOrUndefined = apiGwEvtReqCtx.messageDirection;
|
||||
strOrUndefinedOrNull = apiGwEvtReqCtx.messageId;
|
||||
str = apiGwEvtReqCtx.path;
|
||||
str = apiGwEvtReqCtx.stage;
|
||||
str = apiGwEvtReqCtx.requestId;
|
||||
strOrUndefined = apiGwEvtReqCtx.requestTime;
|
||||
str = apiGwEvtReqCtx.resourceId;
|
||||
str = apiGwEvtReqCtx.resourcePath;
|
||||
strOrUndefined = apiGwEvtReqCtx.routeKey;
|
||||
|
||||
/* API Gateway Event */
|
||||
strOrNull = apiGwEvt.body;
|
||||
|
||||
Vendored
+10
@@ -25,6 +25,7 @@
|
||||
// Trevor Leach <https://github.com/trevor-leach>
|
||||
// James Gregory <https://github.com/jagregory>
|
||||
// Erik Dalén <https://github.com/dalen>
|
||||
// Loïk Gaonac'h <https://github.com/loikg>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -33,6 +34,11 @@ export interface APIGatewayEventRequestContext {
|
||||
accountId: string;
|
||||
apiId: string;
|
||||
authorizer?: AuthResponseContext | null;
|
||||
connectedAt: number;
|
||||
connectionId?: string;
|
||||
domainName?: string;
|
||||
eventType?: string;
|
||||
extendedRequestId?: string;
|
||||
httpMethod: string;
|
||||
identity: {
|
||||
accessKey: string | null;
|
||||
@@ -49,12 +55,16 @@ export interface APIGatewayEventRequestContext {
|
||||
userAgent: string | null;
|
||||
userArn: string | null;
|
||||
};
|
||||
messageDirection?: string;
|
||||
messageId?: string | null;
|
||||
path: string;
|
||||
stage: string;
|
||||
requestId: string;
|
||||
requestTime?: string;
|
||||
requestTimeEpoch: number;
|
||||
resourceId: string;
|
||||
resourcePath: string;
|
||||
routeKey?: string;
|
||||
}
|
||||
|
||||
// API Gateway "event"
|
||||
|
||||
Reference in New Issue
Block a user