@aligent/cdk-prerender-proxy 0.2.7 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.ts +29 -0
- package/lib/error-response-construct.ts +54 -0
- package/lib/handlers/cache-control.ts +1 -4
- package/lib/handlers/error-response.ts +0 -1
- package/lib/handlers/prerender.ts +2 -3
- package/lib/prerender-cf-cache-control-construct.ts +58 -0
- package/lib/prerender-check-construct.ts +43 -0
- package/lib/prerender-construct.ts +55 -0
- package/lib/prerender-lambda-construct.ts +48 -0
- package/package.json +17 -26
- package/index.d.ts +0 -6
- package/lib/error-response-construct.d.ts +0 -9
- package/lib/error-response-construct.js +0 -32
- package/lib/handlers/node_modules/.package-lock.json +0 -55
- package/lib/handlers/node_modules/@types/aws-lambda/LICENSE +0 -21
- package/lib/handlers/node_modules/@types/aws-lambda/README.md +0 -16
- package/lib/handlers/node_modules/@types/aws-lambda/common/api-gateway.d.ts +0 -79
- package/lib/handlers/node_modules/@types/aws-lambda/common/cloudfront.d.ts +0 -79
- package/lib/handlers/node_modules/@types/aws-lambda/handler.d.ts +0 -171
- package/lib/handlers/node_modules/@types/aws-lambda/index.d.ts +0 -85
- package/lib/handlers/node_modules/@types/aws-lambda/package.json +0 -210
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/alb.d.ts +0 -48
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts +0 -174
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +0 -187
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts +0 -51
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts +0 -68
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts +0 -20
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts +0 -21
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts +0 -8
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts +0 -37
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts +0 -104
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts +0 -31
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts +0 -32
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts +0 -23
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts +0 -11
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline.d.ts +0 -55
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts +0 -41
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts +0 -22
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts +0 -86
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts +0 -44
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts +0 -21
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts +0 -119
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts +0 -15
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts +0 -22
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts +0 -15
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts +0 -31
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts +0 -45
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts +0 -39
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts +0 -20
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts +0 -65
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts +0 -45
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/eventbridge.d.ts +0 -18
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/iot.d.ts +0 -28
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts +0 -45
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts +0 -28
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/lex.d.ts +0 -116
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/msk.d.ts +0 -21
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3-batch.d.ts +0 -41
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3.d.ts +0 -60
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/ses.d.ts +0 -103
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/sns.d.ts +0 -38
- package/lib/handlers/node_modules/@types/aws-lambda/trigger/sqs.d.ts +0 -46
- package/lib/handlers/node_modules/@types/node/LICENSE +0 -21
- package/lib/handlers/node_modules/@types/node/README.md +0 -16
- package/lib/handlers/node_modules/@types/node/assert/strict.d.ts +0 -4
- package/lib/handlers/node_modules/@types/node/assert.d.ts +0 -124
- package/lib/handlers/node_modules/@types/node/async_hooks.d.ts +0 -226
- package/lib/handlers/node_modules/@types/node/base.d.ts +0 -19
- package/lib/handlers/node_modules/@types/node/buffer.d.ts +0 -84
- package/lib/handlers/node_modules/@types/node/child_process.d.ts +0 -526
- package/lib/handlers/node_modules/@types/node/cluster.d.ts +0 -262
- package/lib/handlers/node_modules/@types/node/console.d.ts +0 -133
- package/lib/handlers/node_modules/@types/node/constants.d.ts +0 -13
- package/lib/handlers/node_modules/@types/node/crypto.d.ts +0 -1580
- package/lib/handlers/node_modules/@types/node/dgram.d.ts +0 -141
- package/lib/handlers/node_modules/@types/node/diagnostic_channel.d.ts +0 -34
- package/lib/handlers/node_modules/@types/node/dns/promises.d.ts +0 -97
- package/lib/handlers/node_modules/@types/node/dns.d.ts +0 -322
- package/lib/handlers/node_modules/@types/node/domain.d.ts +0 -24
- package/lib/handlers/node_modules/@types/node/events.d.ts +0 -93
- package/lib/handlers/node_modules/@types/node/fs/promises.d.ts +0 -592
- package/lib/handlers/node_modules/@types/node/fs.d.ts +0 -2239
- package/lib/handlers/node_modules/@types/node/globals.d.ts +0 -655
- package/lib/handlers/node_modules/@types/node/globals.global.d.ts +0 -1
- package/lib/handlers/node_modules/@types/node/http.d.ts +0 -434
- package/lib/handlers/node_modules/@types/node/http2.d.ts +0 -976
- package/lib/handlers/node_modules/@types/node/https.d.ts +0 -36
- package/lib/handlers/node_modules/@types/node/index.d.ts +0 -58
- package/lib/handlers/node_modules/@types/node/inspector.d.ts +0 -3041
- package/lib/handlers/node_modules/@types/node/module.d.ts +0 -52
- package/lib/handlers/node_modules/@types/node/net.d.ts +0 -326
- package/lib/handlers/node_modules/@types/node/os.d.ts +0 -239
- package/lib/handlers/node_modules/@types/node/package.json +0 -232
- package/lib/handlers/node_modules/@types/node/path.d.ts +0 -163
- package/lib/handlers/node_modules/@types/node/perf_hooks.d.ts +0 -310
- package/lib/handlers/node_modules/@types/node/process.d.ts +0 -461
- package/lib/handlers/node_modules/@types/node/punycode.d.ts +0 -75
- package/lib/handlers/node_modules/@types/node/querystring.d.ts +0 -28
- package/lib/handlers/node_modules/@types/node/readline.d.ts +0 -192
- package/lib/handlers/node_modules/@types/node/repl.d.ts +0 -395
- package/lib/handlers/node_modules/@types/node/stream/promises.d.ts +0 -67
- package/lib/handlers/node_modules/@types/node/stream.d.ts +0 -471
- package/lib/handlers/node_modules/@types/node/string_decoder.d.ts +0 -7
- package/lib/handlers/node_modules/@types/node/timers/promises.d.ts +0 -21
- package/lib/handlers/node_modules/@types/node/timers.d.ts +0 -27
- package/lib/handlers/node_modules/@types/node/tls.d.ts +0 -793
- package/lib/handlers/node_modules/@types/node/trace_events.d.ts +0 -61
- package/lib/handlers/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
- package/lib/handlers/node_modules/@types/node/ts3.6/base.d.ts +0 -68
- package/lib/handlers/node_modules/@types/node/ts3.6/index.d.ts +0 -7
- package/lib/handlers/node_modules/@types/node/tty.d.ts +0 -66
- package/lib/handlers/node_modules/@types/node/url.d.ts +0 -116
- package/lib/handlers/node_modules/@types/node/util/types.d.ts +0 -53
- package/lib/handlers/node_modules/@types/node/util.d.ts +0 -156
- package/lib/handlers/node_modules/@types/node/v8.d.ts +0 -198
- package/lib/handlers/node_modules/@types/node/vm.d.ts +0 -152
- package/lib/handlers/node_modules/@types/node/wasi.d.ts +0 -86
- package/lib/handlers/node_modules/@types/node/worker_threads.d.ts +0 -282
- package/lib/handlers/node_modules/@types/node/zlib.d.ts +0 -361
- package/lib/handlers/node_modules/axios/CHANGELOG.md +0 -685
- package/lib/handlers/node_modules/axios/LICENSE +0 -19
- package/lib/handlers/node_modules/axios/README.md +0 -800
- package/lib/handlers/node_modules/axios/UPGRADE_GUIDE.md +0 -162
- package/lib/handlers/node_modules/axios/dist/axios.js +0 -1756
- package/lib/handlers/node_modules/axios/dist/axios.map +0 -1
- package/lib/handlers/node_modules/axios/dist/axios.min.js +0 -3
- package/lib/handlers/node_modules/axios/dist/axios.min.map +0 -1
- package/lib/handlers/node_modules/axios/index.d.ts +0 -161
- package/lib/handlers/node_modules/axios/index.js +0 -1
- package/lib/handlers/node_modules/axios/lib/adapters/README.md +0 -37
- package/lib/handlers/node_modules/axios/lib/adapters/http.js +0 -303
- package/lib/handlers/node_modules/axios/lib/adapters/xhr.js +0 -179
- package/lib/handlers/node_modules/axios/lib/axios.js +0 -56
- package/lib/handlers/node_modules/axios/lib/cancel/Cancel.js +0 -19
- package/lib/handlers/node_modules/axios/lib/cancel/CancelToken.js +0 -57
- package/lib/handlers/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/lib/handlers/node_modules/axios/lib/core/Axios.js +0 -95
- package/lib/handlers/node_modules/axios/lib/core/InterceptorManager.js +0 -52
- package/lib/handlers/node_modules/axios/lib/core/README.md +0 -7
- package/lib/handlers/node_modules/axios/lib/core/buildFullPath.js +0 -20
- package/lib/handlers/node_modules/axios/lib/core/createError.js +0 -18
- package/lib/handlers/node_modules/axios/lib/core/dispatchRequest.js +0 -79
- package/lib/handlers/node_modules/axios/lib/core/enhanceError.js +0 -42
- package/lib/handlers/node_modules/axios/lib/core/mergeConfig.js +0 -87
- package/lib/handlers/node_modules/axios/lib/core/settle.js +0 -25
- package/lib/handlers/node_modules/axios/lib/core/transformData.js +0 -20
- package/lib/handlers/node_modules/axios/lib/defaults.js +0 -98
- package/lib/handlers/node_modules/axios/lib/helpers/README.md +0 -7
- package/lib/handlers/node_modules/axios/lib/helpers/bind.js +0 -11
- package/lib/handlers/node_modules/axios/lib/helpers/buildURL.js +0 -70
- package/lib/handlers/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- package/lib/handlers/node_modules/axios/lib/helpers/cookies.js +0 -53
- package/lib/handlers/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- package/lib/handlers/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- package/lib/handlers/node_modules/axios/lib/helpers/isAxiosError.js +0 -11
- package/lib/handlers/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- package/lib/handlers/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/lib/handlers/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- package/lib/handlers/node_modules/axios/lib/helpers/spread.js +0 -27
- package/lib/handlers/node_modules/axios/lib/utils.js +0 -351
- package/lib/handlers/node_modules/axios/package.json +0 -86
- package/lib/handlers/node_modules/buffer-from/LICENSE +0 -21
- package/lib/handlers/node_modules/buffer-from/index.js +0 -69
- package/lib/handlers/node_modules/buffer-from/package.json +0 -19
- package/lib/handlers/node_modules/buffer-from/readme.md +0 -69
- package/lib/handlers/node_modules/follow-redirects/LICENSE +0 -18
- package/lib/handlers/node_modules/follow-redirects/README.md +0 -148
- package/lib/handlers/node_modules/follow-redirects/debug.js +0 -14
- package/lib/handlers/node_modules/follow-redirects/http.js +0 -1
- package/lib/handlers/node_modules/follow-redirects/https.js +0 -1
- package/lib/handlers/node_modules/follow-redirects/index.js +0 -531
- package/lib/handlers/node_modules/follow-redirects/package.json +0 -59
- package/lib/handlers/node_modules/source-map/CHANGELOG.md +0 -301
- package/lib/handlers/node_modules/source-map/LICENSE +0 -28
- package/lib/handlers/node_modules/source-map/README.md +0 -742
- package/lib/handlers/node_modules/source-map/dist/source-map.debug.js +0 -3234
- package/lib/handlers/node_modules/source-map/dist/source-map.js +0 -3233
- package/lib/handlers/node_modules/source-map/dist/source-map.min.js +0 -2
- package/lib/handlers/node_modules/source-map/dist/source-map.min.js.map +0 -1
- package/lib/handlers/node_modules/source-map/lib/array-set.js +0 -121
- package/lib/handlers/node_modules/source-map/lib/base64-vlq.js +0 -140
- package/lib/handlers/node_modules/source-map/lib/base64.js +0 -67
- package/lib/handlers/node_modules/source-map/lib/binary-search.js +0 -111
- package/lib/handlers/node_modules/source-map/lib/mapping-list.js +0 -79
- package/lib/handlers/node_modules/source-map/lib/quick-sort.js +0 -114
- package/lib/handlers/node_modules/source-map/lib/source-map-consumer.js +0 -1145
- package/lib/handlers/node_modules/source-map/lib/source-map-generator.js +0 -425
- package/lib/handlers/node_modules/source-map/lib/source-node.js +0 -413
- package/lib/handlers/node_modules/source-map/lib/util.js +0 -488
- package/lib/handlers/node_modules/source-map/package.json +0 -73
- package/lib/handlers/node_modules/source-map/source-map.d.ts +0 -98
- package/lib/handlers/node_modules/source-map/source-map.js +0 -8
- package/lib/handlers/node_modules/source-map-support/LICENSE.md +0 -21
- package/lib/handlers/node_modules/source-map-support/README.md +0 -284
- package/lib/handlers/node_modules/source-map-support/browser-source-map-support.js +0 -114
- package/lib/handlers/node_modules/source-map-support/package.json +0 -31
- package/lib/handlers/node_modules/source-map-support/register.js +0 -1
- package/lib/handlers/node_modules/source-map-support/source-map-support.js +0 -604
- package/lib/handlers/package-lock.json +0 -108
- package/lib/handlers/package.json +0 -13
- package/lib/handlers/tsconfig.json +0 -22
- package/lib/prerender-cf-cache-control-construct.d.ts +0 -10
- package/lib/prerender-cf-cache-control-construct.js +0 -33
- package/lib/prerender-check-construct.d.ts +0 -6
- package/lib/prerender-check-construct.js +0 -25
- package/lib/prerender-construct.d.ts +0 -11
- package/lib/prerender-construct.js +0 -34
- package/lib/prerender-lambda-construct.d.ts +0 -17
- package/lib/prerender-lambda-construct.js +0 -19
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Handler } from '../../handler';
|
|
2
|
-
import { BaseTriggerEvent, StringMap } from './_common';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-verify-auth-challenge-response.html
|
|
6
|
-
*/
|
|
7
|
-
export interface VerifyAuthChallengeResponseTriggerEvent extends BaseTriggerEvent<'VerifyAuthChallengeResponse_Authentication'> {
|
|
8
|
-
request: {
|
|
9
|
-
userAttributes: StringMap;
|
|
10
|
-
privateChallengeParameters: StringMap;
|
|
11
|
-
challengeAnswer: string;
|
|
12
|
-
clientMetadata?: StringMap;
|
|
13
|
-
userNotFound?: boolean;
|
|
14
|
-
};
|
|
15
|
-
response: {
|
|
16
|
-
answerCorrect: boolean;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type VerifyAuthChallengeResponseTriggerHandler = Handler<VerifyAuthChallengeResponseTriggerEvent>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Callback, Handler } from '../handler';
|
|
2
|
-
|
|
3
|
-
export type ConnectContactFlowHandler = Handler<ConnectContactFlowEvent, ConnectContactFlowResult>;
|
|
4
|
-
export type ConnectContactFlowCallback = Callback<ConnectContactFlowResult>;
|
|
5
|
-
|
|
6
|
-
// Connect
|
|
7
|
-
// https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html
|
|
8
|
-
export interface ConnectContactFlowEvent {
|
|
9
|
-
Details: {
|
|
10
|
-
ContactData: {
|
|
11
|
-
Attributes: { [key: string]: string };
|
|
12
|
-
Channel: ConnectContactFlowChannel;
|
|
13
|
-
ContactId: string;
|
|
14
|
-
CustomerEndpoint: ConnectContactFlowEndpoint | null;
|
|
15
|
-
InitialContactId: string;
|
|
16
|
-
InitiationMethod: ConnectContactFlowInitiationMethod;
|
|
17
|
-
InstanceARN: string;
|
|
18
|
-
PreviousContactId: string;
|
|
19
|
-
Queue: ConnectContactFlowQueue | null;
|
|
20
|
-
SystemEndpoint: ConnectContactFlowEndpoint | null;
|
|
21
|
-
MediaStreams: {
|
|
22
|
-
Customer: {
|
|
23
|
-
Audio: CustomerAudio;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
Parameters: { [key: string]: string };
|
|
28
|
-
};
|
|
29
|
-
Name: 'ContactFlowEvent';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type ConnectContactFlowChannel = 'VOICE' | 'CHAT';
|
|
33
|
-
|
|
34
|
-
export type ConnectContactFlowInitiationMethod = 'INBOUND' | 'OUTBOUND' | 'TRANSFER' | 'CALLBACK' | 'API';
|
|
35
|
-
|
|
36
|
-
export interface ConnectContactFlowEndpoint {
|
|
37
|
-
Address: string;
|
|
38
|
-
Type: 'TELEPHONE_NUMBER';
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface ConnectContactFlowQueue {
|
|
42
|
-
ARN: string;
|
|
43
|
-
Name: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface ConnectContactFlowResult {
|
|
47
|
-
[key: string]: string | null;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type CustomerAudio =
|
|
51
|
-
| null // If Media Streaming has never been started.
|
|
52
|
-
| StartedCustomerAudio // If Media Streaming has been started, but not stopped.
|
|
53
|
-
| StartedCustomerAudio & StoppedCustomerAudio // If Media Streaming has been started and stopped.
|
|
54
|
-
;
|
|
55
|
-
|
|
56
|
-
export interface StartedCustomerAudio {
|
|
57
|
-
StartFragmentNumber: string;
|
|
58
|
-
StartTimestamp: string;
|
|
59
|
-
StreamARN: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface StoppedCustomerAudio {
|
|
63
|
-
StopFragmentNumber: string;
|
|
64
|
-
StopTimestamp: string;
|
|
65
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type DynamoDBStreamHandler = Handler<DynamoDBStreamEvent, void>;
|
|
4
|
-
|
|
5
|
-
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_AttributeValue.html
|
|
6
|
-
export interface AttributeValue {
|
|
7
|
-
B?: string;
|
|
8
|
-
BS?: string[];
|
|
9
|
-
BOOL?: boolean;
|
|
10
|
-
L?: AttributeValue[];
|
|
11
|
-
M?: { [id: string]: AttributeValue };
|
|
12
|
-
N?: string;
|
|
13
|
-
NS?: string[];
|
|
14
|
-
NULL?: boolean;
|
|
15
|
-
S?: string;
|
|
16
|
-
SS?: string[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_StreamRecord.html
|
|
20
|
-
export interface StreamRecord {
|
|
21
|
-
ApproximateCreationDateTime?: number;
|
|
22
|
-
Keys?: { [key: string]: AttributeValue };
|
|
23
|
-
NewImage?: { [key: string]: AttributeValue };
|
|
24
|
-
OldImage?: { [key: string]: AttributeValue };
|
|
25
|
-
SequenceNumber?: string;
|
|
26
|
-
SizeBytes?: number;
|
|
27
|
-
StreamViewType?: 'KEYS_ONLY' | 'NEW_IMAGE' | 'OLD_IMAGE' | 'NEW_AND_OLD_IMAGES';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_Record.html
|
|
31
|
-
export interface DynamoDBRecord {
|
|
32
|
-
awsRegion?: string;
|
|
33
|
-
dynamodb?: StreamRecord;
|
|
34
|
-
eventID?: string;
|
|
35
|
-
eventName?: 'INSERT' | 'MODIFY' | 'REMOVE';
|
|
36
|
-
eventSource?: string;
|
|
37
|
-
eventSourceARN?: string;
|
|
38
|
-
eventVersion?: string;
|
|
39
|
-
userIdentity?: any;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-ddb-update
|
|
43
|
-
export interface DynamoDBStreamEvent {
|
|
44
|
-
Records: DynamoDBRecord[];
|
|
45
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Handler } from '../handler';
|
|
2
|
-
|
|
3
|
-
export type EventBridgeHandler<TDetailType extends string, TDetail, TResult> = Handler<
|
|
4
|
-
EventBridgeEvent<TDetailType, TDetail>,
|
|
5
|
-
TResult
|
|
6
|
-
>;
|
|
7
|
-
|
|
8
|
-
export interface EventBridgeEvent<TDetailType extends string, TDetail> {
|
|
9
|
-
id: string;
|
|
10
|
-
version: string;
|
|
11
|
-
account: string;
|
|
12
|
-
time: string;
|
|
13
|
-
region: string;
|
|
14
|
-
resources: string[];
|
|
15
|
-
source: string;
|
|
16
|
-
'detail-type': TDetailType;
|
|
17
|
-
detail: TDetail;
|
|
18
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type IoTHandler = Handler<IoTEvent, void>;
|
|
4
|
-
|
|
5
|
-
// IoT
|
|
6
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/services-iot.html
|
|
7
|
-
// IoT payload is not restriced to JSON, but JSON is highly recommended. Types as string, number or array are possible to use.
|
|
8
|
-
|
|
9
|
-
export type IoTEvent<T = never> = string | number | T;
|
|
10
|
-
|
|
11
|
-
// PreProvisioningHook
|
|
12
|
-
// https://docs.aws.amazon.com/iot/latest/developerguide/pre-provisioning-hook.html
|
|
13
|
-
// When using AWS IoT fleet provisioning, you can set up a Lambda function to validate parameters passed from the device before allowing the device to be provisioned.
|
|
14
|
-
export type IoTPreProvisioningHookHandler = Handler<IoTPreProvisioningHookEvent, IoTPreProvisioningHookResult>;
|
|
15
|
-
|
|
16
|
-
export interface IoTPreProvisioningHookEvent {
|
|
17
|
-
claimCertificateId: string;
|
|
18
|
-
certificateId: string;
|
|
19
|
-
certificatePem: string;
|
|
20
|
-
templateArn: string;
|
|
21
|
-
clientId: string;
|
|
22
|
-
parameters: Record<string, string>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface IoTPreProvisioningHookResult {
|
|
26
|
-
allowProvisioning: boolean;
|
|
27
|
-
parameterOverrides: Record<string, string>;
|
|
28
|
-
}
|
package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Callback, Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type FirehoseTransformationHandler = Handler<FirehoseTransformationEvent, FirehoseTransformationResult>;
|
|
4
|
-
export type FirehoseTransformationCallback = Callback<FirehoseTransformationResult>;
|
|
5
|
-
|
|
6
|
-
// Kinesis Data Firehose Event
|
|
7
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-kinesis-firehose
|
|
8
|
-
// https://docs.aws.amazon.com/firehose/latest/dev/data-transformation.html
|
|
9
|
-
// https://aws.amazon.com/blogs/compute/amazon-kinesis-firehose-data-transformation-with-aws-lambda/
|
|
10
|
-
// Examples in the lambda blueprints
|
|
11
|
-
export interface FirehoseTransformationEvent {
|
|
12
|
-
invocationId: string;
|
|
13
|
-
deliveryStreamArn: string;
|
|
14
|
-
region: string;
|
|
15
|
-
records: FirehoseTransformationEventRecord[];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface FirehoseTransformationEventRecord {
|
|
19
|
-
recordId: string;
|
|
20
|
-
approximateArrivalTimestamp: number;
|
|
21
|
-
/** Base64 encoded */
|
|
22
|
-
data: string;
|
|
23
|
-
kinesisRecordMetadata?: FirehoseRecordMetadata;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface FirehoseRecordMetadata {
|
|
27
|
-
shardId: string;
|
|
28
|
-
partitionKey: string;
|
|
29
|
-
approximateArrivalTimestamp: number;
|
|
30
|
-
sequenceNumber: string;
|
|
31
|
-
subsequenceNumber: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type FirehoseRecordTransformationStatus = 'Ok' | 'Dropped' | 'ProcessingFailed';
|
|
35
|
-
|
|
36
|
-
export interface FirehoseTransformationResultRecord {
|
|
37
|
-
recordId: string;
|
|
38
|
-
result: FirehoseRecordTransformationStatus;
|
|
39
|
-
/** Encode in Base64 */
|
|
40
|
-
data: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface FirehoseTransformationResult {
|
|
44
|
-
records: FirehoseTransformationResultRecord[];
|
|
45
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type KinesisStreamHandler = Handler<KinesisStreamEvent, void>;
|
|
4
|
-
|
|
5
|
-
// Kinesis Streams
|
|
6
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-kinesis-streams
|
|
7
|
-
export interface KinesisStreamRecordPayload {
|
|
8
|
-
approximateArrivalTimestamp: number;
|
|
9
|
-
data: string;
|
|
10
|
-
kinesisSchemaVersion: string;
|
|
11
|
-
partitionKey: string;
|
|
12
|
-
sequenceNumber: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface KinesisStreamRecord {
|
|
16
|
-
awsRegion: string;
|
|
17
|
-
eventID: string;
|
|
18
|
-
eventName: string;
|
|
19
|
-
eventSource: string;
|
|
20
|
-
eventSourceARN: string;
|
|
21
|
-
eventVersion: string;
|
|
22
|
-
invokeIdentityArn: string;
|
|
23
|
-
kinesis: KinesisStreamRecordPayload;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface KinesisStreamEvent {
|
|
27
|
-
Records: KinesisStreamRecord[];
|
|
28
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { Callback, Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type LexHandler = Handler<LexEvent, LexResult>;
|
|
4
|
-
export type LexCallback = Callback<LexResult>;
|
|
5
|
-
|
|
6
|
-
export interface LexEventSlots {
|
|
7
|
-
[name: string]: string | undefined | null;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface LexEventSessionAttributes {
|
|
11
|
-
[key: string]: string | undefined;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface LexEventRequestAttributes {
|
|
15
|
-
[key: string]: string | undefined;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Lex
|
|
19
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html#supported-event-source-lex
|
|
20
|
-
export interface LexEvent {
|
|
21
|
-
currentIntent: {
|
|
22
|
-
name: string;
|
|
23
|
-
slots: LexEventSlots;
|
|
24
|
-
slotDetails: LexSlotDetails;
|
|
25
|
-
confirmationStatus: 'None' | 'Confirmed' | 'Denied';
|
|
26
|
-
};
|
|
27
|
-
bot: {
|
|
28
|
-
name: string;
|
|
29
|
-
alias: string;
|
|
30
|
-
version: string;
|
|
31
|
-
};
|
|
32
|
-
userId: string;
|
|
33
|
-
inputTranscript: string;
|
|
34
|
-
invocationSource: 'DialogCodeHook' | 'FulfillmentCodeHook';
|
|
35
|
-
outputDialogMode: 'Text' | 'Voice';
|
|
36
|
-
messageVersion: '1.0';
|
|
37
|
-
sessionAttributes: LexEventSessionAttributes;
|
|
38
|
-
requestAttributes: LexEventRequestAttributes | null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface LexSlotResolution {
|
|
42
|
-
value: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface LexSlotDetail {
|
|
46
|
-
// "at least 1 but no more than 5 items"
|
|
47
|
-
resolutions: [LexSlotResolution, LexSlotResolution?, LexSlotResolution?, LexSlotResolution?, LexSlotResolution?];
|
|
48
|
-
originalValue: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface LexSlotDetails {
|
|
52
|
-
[name: string]: LexSlotDetail;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface LexGenericAttachment {
|
|
56
|
-
title: string;
|
|
57
|
-
subTitle: string;
|
|
58
|
-
imageUrl: string;
|
|
59
|
-
attachmentLinkUrl: string;
|
|
60
|
-
buttons: Array<{
|
|
61
|
-
text: string;
|
|
62
|
-
value: string;
|
|
63
|
-
}>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface LexDialogActionBase {
|
|
67
|
-
type: 'Close' | 'ElicitIntent' | 'ElicitSlot' | 'ConfirmIntent';
|
|
68
|
-
message?: {
|
|
69
|
-
contentType: 'PlainText' | 'SSML' | 'CustomPayload';
|
|
70
|
-
content: string;
|
|
71
|
-
};
|
|
72
|
-
responseCard?: {
|
|
73
|
-
version: number;
|
|
74
|
-
contentType: 'application/vnd.amazonaws.card.generic';
|
|
75
|
-
genericAttachments: LexGenericAttachment[];
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface LexDialogActionClose extends LexDialogActionBase {
|
|
80
|
-
type: 'Close';
|
|
81
|
-
fulfillmentState: 'Fulfilled' | 'Failed';
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface LexDialogActionElicitIntent extends LexDialogActionBase {
|
|
85
|
-
type: 'ElicitIntent';
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface LexDialogActionElicitSlot extends LexDialogActionBase {
|
|
89
|
-
type: 'ElicitSlot';
|
|
90
|
-
intentName: string;
|
|
91
|
-
slots: { [name: string]: string | null };
|
|
92
|
-
slotToElicit: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface LexDialogActionConfirmIntent extends LexDialogActionBase {
|
|
96
|
-
type: 'ConfirmIntent';
|
|
97
|
-
intentName: string;
|
|
98
|
-
slots: { [name: string]: string | null };
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface LexDialogActionDelegate {
|
|
102
|
-
type: 'Delegate';
|
|
103
|
-
slots: { [name: string]: string | null };
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export type LexDialogAction =
|
|
107
|
-
| LexDialogActionClose
|
|
108
|
-
| LexDialogActionElicitIntent
|
|
109
|
-
| LexDialogActionElicitSlot
|
|
110
|
-
| LexDialogActionConfirmIntent
|
|
111
|
-
| LexDialogActionDelegate;
|
|
112
|
-
|
|
113
|
-
export interface LexResult {
|
|
114
|
-
sessionAttributes?: { [key: string]: string };
|
|
115
|
-
dialogAction: LexDialogAction;
|
|
116
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Handler } from '../handler';
|
|
2
|
-
|
|
3
|
-
export type MSKHandler = Handler<MSKEvent, void>;
|
|
4
|
-
|
|
5
|
-
export interface MSKRecord {
|
|
6
|
-
topic: string;
|
|
7
|
-
partition: number;
|
|
8
|
-
offset: number;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
timestampType: 'CREATE_TIME' | 'LOG_APPEND_TIME';
|
|
11
|
-
key: string;
|
|
12
|
-
value: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface MSKEvent {
|
|
16
|
-
eventSource: 'aws:kafka';
|
|
17
|
-
eventSourceArn: string;
|
|
18
|
-
records: {
|
|
19
|
-
[topic: string]: MSKRecord[];
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Handler, Callback } from "../handler";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* S3 Batch Operations event
|
|
5
|
-
* https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-invoke-lambda.html
|
|
6
|
-
*/
|
|
7
|
-
export type S3BatchHandler = Handler<S3BatchEvent, S3BatchResult>;
|
|
8
|
-
export type S3BatchCallback = Callback<S3BatchResult>;
|
|
9
|
-
|
|
10
|
-
export interface S3BatchEvent {
|
|
11
|
-
invocationSchemaVersion: string;
|
|
12
|
-
invocationId: string;
|
|
13
|
-
job: S3BatchEventJob;
|
|
14
|
-
tasks: S3BatchEventTask[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface S3BatchEventJob {
|
|
18
|
-
id: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface S3BatchEventTask {
|
|
22
|
-
taskId: string;
|
|
23
|
-
s3Key: string;
|
|
24
|
-
s3VersionId: string | null;
|
|
25
|
-
s3BucketArn: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface S3BatchResult {
|
|
29
|
-
invocationSchemaVersion: string;
|
|
30
|
-
treatMissingKeysAs: S3BatchResultResultCode;
|
|
31
|
-
invocationId: string;
|
|
32
|
-
results: S3BatchResultResult[];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type S3BatchResultResultCode = 'Succeeded' | 'TemporaryFailure' | 'PermanentFailure';
|
|
36
|
-
|
|
37
|
-
export interface S3BatchResultResult {
|
|
38
|
-
taskId: string;
|
|
39
|
-
resultCode: S3BatchResultResultCode;
|
|
40
|
-
resultString: string;
|
|
41
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type S3Handler = Handler<S3Event, void>;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* S3Create event
|
|
7
|
-
* https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export interface S3EventRecordGlacierRestoreEventData {
|
|
11
|
-
lifecycleRestorationExpiryTime: string;
|
|
12
|
-
lifecycleRestoreStorageClass: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface S3EventRecordGlacierEventData {
|
|
16
|
-
restoreEventData: S3EventRecordGlacierRestoreEventData;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface S3EventRecord {
|
|
20
|
-
eventVersion: string;
|
|
21
|
-
eventSource: string;
|
|
22
|
-
awsRegion: string;
|
|
23
|
-
eventTime: string;
|
|
24
|
-
eventName: string;
|
|
25
|
-
userIdentity: {
|
|
26
|
-
principalId: string;
|
|
27
|
-
};
|
|
28
|
-
requestParameters: {
|
|
29
|
-
sourceIPAddress: string;
|
|
30
|
-
};
|
|
31
|
-
responseElements: {
|
|
32
|
-
'x-amz-request-id': string;
|
|
33
|
-
'x-amz-id-2': string;
|
|
34
|
-
};
|
|
35
|
-
s3: {
|
|
36
|
-
s3SchemaVersion: string;
|
|
37
|
-
configurationId: string;
|
|
38
|
-
bucket: {
|
|
39
|
-
name: string;
|
|
40
|
-
ownerIdentity: {
|
|
41
|
-
principalId: string;
|
|
42
|
-
};
|
|
43
|
-
arn: string;
|
|
44
|
-
};
|
|
45
|
-
object: {
|
|
46
|
-
key: string;
|
|
47
|
-
size: number;
|
|
48
|
-
eTag: string;
|
|
49
|
-
versionId?: string;
|
|
50
|
-
sequencer: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
glacierEventData?: S3EventRecordGlacierEventData;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface S3Event {
|
|
57
|
-
Records: S3EventRecord[];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export type S3CreateEvent = S3Event; // old name
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { Handler } from '../handler';
|
|
2
|
-
|
|
3
|
-
export type SESHandler = Handler<SESEvent, void>;
|
|
4
|
-
|
|
5
|
-
// SES event
|
|
6
|
-
export interface SESMailHeader {
|
|
7
|
-
name: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface SESMailCommonHeaders {
|
|
12
|
-
returnPath: string;
|
|
13
|
-
from?: string[];
|
|
14
|
-
date: string;
|
|
15
|
-
to?: string[];
|
|
16
|
-
cc?: string[];
|
|
17
|
-
bcc?: string[];
|
|
18
|
-
sender?: string[];
|
|
19
|
-
replyTo?: string[];
|
|
20
|
-
messageId: string;
|
|
21
|
-
subject?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface SESMail {
|
|
25
|
-
timestamp: string;
|
|
26
|
-
source: string;
|
|
27
|
-
messageId: string;
|
|
28
|
-
destination: string[];
|
|
29
|
-
headersTruncated: boolean;
|
|
30
|
-
headers: SESMailHeader[];
|
|
31
|
-
commonHeaders: SESMailCommonHeaders;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface SESReceiptStatus {
|
|
35
|
-
status: 'PASS' | 'FAIL' | 'GRAY' | 'PROCESSING_FAILED' | 'DISABLED';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface SESReceiptS3Action {
|
|
39
|
-
type: 'S3';
|
|
40
|
-
topicArn?: string;
|
|
41
|
-
bucketName: string;
|
|
42
|
-
objectKey: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface SESReceiptSnsAction {
|
|
46
|
-
type: 'SNS';
|
|
47
|
-
topicArn: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface SESReceiptBounceAction {
|
|
51
|
-
type: 'Bounce';
|
|
52
|
-
topicArn?: string;
|
|
53
|
-
smtpReplyCode: string;
|
|
54
|
-
statusCode: string;
|
|
55
|
-
message: string;
|
|
56
|
-
sender: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface SESReceiptLambdaAction {
|
|
60
|
-
type: 'Lambda';
|
|
61
|
-
topicArn?: string;
|
|
62
|
-
functionArn: string;
|
|
63
|
-
invocationType: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface SESReceiptStopAction {
|
|
67
|
-
type: 'Stop';
|
|
68
|
-
topicArn?: string;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface SESReceiptWorkMailAction {
|
|
72
|
-
type: 'WorkMail';
|
|
73
|
-
topicArn?: string;
|
|
74
|
-
organizationArn: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface SESReceipt {
|
|
78
|
-
timestamp: string;
|
|
79
|
-
processingTimeMillis: number;
|
|
80
|
-
recipients: string[];
|
|
81
|
-
spamVerdict: SESReceiptStatus;
|
|
82
|
-
virusVerdict: SESReceiptStatus;
|
|
83
|
-
spfVerdict: SESReceiptStatus;
|
|
84
|
-
dkimVerdict: SESReceiptStatus;
|
|
85
|
-
dmarcVerdict: SESReceiptStatus;
|
|
86
|
-
dmarcPolicy?: 'none' | 'quarantine' | 'reject';
|
|
87
|
-
action: SESReceiptS3Action | SESReceiptSnsAction | SESReceiptBounceAction | SESReceiptLambdaAction | SESReceiptStopAction | SESReceiptWorkMailAction;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface SESMessage {
|
|
91
|
-
mail: SESMail;
|
|
92
|
-
receipt: SESReceipt;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface SESEventRecord {
|
|
96
|
-
eventSource: string;
|
|
97
|
-
eventVersion: string;
|
|
98
|
-
ses: SESMessage;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface SESEvent {
|
|
102
|
-
Records: SESEventRecord[];
|
|
103
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type SNSHandler = Handler<SNSEvent, void>;
|
|
4
|
-
|
|
5
|
-
// SNS "event"
|
|
6
|
-
export interface SNSMessageAttribute {
|
|
7
|
-
Type: string;
|
|
8
|
-
Value: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface SNSMessageAttributes {
|
|
12
|
-
[name: string]: SNSMessageAttribute;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface SNSMessage {
|
|
16
|
-
SignatureVersion: string;
|
|
17
|
-
Timestamp: string;
|
|
18
|
-
Signature: string;
|
|
19
|
-
SigningCertUrl: string;
|
|
20
|
-
MessageId: string;
|
|
21
|
-
Message: string;
|
|
22
|
-
MessageAttributes: SNSMessageAttributes;
|
|
23
|
-
Type: string;
|
|
24
|
-
UnsubscribeUrl: string;
|
|
25
|
-
TopicArn: string;
|
|
26
|
-
Subject: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface SNSEventRecord {
|
|
30
|
-
EventVersion: string;
|
|
31
|
-
EventSubscriptionArn: string;
|
|
32
|
-
EventSource: string;
|
|
33
|
-
Sns: SNSMessage;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface SNSEvent {
|
|
37
|
-
Records: SNSEventRecord[];
|
|
38
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Handler } from "../handler";
|
|
2
|
-
|
|
3
|
-
export type SQSHandler = Handler<SQSEvent, void>;
|
|
4
|
-
|
|
5
|
-
// SQS
|
|
6
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html#supported-event-source-sqs
|
|
7
|
-
export interface SQSRecord {
|
|
8
|
-
messageId: string;
|
|
9
|
-
receiptHandle: string;
|
|
10
|
-
body: string;
|
|
11
|
-
attributes: SQSRecordAttributes;
|
|
12
|
-
messageAttributes: SQSMessageAttributes;
|
|
13
|
-
md5OfBody: string;
|
|
14
|
-
eventSource: string;
|
|
15
|
-
eventSourceARN: string;
|
|
16
|
-
awsRegion: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface SQSEvent {
|
|
20
|
-
Records: SQSRecord[];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface SQSRecordAttributes {
|
|
24
|
-
AWSTraceHeader?: string;
|
|
25
|
-
ApproximateReceiveCount: string;
|
|
26
|
-
SentTimestamp: string;
|
|
27
|
-
SenderId: string;
|
|
28
|
-
ApproximateFirstReceiveTimestamp: string;
|
|
29
|
-
SequenceNumber?: string;
|
|
30
|
-
MessageGroupId?: string;
|
|
31
|
-
MessageDeduplicationId?: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type SQSMessageAttributeDataType = 'String' | 'Number' | 'Binary' | string;
|
|
35
|
-
|
|
36
|
-
export interface SQSMessageAttribute {
|
|
37
|
-
stringValue?: string;
|
|
38
|
-
binaryValue?: string;
|
|
39
|
-
stringListValues: never[]; // Not implemented. Reserved for future use.
|
|
40
|
-
binaryListValues: never[]; // Not implemented. Reserved for future use.
|
|
41
|
-
dataType: SQSMessageAttributeDataType;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface SQSMessageAttributes {
|
|
45
|
-
[name: string]: SQSMessageAttribute;
|
|
46
|
-
}
|