@aligent/cdk-prerender-proxy 0.2.5-experimental1 → 0.2.5-experimental2

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.
Files changed (201) hide show
  1. package/lib/error-response-construct.d.ts +0 -1
  2. package/lib/error-response-construct.js +4 -5
  3. package/lib/handlers/cache-control.ts +21 -0
  4. package/lib/handlers/error-response.ts +51 -0
  5. package/lib/handlers/node_modules/.package-lock.json +55 -0
  6. package/lib/handlers/node_modules/@types/aws-lambda/LICENSE +21 -0
  7. package/lib/handlers/node_modules/@types/aws-lambda/README.md +16 -0
  8. package/lib/handlers/node_modules/@types/aws-lambda/common/api-gateway.d.ts +79 -0
  9. package/lib/handlers/node_modules/@types/aws-lambda/common/cloudfront.d.ts +79 -0
  10. package/lib/handlers/node_modules/@types/aws-lambda/handler.d.ts +171 -0
  11. package/lib/handlers/node_modules/@types/aws-lambda/index.d.ts +85 -0
  12. package/lib/handlers/node_modules/@types/aws-lambda/package.json +210 -0
  13. package/lib/handlers/node_modules/@types/aws-lambda/trigger/alb.d.ts +48 -0
  14. package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts +174 -0
  15. package/lib/handlers/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +187 -0
  16. package/lib/handlers/node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts +51 -0
  17. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts +68 -0
  18. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts +20 -0
  19. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts +21 -0
  20. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts +8 -0
  21. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts +37 -0
  22. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts +104 -0
  23. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts +31 -0
  24. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts +32 -0
  25. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts +23 -0
  26. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts +11 -0
  27. package/lib/handlers/node_modules/@types/aws-lambda/trigger/codepipeline.d.ts +55 -0
  28. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts +41 -0
  29. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts +22 -0
  30. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts +86 -0
  31. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts +44 -0
  32. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts +21 -0
  33. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts +119 -0
  34. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts +15 -0
  35. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts +22 -0
  36. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts +15 -0
  37. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts +31 -0
  38. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts +45 -0
  39. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts +39 -0
  40. package/lib/handlers/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts +20 -0
  41. package/lib/handlers/node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts +65 -0
  42. package/lib/handlers/node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts +45 -0
  43. package/lib/handlers/node_modules/@types/aws-lambda/trigger/eventbridge.d.ts +18 -0
  44. package/lib/handlers/node_modules/@types/aws-lambda/trigger/iot.d.ts +28 -0
  45. package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts +45 -0
  46. package/lib/handlers/node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts +28 -0
  47. package/lib/handlers/node_modules/@types/aws-lambda/trigger/lex.d.ts +116 -0
  48. package/lib/handlers/node_modules/@types/aws-lambda/trigger/msk.d.ts +21 -0
  49. package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3-batch.d.ts +41 -0
  50. package/lib/handlers/node_modules/@types/aws-lambda/trigger/s3.d.ts +60 -0
  51. package/lib/handlers/node_modules/@types/aws-lambda/trigger/ses.d.ts +103 -0
  52. package/lib/handlers/node_modules/@types/aws-lambda/trigger/sns.d.ts +38 -0
  53. package/lib/handlers/node_modules/@types/aws-lambda/trigger/sqs.d.ts +46 -0
  54. package/lib/handlers/node_modules/@types/node/LICENSE +21 -0
  55. package/lib/handlers/node_modules/@types/node/README.md +16 -0
  56. package/lib/handlers/node_modules/@types/node/assert/strict.d.ts +4 -0
  57. package/lib/handlers/node_modules/@types/node/assert.d.ts +124 -0
  58. package/lib/handlers/node_modules/@types/node/async_hooks.d.ts +226 -0
  59. package/lib/handlers/node_modules/@types/node/base.d.ts +19 -0
  60. package/lib/handlers/node_modules/@types/node/buffer.d.ts +84 -0
  61. package/lib/handlers/node_modules/@types/node/child_process.d.ts +526 -0
  62. package/lib/handlers/node_modules/@types/node/cluster.d.ts +262 -0
  63. package/lib/handlers/node_modules/@types/node/console.d.ts +133 -0
  64. package/lib/handlers/node_modules/@types/node/constants.d.ts +13 -0
  65. package/lib/handlers/node_modules/@types/node/crypto.d.ts +1580 -0
  66. package/lib/handlers/node_modules/@types/node/dgram.d.ts +141 -0
  67. package/lib/handlers/node_modules/@types/node/diagnostic_channel.d.ts +34 -0
  68. package/lib/handlers/node_modules/@types/node/dns/promises.d.ts +97 -0
  69. package/lib/handlers/node_modules/@types/node/dns.d.ts +322 -0
  70. package/lib/handlers/node_modules/@types/node/domain.d.ts +24 -0
  71. package/lib/handlers/node_modules/@types/node/events.d.ts +93 -0
  72. package/lib/handlers/node_modules/@types/node/fs/promises.d.ts +592 -0
  73. package/lib/handlers/node_modules/@types/node/fs.d.ts +2239 -0
  74. package/lib/handlers/node_modules/@types/node/globals.d.ts +655 -0
  75. package/lib/handlers/node_modules/@types/node/globals.global.d.ts +1 -0
  76. package/lib/handlers/node_modules/@types/node/http.d.ts +434 -0
  77. package/lib/handlers/node_modules/@types/node/http2.d.ts +976 -0
  78. package/lib/handlers/node_modules/@types/node/https.d.ts +36 -0
  79. package/lib/handlers/node_modules/@types/node/index.d.ts +58 -0
  80. package/lib/handlers/node_modules/@types/node/inspector.d.ts +3041 -0
  81. package/lib/handlers/node_modules/@types/node/module.d.ts +52 -0
  82. package/lib/handlers/node_modules/@types/node/net.d.ts +326 -0
  83. package/lib/handlers/node_modules/@types/node/os.d.ts +239 -0
  84. package/lib/handlers/node_modules/@types/node/package.json +232 -0
  85. package/lib/handlers/node_modules/@types/node/path.d.ts +163 -0
  86. package/lib/handlers/node_modules/@types/node/perf_hooks.d.ts +310 -0
  87. package/lib/handlers/node_modules/@types/node/process.d.ts +461 -0
  88. package/lib/handlers/node_modules/@types/node/punycode.d.ts +75 -0
  89. package/lib/handlers/node_modules/@types/node/querystring.d.ts +28 -0
  90. package/lib/handlers/node_modules/@types/node/readline.d.ts +192 -0
  91. package/lib/handlers/node_modules/@types/node/repl.d.ts +395 -0
  92. package/lib/handlers/node_modules/@types/node/stream/promises.d.ts +67 -0
  93. package/lib/handlers/node_modules/@types/node/stream.d.ts +471 -0
  94. package/lib/handlers/node_modules/@types/node/string_decoder.d.ts +7 -0
  95. package/lib/handlers/node_modules/@types/node/timers/promises.d.ts +21 -0
  96. package/lib/handlers/node_modules/@types/node/timers.d.ts +27 -0
  97. package/lib/handlers/node_modules/@types/node/tls.d.ts +793 -0
  98. package/lib/handlers/node_modules/@types/node/trace_events.d.ts +61 -0
  99. package/lib/handlers/node_modules/@types/node/ts3.6/assert.d.ts +98 -0
  100. package/lib/handlers/node_modules/@types/node/ts3.6/base.d.ts +68 -0
  101. package/lib/handlers/node_modules/@types/node/ts3.6/index.d.ts +7 -0
  102. package/lib/handlers/node_modules/@types/node/tty.d.ts +66 -0
  103. package/lib/handlers/node_modules/@types/node/url.d.ts +116 -0
  104. package/lib/handlers/node_modules/@types/node/util/types.d.ts +53 -0
  105. package/lib/handlers/node_modules/@types/node/util.d.ts +156 -0
  106. package/lib/handlers/node_modules/@types/node/v8.d.ts +198 -0
  107. package/lib/handlers/node_modules/@types/node/vm.d.ts +152 -0
  108. package/lib/handlers/node_modules/@types/node/wasi.d.ts +86 -0
  109. package/lib/handlers/node_modules/@types/node/worker_threads.d.ts +282 -0
  110. package/lib/handlers/node_modules/@types/node/zlib.d.ts +361 -0
  111. package/lib/handlers/node_modules/axios/CHANGELOG.md +685 -0
  112. package/lib/handlers/node_modules/axios/LICENSE +19 -0
  113. package/lib/handlers/node_modules/axios/README.md +800 -0
  114. package/lib/handlers/node_modules/axios/UPGRADE_GUIDE.md +162 -0
  115. package/lib/handlers/node_modules/axios/dist/axios.js +1756 -0
  116. package/lib/handlers/node_modules/axios/dist/axios.map +1 -0
  117. package/lib/handlers/node_modules/axios/dist/axios.min.js +3 -0
  118. package/lib/handlers/node_modules/axios/dist/axios.min.map +1 -0
  119. package/lib/handlers/node_modules/axios/index.d.ts +161 -0
  120. package/lib/handlers/node_modules/axios/index.js +1 -0
  121. package/lib/handlers/node_modules/axios/lib/adapters/README.md +37 -0
  122. package/lib/handlers/node_modules/axios/lib/adapters/http.js +303 -0
  123. package/lib/handlers/node_modules/axios/lib/adapters/xhr.js +179 -0
  124. package/lib/handlers/node_modules/axios/lib/axios.js +56 -0
  125. package/lib/handlers/node_modules/axios/lib/cancel/Cancel.js +19 -0
  126. package/lib/handlers/node_modules/axios/lib/cancel/CancelToken.js +57 -0
  127. package/lib/handlers/node_modules/axios/lib/cancel/isCancel.js +5 -0
  128. package/lib/handlers/node_modules/axios/lib/core/Axios.js +95 -0
  129. package/lib/handlers/node_modules/axios/lib/core/InterceptorManager.js +52 -0
  130. package/lib/handlers/node_modules/axios/lib/core/README.md +7 -0
  131. package/lib/handlers/node_modules/axios/lib/core/buildFullPath.js +20 -0
  132. package/lib/handlers/node_modules/axios/lib/core/createError.js +18 -0
  133. package/lib/handlers/node_modules/axios/lib/core/dispatchRequest.js +79 -0
  134. package/lib/handlers/node_modules/axios/lib/core/enhanceError.js +42 -0
  135. package/lib/handlers/node_modules/axios/lib/core/mergeConfig.js +87 -0
  136. package/lib/handlers/node_modules/axios/lib/core/settle.js +25 -0
  137. package/lib/handlers/node_modules/axios/lib/core/transformData.js +20 -0
  138. package/lib/handlers/node_modules/axios/lib/defaults.js +98 -0
  139. package/lib/handlers/node_modules/axios/lib/helpers/README.md +7 -0
  140. package/lib/handlers/node_modules/axios/lib/helpers/bind.js +11 -0
  141. package/lib/handlers/node_modules/axios/lib/helpers/buildURL.js +70 -0
  142. package/lib/handlers/node_modules/axios/lib/helpers/combineURLs.js +14 -0
  143. package/lib/handlers/node_modules/axios/lib/helpers/cookies.js +53 -0
  144. package/lib/handlers/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
  145. package/lib/handlers/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
  146. package/lib/handlers/node_modules/axios/lib/helpers/isAxiosError.js +11 -0
  147. package/lib/handlers/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
  148. package/lib/handlers/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
  149. package/lib/handlers/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
  150. package/lib/handlers/node_modules/axios/lib/helpers/spread.js +27 -0
  151. package/lib/handlers/node_modules/axios/lib/utils.js +351 -0
  152. package/lib/handlers/node_modules/axios/package.json +86 -0
  153. package/lib/handlers/node_modules/buffer-from/LICENSE +21 -0
  154. package/lib/handlers/node_modules/buffer-from/index.js +69 -0
  155. package/lib/handlers/node_modules/buffer-from/package.json +19 -0
  156. package/lib/handlers/node_modules/buffer-from/readme.md +69 -0
  157. package/lib/handlers/node_modules/follow-redirects/LICENSE +18 -0
  158. package/lib/handlers/node_modules/follow-redirects/README.md +148 -0
  159. package/lib/handlers/node_modules/follow-redirects/debug.js +14 -0
  160. package/lib/handlers/node_modules/follow-redirects/http.js +1 -0
  161. package/lib/handlers/node_modules/follow-redirects/https.js +1 -0
  162. package/lib/handlers/node_modules/follow-redirects/index.js +531 -0
  163. package/lib/handlers/node_modules/follow-redirects/package.json +59 -0
  164. package/lib/handlers/node_modules/source-map/CHANGELOG.md +301 -0
  165. package/lib/handlers/node_modules/source-map/LICENSE +28 -0
  166. package/lib/handlers/node_modules/source-map/README.md +742 -0
  167. package/lib/handlers/node_modules/source-map/dist/source-map.debug.js +3234 -0
  168. package/lib/handlers/node_modules/source-map/dist/source-map.js +3233 -0
  169. package/lib/handlers/node_modules/source-map/dist/source-map.min.js +2 -0
  170. package/lib/handlers/node_modules/source-map/dist/source-map.min.js.map +1 -0
  171. package/lib/handlers/node_modules/source-map/lib/array-set.js +121 -0
  172. package/lib/handlers/node_modules/source-map/lib/base64-vlq.js +140 -0
  173. package/lib/handlers/node_modules/source-map/lib/base64.js +67 -0
  174. package/lib/handlers/node_modules/source-map/lib/binary-search.js +111 -0
  175. package/lib/handlers/node_modules/source-map/lib/mapping-list.js +79 -0
  176. package/lib/handlers/node_modules/source-map/lib/quick-sort.js +114 -0
  177. package/lib/handlers/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  178. package/lib/handlers/node_modules/source-map/lib/source-map-generator.js +425 -0
  179. package/lib/handlers/node_modules/source-map/lib/source-node.js +413 -0
  180. package/lib/handlers/node_modules/source-map/lib/util.js +488 -0
  181. package/lib/handlers/node_modules/source-map/package.json +73 -0
  182. package/lib/handlers/node_modules/source-map/source-map.d.ts +98 -0
  183. package/lib/handlers/node_modules/source-map/source-map.js +8 -0
  184. package/lib/handlers/node_modules/source-map-support/LICENSE.md +21 -0
  185. package/lib/handlers/node_modules/source-map-support/README.md +284 -0
  186. package/lib/handlers/node_modules/source-map-support/browser-source-map-support.js +114 -0
  187. package/lib/handlers/node_modules/source-map-support/package.json +31 -0
  188. package/lib/handlers/node_modules/source-map-support/register.js +1 -0
  189. package/lib/handlers/node_modules/source-map-support/source-map-support.js +604 -0
  190. package/lib/handlers/package-lock.json +108 -0
  191. package/lib/handlers/package.json +13 -0
  192. package/lib/handlers/prerender-check.ts +27 -0
  193. package/lib/handlers/prerender.ts +43 -0
  194. package/lib/handlers/tsconfig.json +24 -0
  195. package/lib/prerender-cf-cache-control-construct.d.ts +0 -1
  196. package/lib/prerender-cf-cache-control-construct.js +4 -5
  197. package/lib/prerender-check-construct.d.ts +0 -1
  198. package/lib/prerender-check-construct.js +4 -5
  199. package/lib/prerender-construct.d.ts +0 -1
  200. package/lib/prerender-construct.js +4 -5
  201. package/package.json +3 -3
@@ -0,0 +1,21 @@
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
+ }
@@ -0,0 +1,41 @@
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
+ }
@@ -0,0 +1,60 @@
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
@@ -0,0 +1,103 @@
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
+ }
@@ -0,0 +1,38 @@
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
+ }
@@ -0,0 +1,46 @@
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
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,16 @@
1
+ # Installation
2
+ > `npm install --save @types/node`
3
+
4
+ # Summary
5
+ This package contains type definitions for Node.js (http://nodejs.org/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
+
10
+ ### Additional Details
11
+ * Last updated: Fri, 18 Jun 2021 21:01:11 GMT
12
+ * Dependencies: none
13
+ * Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
+
15
+ # Credits
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
@@ -0,0 +1,4 @@
1
+ declare module 'assert/strict' {
2
+ import { strict } from 'assert';
3
+ export = strict;
4
+ }
@@ -0,0 +1,124 @@
1
+ declare module 'assert' {
2
+ /** An alias of `assert.ok()`. */
3
+ function assert(value: any, message?: string | Error): asserts value;
4
+ namespace assert {
5
+ class AssertionError extends Error {
6
+ actual: any;
7
+ expected: any;
8
+ operator: string;
9
+ generatedMessage: boolean;
10
+ code: 'ERR_ASSERTION';
11
+
12
+ constructor(options?: {
13
+ /** If provided, the error message is set to this value. */
14
+ message?: string;
15
+ /** The `actual` property on the error instance. */
16
+ actual?: any;
17
+ /** The `expected` property on the error instance. */
18
+ expected?: any;
19
+ /** The `operator` property on the error instance. */
20
+ operator?: string;
21
+ /** If provided, the generated stack trace omits frames before this function. */
22
+ // tslint:disable-next-line:ban-types
23
+ stackStartFn?: Function;
24
+ });
25
+ }
26
+
27
+ class CallTracker {
28
+ calls(exact?: number): () => void;
29
+ calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
30
+ report(): CallTrackerReportInformation[];
31
+ verify(): void;
32
+ }
33
+ interface CallTrackerReportInformation {
34
+ message: string;
35
+ /** The actual number of times the function was called. */
36
+ actual: number;
37
+ /** The number of times the function was expected to be called. */
38
+ expected: number;
39
+ /** The name of the function that is wrapped. */
40
+ operator: string;
41
+ /** A stack trace of the function. */
42
+ stack: object;
43
+ }
44
+
45
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
46
+
47
+ function fail(message?: string | Error): never;
48
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
49
+ function fail(
50
+ actual: any,
51
+ expected: any,
52
+ message?: string | Error,
53
+ operator?: string,
54
+ // tslint:disable-next-line:ban-types
55
+ stackStartFn?: Function,
56
+ ): never;
57
+ function ok(value: any, message?: string | Error): asserts value;
58
+ /** @deprecated since v9.9.0 - use strictEqual() instead. */
59
+ function equal(actual: any, expected: any, message?: string | Error): void;
60
+ /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
61
+ function notEqual(actual: any, expected: any, message?: string | Error): void;
62
+ /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
63
+ function deepEqual(actual: any, expected: any, message?: string | Error): void;
64
+ /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
65
+ function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
66
+ function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
67
+ function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
68
+ function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
69
+ function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
70
+
71
+ function throws(block: () => any, message?: string | Error): void;
72
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
73
+ function doesNotThrow(block: () => any, message?: string | Error): void;
74
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
75
+
76
+ function ifError(value: any): asserts value is null | undefined;
77
+
78
+ function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
79
+ function rejects(
80
+ block: (() => Promise<any>) | Promise<any>,
81
+ error: AssertPredicate,
82
+ message?: string | Error,
83
+ ): Promise<void>;
84
+ function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
85
+ function doesNotReject(
86
+ block: (() => Promise<any>) | Promise<any>,
87
+ error: AssertPredicate,
88
+ message?: string | Error,
89
+ ): Promise<void>;
90
+
91
+ function match(value: string, regExp: RegExp, message?: string | Error): void;
92
+ function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
93
+
94
+ const strict: Omit<
95
+ typeof assert,
96
+ | 'equal'
97
+ | 'notEqual'
98
+ | 'deepEqual'
99
+ | 'notDeepEqual'
100
+ | 'ok'
101
+ | 'strictEqual'
102
+ | 'deepStrictEqual'
103
+ | 'ifError'
104
+ | 'strict'
105
+ > & {
106
+ (value: any, message?: string | Error): asserts value;
107
+ equal: typeof strictEqual;
108
+ notEqual: typeof notStrictEqual;
109
+ deepEqual: typeof deepStrictEqual;
110
+ notDeepEqual: typeof notDeepStrictEqual;
111
+
112
+ // Mapped types and assertion functions are incompatible?
113
+ // TS2775: Assertions require every name in the call target
114
+ // to be declared with an explicit type annotation.
115
+ ok: typeof ok;
116
+ strictEqual: typeof strictEqual;
117
+ deepStrictEqual: typeof deepStrictEqual;
118
+ ifError: typeof ifError;
119
+ strict: typeof strict;
120
+ };
121
+ }
122
+
123
+ export = assert;
124
+ }