@vercube/serverless 1.2.1 → 1.2.2
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.
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { t as ServerlessHandler } from "../../ServerlessTypes-Cd7MovwR.mjs";
|
|
2
2
|
import { App } from "@vercube/core";
|
|
3
3
|
import { Writable } from "node:stream";
|
|
4
|
-
//#
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/common/api-gateway.d.ts
|
|
6
|
+
// Types shared between trigger/api-gateway-authorizer.d.ts and api-gateway-proxy.d.ts
|
|
7
|
+
// Poorly documented, but API Gateway will just fail internally if
|
|
8
|
+
// the context type does not match this.
|
|
9
|
+
// Note that although non-string types will be accepted, they will be
|
|
10
|
+
// coerced to strings on the other side.
|
|
11
|
+
interface APIGatewayAuthorizerResultContext {
|
|
12
|
+
[name: string]: string | number | boolean | null | undefined;
|
|
13
|
+
}
|
|
5
14
|
// Default authorizer type, prefer using a specific type with the "...WithAuthorizer..." variant types.
|
|
6
15
|
// Note that this doesn't have to be a context from a custom lambda outhorizer, AWS also has a cognito
|
|
7
16
|
// authorizer type and could add more, so the property won't always be a string.
|
|
8
17
|
type APIGatewayEventDefaultAuthorizerContext = undefined | null | {
|
|
9
18
|
[name: string]: any;
|
|
10
19
|
};
|
|
20
|
+
type APIGatewayEventRequestContext = APIGatewayEventRequestContextWithAuthorizer<APIGatewayEventDefaultAuthorizerContext>;
|
|
11
21
|
// The requestContext property of both request authorizer and proxy integration events.
|
|
12
22
|
interface APIGatewayEventRequestContextWithAuthorizer<TAuthorizerContext> {
|
|
13
23
|
accountId: string;
|
|
@@ -68,7 +78,339 @@ interface APIGatewayEventIdentity {
|
|
|
68
78
|
vpceId?: string | undefined;
|
|
69
79
|
}
|
|
70
80
|
//#endregion
|
|
71
|
-
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.
|
|
81
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/common/cloudfront.d.ts
|
|
82
|
+
/**
|
|
83
|
+
* CloudFront events
|
|
84
|
+
* http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html
|
|
85
|
+
* Bear in mind that the "example" event structure in the page above includes
|
|
86
|
+
* both an S3 and a Custom origin, which is not strictly allowed. Only one
|
|
87
|
+
* of these per event may be present.
|
|
88
|
+
*/
|
|
89
|
+
interface CloudFrontHeaders {
|
|
90
|
+
[name: string]: Array<{
|
|
91
|
+
key?: string | undefined;
|
|
92
|
+
value: string;
|
|
93
|
+
}>;
|
|
94
|
+
}
|
|
95
|
+
type CloudFrontOrigin = {
|
|
96
|
+
s3: CloudFrontS3Origin;
|
|
97
|
+
custom?: never | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
custom: CloudFrontCustomOrigin;
|
|
100
|
+
s3?: never | undefined;
|
|
101
|
+
};
|
|
102
|
+
interface CloudFrontCustomOrigin {
|
|
103
|
+
customHeaders: CloudFrontHeaders;
|
|
104
|
+
domainName: string;
|
|
105
|
+
keepaliveTimeout: number;
|
|
106
|
+
path: string;
|
|
107
|
+
port: number;
|
|
108
|
+
protocol: "http" | "https";
|
|
109
|
+
readTimeout: number;
|
|
110
|
+
sslProtocols: string[];
|
|
111
|
+
}
|
|
112
|
+
type CloudFrontS3Origin = CloudFrontS3OriginAuthMethodNone | CloudFrontS3OriginAuthMethodOriginAccessIdentity;
|
|
113
|
+
interface CloudFrontS3OriginBase {
|
|
114
|
+
authMethod: "origin-access-identity" | "none";
|
|
115
|
+
customHeaders: CloudFrontHeaders;
|
|
116
|
+
domainName: string;
|
|
117
|
+
path: string;
|
|
118
|
+
}
|
|
119
|
+
interface CloudFrontS3OriginAuthMethodNone extends CloudFrontS3OriginBase {
|
|
120
|
+
authMethod: "none";
|
|
121
|
+
region?: never;
|
|
122
|
+
}
|
|
123
|
+
interface CloudFrontS3OriginAuthMethodOriginAccessIdentity extends CloudFrontS3OriginBase {
|
|
124
|
+
authMethod: "origin-access-identity";
|
|
125
|
+
region: string;
|
|
126
|
+
}
|
|
127
|
+
interface CloudFrontResponse {
|
|
128
|
+
status: string;
|
|
129
|
+
statusDescription: string;
|
|
130
|
+
headers: CloudFrontHeaders;
|
|
131
|
+
}
|
|
132
|
+
interface CloudFrontRequest {
|
|
133
|
+
body?: {
|
|
134
|
+
action: "read-only" | "replace";
|
|
135
|
+
data: string;
|
|
136
|
+
encoding: "base64" | "text";
|
|
137
|
+
readonly inputTruncated: boolean;
|
|
138
|
+
} | undefined;
|
|
139
|
+
readonly clientIp: string;
|
|
140
|
+
readonly method: string;
|
|
141
|
+
uri: string;
|
|
142
|
+
querystring: string;
|
|
143
|
+
headers: CloudFrontHeaders;
|
|
144
|
+
origin?: CloudFrontOrigin | undefined;
|
|
145
|
+
}
|
|
146
|
+
interface CloudFrontEvent {
|
|
147
|
+
config: {
|
|
148
|
+
readonly distributionDomainName: string;
|
|
149
|
+
readonly distributionId: string;
|
|
150
|
+
readonly eventType: "origin-request" | "origin-response" | "viewer-request" | "viewer-response";
|
|
151
|
+
readonly requestId: string;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Generated HTTP response in viewer request event or origin request event
|
|
156
|
+
*
|
|
157
|
+
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-generating-http-responses-in-requests.html#lambda-generating-http-responses-object
|
|
158
|
+
*/
|
|
159
|
+
interface CloudFrontResultResponse {
|
|
160
|
+
status: string;
|
|
161
|
+
statusDescription?: string | undefined;
|
|
162
|
+
headers?: CloudFrontHeaders | undefined;
|
|
163
|
+
bodyEncoding?: "text" | "base64" | undefined;
|
|
164
|
+
body?: string | undefined;
|
|
165
|
+
}
|
|
166
|
+
/** @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html#functions-event-structure-query-header-cookie */
|
|
167
|
+
interface CloudFrontFunctionsCookies {
|
|
168
|
+
[key: string]: {
|
|
169
|
+
value: string;
|
|
170
|
+
attributes?: string;
|
|
171
|
+
multiValue?: Array<{
|
|
172
|
+
value: string;
|
|
173
|
+
attributes?: string;
|
|
174
|
+
}>;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/** @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html#functions-event-structure-query-header-cookie */
|
|
178
|
+
interface CloudFrontFunctionsQuerystring {
|
|
179
|
+
[key: string]: {
|
|
180
|
+
value: string;
|
|
181
|
+
multiValue?: Array<{
|
|
182
|
+
value: string;
|
|
183
|
+
}>;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/** @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html#functions-event-structure-query-header-cookie */
|
|
187
|
+
interface CloudFrontFunctionsHeaders {
|
|
188
|
+
[key: string]: {
|
|
189
|
+
value: string;
|
|
190
|
+
multiValue?: Array<{
|
|
191
|
+
value: string;
|
|
192
|
+
}>;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html
|
|
197
|
+
*
|
|
198
|
+
* @usage
|
|
199
|
+
* ```ts
|
|
200
|
+
* export const handler = async (event: CloudFrontFunctionsEvent) => {
|
|
201
|
+
* var response = event.response;
|
|
202
|
+
* var headers = response.headers;
|
|
203
|
+
* // Set the cache-control header
|
|
204
|
+
* headers["cache-control"] = { value: "public,max-age=31536000,immutable" };
|
|
205
|
+
* // Return response to viewers
|
|
206
|
+
* return response
|
|
207
|
+
* };
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
interface CloudFrontFunctionsEvent {
|
|
211
|
+
/**
|
|
212
|
+
* ## Version field
|
|
213
|
+
* The version field contains a string that specifies the version of the
|
|
214
|
+
* CloudFront Functions event object. The current version is 1.0.
|
|
215
|
+
*/
|
|
216
|
+
version: string;
|
|
217
|
+
/**
|
|
218
|
+
* ## Context object
|
|
219
|
+
* The `context` object contains contextual information about the event. It includes the following fields:
|
|
220
|
+
* - `distributionDomainName`
|
|
221
|
+
* - `distributionId`
|
|
222
|
+
* - `eventType`
|
|
223
|
+
* - `requestId`
|
|
224
|
+
*/
|
|
225
|
+
context: {
|
|
226
|
+
/** The CloudFront domain name (for example, d111111abcdef8.cloudfront.net) of the distribution that’s associated with the event. */
|
|
227
|
+
distributionDomainName: string;
|
|
228
|
+
/** The ID of the distribution (for example, EDFDVBD6EXAMPLE) that’s associated with the event. */
|
|
229
|
+
distributionId: string;
|
|
230
|
+
/** The event type, either `viewer-request` or `viewer-response`. */
|
|
231
|
+
eventType: "viewer-request" | "viewer-response";
|
|
232
|
+
/** A string that uniquely identifies a CloudFront request (and its associated response). */
|
|
233
|
+
requestId: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* ## Viewer object
|
|
237
|
+
* The `viewer` object contains an `ip` field whose value is the IP address of the viewer (client) that sent the request.
|
|
238
|
+
* If the viewer request came through an HTTP proxy or a load balancer, the value is the IP address of the proxy or load balancer.
|
|
239
|
+
*/
|
|
240
|
+
viewer: {
|
|
241
|
+
ip: string;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* ## Request object
|
|
245
|
+
* The `request` object contains a representation of a viewer-to-CloudFront HTTP request.
|
|
246
|
+
* In the `event` object that’s passed to your function, the `request` object represents the
|
|
247
|
+
* actual request that CloudFront received from the viewer.
|
|
248
|
+
*
|
|
249
|
+
* If your function code returns a `request` object to CloudFront, it must use this same structure.
|
|
250
|
+
*
|
|
251
|
+
* The `request` object contains the following fields:
|
|
252
|
+
* - `method`
|
|
253
|
+
* - `uri`
|
|
254
|
+
* - `querystring`
|
|
255
|
+
* - `headers`
|
|
256
|
+
* - `cookies`
|
|
257
|
+
*/
|
|
258
|
+
request: {
|
|
259
|
+
/** The HTTP method of the request. If your function code returns a `request`, it cannot modify this field. This is the only read-only field in the `request` object. */
|
|
260
|
+
method: string;
|
|
261
|
+
/**
|
|
262
|
+
* The relative path of the requested object. If your function modifies the `uri value, note the following:
|
|
263
|
+
* - The new `uri` value must begin with a forward slash (`/`)`.
|
|
264
|
+
* - When a function changes the `uri` value, it changes the object that the viewer is requesting.
|
|
265
|
+
* - When a function changes the `uri` value, it doesn’t change the cache behavior for the request or the origin that an origin request is sent to.
|
|
266
|
+
*/
|
|
267
|
+
uri: string;
|
|
268
|
+
/**
|
|
269
|
+
* An object that represents the query string in the request. If the request doesn’t include a query string,
|
|
270
|
+
* the `request` object still includes an empty `querystring` object.
|
|
271
|
+
*
|
|
272
|
+
* The `querystring` object contains one field for each query string parameter in the request.
|
|
273
|
+
* Query string parameter names are converted to lowercase.
|
|
274
|
+
*/
|
|
275
|
+
querystring: CloudFrontFunctionsQuerystring;
|
|
276
|
+
/**
|
|
277
|
+
* An object that represents the HTTP headers in the request. If the request contains any `Cookie` headers,
|
|
278
|
+
* those headers are not part of the `headers` object. Cookies are represented separately in the `cookies` object.
|
|
279
|
+
*
|
|
280
|
+
* The `headers` object contains one field for each header in the request. Header names are converted to lowercase.
|
|
281
|
+
*/
|
|
282
|
+
headers: CloudFrontFunctionsHeaders;
|
|
283
|
+
/**
|
|
284
|
+
* An object that represents the cookies in the request (`Cookie` headers).
|
|
285
|
+
*
|
|
286
|
+
* The `cookies` object contains one field for each cookie in the request. Cookie names are converted to lowercase.
|
|
287
|
+
*/
|
|
288
|
+
cookies: CloudFrontFunctionsCookies;
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* ## Response object
|
|
292
|
+
*
|
|
293
|
+
* The `response` object contains a representation of a CloudFront-to-viewer HTTP response.
|
|
294
|
+
* In the `event` object that’s passed to your function, the `response` object represents CloudFront’s actual response to a viewer request.
|
|
295
|
+
*
|
|
296
|
+
* If your function code returns a `response` object, it must use this same structure.
|
|
297
|
+
*
|
|
298
|
+
* The `response` object contains the following fields:
|
|
299
|
+
*/
|
|
300
|
+
response: {
|
|
301
|
+
/**
|
|
302
|
+
* The HTTP status code of the response. This value is an integer, not a string.
|
|
303
|
+
*
|
|
304
|
+
* If the function is associated with a _viewer response_ event type, your function code cannot change
|
|
305
|
+
* the `statusCode` that it received. If the function is associated with a _viewer request_ event type
|
|
306
|
+
* and [generates an HTTP response](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html#function-code-generate-response),
|
|
307
|
+
* your function code can set the `statusCode`.
|
|
308
|
+
*/
|
|
309
|
+
statusCode: number;
|
|
310
|
+
/** The HTTP status description of the response. If your function code generates a response, this field is optional. */
|
|
311
|
+
statusDescription?: string;
|
|
312
|
+
/**
|
|
313
|
+
* An object that represents the HTTP headers in the response. If the response contains any `Set-Cookie` headers,
|
|
314
|
+
* those `headers` are not part of the headers object. Cookies are represented separately in the `cookies` object.
|
|
315
|
+
*
|
|
316
|
+
* The `headers` object contains one field for each header in the response. Header names are converted to lowercase.
|
|
317
|
+
*/
|
|
318
|
+
headers: CloudFrontFunctionsHeaders;
|
|
319
|
+
/**
|
|
320
|
+
* An object that represents the cookies in the response (`Set-Cookie` headers).
|
|
321
|
+
* The `cookies` object contains one field for each cookie in the response. Cookie names are converted to lowercase.
|
|
322
|
+
*/
|
|
323
|
+
cookies: CloudFrontFunctionsCookies;
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/handler.d.ts
|
|
328
|
+
/**
|
|
329
|
+
* The interface that AWS Lambda will invoke your handler with.
|
|
330
|
+
* There are more specialized types for many cases where AWS services
|
|
331
|
+
* invoke your lambda, but you can directly use this type for when you are invoking
|
|
332
|
+
* your lambda directly.
|
|
333
|
+
*
|
|
334
|
+
* See the {@link http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html AWS documentation}
|
|
335
|
+
* for more information about the runtime behavior, and the
|
|
336
|
+
* {@link https://aws.amazon.com/blogs/compute/node-js-8-10-runtime-now-available-in-aws-lambda/ AWS Blog post}
|
|
337
|
+
* introducing the async handler behavior in the 8.10 runtime.
|
|
338
|
+
*
|
|
339
|
+
* @example <caption>Defining a custom handler type</caption>
|
|
340
|
+
* import { Handler } from 'aws-lambda'
|
|
341
|
+
*
|
|
342
|
+
* interface NameEvent {
|
|
343
|
+
* fullName: string
|
|
344
|
+
* }
|
|
345
|
+
* interface NameResult {
|
|
346
|
+
* firstName: string
|
|
347
|
+
* middleNames: string
|
|
348
|
+
* lastName: string
|
|
349
|
+
* }
|
|
350
|
+
* type PersonHandler = Handler<NameEvent, NameResult>
|
|
351
|
+
*
|
|
352
|
+
* export const handler: PersonHandler = async (event) => {
|
|
353
|
+
* const names = event.fullName.split(' ')
|
|
354
|
+
* const firstName = names.shift()
|
|
355
|
+
* const lastName = names.pop()
|
|
356
|
+
* return { firstName, middleNames: names, lastName }
|
|
357
|
+
* }
|
|
358
|
+
*
|
|
359
|
+
* @example <caption>Logs the contents of the event object and returns the location of the logs</caption>
|
|
360
|
+
* import { Handler } from 'aws-lambda'
|
|
361
|
+
*
|
|
362
|
+
* export const handler: Handler = async (event, context) => {
|
|
363
|
+
* console.log("EVENT: \n" + JSON.stringify(event, null, 2))
|
|
364
|
+
* return context.logStreamName
|
|
365
|
+
* }
|
|
366
|
+
*
|
|
367
|
+
* @example <caption>AWS SDK with Async Function and Promises</caption>
|
|
368
|
+
* import { Handler } from 'aws-lambda'
|
|
369
|
+
* import AWS from 'aws-sdk'
|
|
370
|
+
*
|
|
371
|
+
* const s3 = new AWS.S3()
|
|
372
|
+
*
|
|
373
|
+
* export const handler: Handler = async (event) => {
|
|
374
|
+
* const response = await s3.listBuckets().promise()
|
|
375
|
+
* return response?.Buckets.map((bucket) => bucket.Name)
|
|
376
|
+
* }
|
|
377
|
+
*
|
|
378
|
+
* @example <caption>HTTP Request with Callback</caption>
|
|
379
|
+
* import { Handler } from 'aws-lambda'
|
|
380
|
+
* import https from 'https'
|
|
381
|
+
*
|
|
382
|
+
* let url = "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"
|
|
383
|
+
*
|
|
384
|
+
* export const handler: Handler<void, number> = (event, context, callback) => {
|
|
385
|
+
* https.get(url, (res) => {
|
|
386
|
+
* callback(null, res.statusCode)
|
|
387
|
+
* }).on('error', (e) => {
|
|
388
|
+
* callback(Error(e))
|
|
389
|
+
* })
|
|
390
|
+
* }
|
|
391
|
+
*
|
|
392
|
+
* @param event
|
|
393
|
+
* Parsed JSON data in the lambda request payload. For an AWS service triggered
|
|
394
|
+
* lambda this should be in the format of a type ending in Event, for example the
|
|
395
|
+
* S3Handler receives an event of type S3Event.
|
|
396
|
+
* @param context
|
|
397
|
+
* Runtime contextual information of the current invocation, for example the caller
|
|
398
|
+
* identity, available memory and time remaining, legacy completion callbacks, and
|
|
399
|
+
* a mutable property controlling when the lambda execution completes.
|
|
400
|
+
* @param callback
|
|
401
|
+
* NodeJS-style completion callback that the AWS Lambda runtime will provide that can
|
|
402
|
+
* be used to provide the lambda result payload value, or any execution error. Can
|
|
403
|
+
* instead return a promise that resolves with the result payload value or rejects
|
|
404
|
+
* with the execution error.
|
|
405
|
+
* @return
|
|
406
|
+
* A promise that resolves with the lambda result payload value, or rejects with the
|
|
407
|
+
* execution error. Note that if you implement your handler as an async function,
|
|
408
|
+
* you will automatically return a promise that will resolve with a returned value,
|
|
409
|
+
* or reject with a thrown value.
|
|
410
|
+
*/
|
|
411
|
+
type Handler<TEvent = any, TResult = any> = (event: TEvent, context: Context, callback: Callback<TResult>
|
|
412
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
413
|
+
) => void | Promise<TResult>;
|
|
72
414
|
/**
|
|
73
415
|
* {@link Handler} context parameter.
|
|
74
416
|
* See {@link https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html AWS documentation}.
|
|
@@ -123,6 +465,27 @@ interface ClientContextEnv {
|
|
|
123
465
|
model: string;
|
|
124
466
|
locale: string;
|
|
125
467
|
}
|
|
468
|
+
/**
|
|
469
|
+
* NodeJS-style callback parameter for the {@link Handler} type.
|
|
470
|
+
* Can be used instead of returning a promise, see the
|
|
471
|
+
* {@link https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html AWS documentation}
|
|
472
|
+
* for the handler programming model.
|
|
473
|
+
*
|
|
474
|
+
* @param error
|
|
475
|
+
* Parameter to use to provide the error payload for a failed lambda execution.
|
|
476
|
+
* See {@link https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-mode-exceptions.html AWS documentation}
|
|
477
|
+
* for error handling.
|
|
478
|
+
* If an Error instance is passed, the error payload uses the `name` property as the `errorType`,
|
|
479
|
+
* the `message` property as the `errorMessage`, and parses the `stack` property string into
|
|
480
|
+
* the `trace` array.
|
|
481
|
+
* For other values, the `errorType` is `typeof value`, the `errorMessage` is `String(value)`, and
|
|
482
|
+
* `trace` is an empty array.
|
|
483
|
+
*
|
|
484
|
+
* @param result
|
|
485
|
+
* Parameter to use to provide the result payload for a successful lambda execution.
|
|
486
|
+
* Pass `null` or `undefined` for the `error` parameter to use this parameter.
|
|
487
|
+
*/
|
|
488
|
+
type Callback<TResult = any> = (error?: Error | string | null, result?: TResult) => void;
|
|
126
489
|
/**
|
|
127
490
|
* Interface for using response streaming from AWS Lambda.
|
|
128
491
|
* To indicate to the runtime that Lambda should stream your function’s responses, you must wrap your function handler with the `awslambda.streamifyResponse()` decorator.
|
|
@@ -206,12 +569,115 @@ declare global {
|
|
|
206
569
|
}
|
|
207
570
|
}
|
|
208
571
|
//#endregion
|
|
209
|
-
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.
|
|
572
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/alb.d.ts
|
|
573
|
+
type ALBHandler = Handler<ALBEvent, ALBResult>;
|
|
574
|
+
type ALBCallback = Callback<ALBResult>;
|
|
575
|
+
// https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html
|
|
576
|
+
interface ALBEventRequestContext {
|
|
577
|
+
elb: {
|
|
578
|
+
targetGroupArn: string;
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
interface ALBEventQueryStringParameters {
|
|
582
|
+
[name: string]: string | undefined;
|
|
583
|
+
}
|
|
584
|
+
interface ALBEventHeaders {
|
|
585
|
+
[name: string]: string | undefined;
|
|
586
|
+
}
|
|
587
|
+
interface ALBEventMultiValueHeaders {
|
|
588
|
+
[name: string]: string[] | undefined;
|
|
589
|
+
}
|
|
590
|
+
interface ALBEventMultiValueQueryStringParameters {
|
|
591
|
+
[name: string]: string[] | undefined;
|
|
592
|
+
}
|
|
593
|
+
interface ALBEvent {
|
|
594
|
+
requestContext: ALBEventRequestContext;
|
|
595
|
+
httpMethod: string;
|
|
596
|
+
path: string;
|
|
597
|
+
queryStringParameters?: ALBEventQueryStringParameters | undefined; // URL encoded
|
|
598
|
+
headers?: ALBEventHeaders | undefined;
|
|
599
|
+
multiValueQueryStringParameters?: ALBEventMultiValueQueryStringParameters | undefined; // URL encoded
|
|
600
|
+
multiValueHeaders?: ALBEventMultiValueHeaders | undefined;
|
|
601
|
+
body: string | null;
|
|
602
|
+
isBase64Encoded: boolean;
|
|
603
|
+
}
|
|
604
|
+
interface ALBResult {
|
|
605
|
+
statusCode: number;
|
|
606
|
+
statusDescription?: string | undefined;
|
|
607
|
+
headers?: {
|
|
608
|
+
[header: string]: boolean | number | string;
|
|
609
|
+
} | undefined;
|
|
610
|
+
multiValueHeaders?: {
|
|
611
|
+
[header: string]: Array<boolean | number | string>;
|
|
612
|
+
} | undefined;
|
|
613
|
+
body?: string | undefined;
|
|
614
|
+
isBase64Encoded?: boolean | undefined;
|
|
615
|
+
}
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts
|
|
618
|
+
/**
|
|
619
|
+
* Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
|
|
620
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
621
|
+
*/
|
|
622
|
+
type APIGatewayProxyHandler = Handler<APIGatewayProxyEvent, APIGatewayProxyResult>;
|
|
623
|
+
/**
|
|
624
|
+
* Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
|
|
625
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
626
|
+
*/
|
|
627
|
+
type APIGatewayProxyCallback = Callback<APIGatewayProxyResult>;
|
|
628
|
+
/**
|
|
629
|
+
* Works with HTTP API integration Payload Format version 2.0
|
|
630
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
631
|
+
*/
|
|
632
|
+
type APIGatewayProxyHandlerV2<T = never> = Handler<APIGatewayProxyEventV2, APIGatewayProxyResultV2<T>>;
|
|
633
|
+
/**
|
|
634
|
+
* Works with HTTP API integration Payload Format version 2.0
|
|
635
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-requests.html
|
|
636
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html
|
|
637
|
+
*/
|
|
638
|
+
type APIGatewayProxyWebsocketHandlerV2<T = never> = Handler<APIGatewayProxyWebsocketEventV2, APIGatewayProxyResultV2<T>>;
|
|
639
|
+
/**
|
|
640
|
+
* Works with HTTP API integration Payload Format version 2.0 adds JWT Authroizer to RequestContext
|
|
641
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
642
|
+
*/
|
|
643
|
+
type APIGatewayProxyHandlerV2WithJWTAuthorizer<T = never> = Handler<APIGatewayProxyEventV2WithJWTAuthorizer, APIGatewayProxyResultV2<T>>;
|
|
644
|
+
/**
|
|
645
|
+
* Works with HTTP API integration Payload Format version 2.0 adds Lambda Authroizer to RequestContext
|
|
646
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
647
|
+
*/
|
|
648
|
+
type APIGatewayProxyHandlerV2WithLambdaAuthorizer<TAuthorizerContext, T = never> = Handler<APIGatewayProxyEventV2WithLambdaAuthorizer<TAuthorizerContext>, APIGatewayProxyResultV2<T>>;
|
|
649
|
+
/**
|
|
650
|
+
* Works with HTTP API integration Payload Format version 2.0 adds IAM Authroizer to RequestContext
|
|
651
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
652
|
+
*/
|
|
653
|
+
type APIGatewayProxyHandlerV2WithIAMAuthorizer<T = never> = Handler<APIGatewayProxyEventV2WithIAMAuthorizer, APIGatewayProxyResultV2<T>>;
|
|
654
|
+
/**
|
|
655
|
+
* Works with HTTP API integration Payload Format version 2.0
|
|
656
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
657
|
+
*/
|
|
658
|
+
type APIGatewayProxyCallbackV2 = Callback<APIGatewayProxyResultV2>;
|
|
210
659
|
/**
|
|
211
660
|
* Works with Lambda Proxy Integration for Rest API or HTTP API integration Payload Format version 1.0
|
|
212
661
|
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
213
662
|
*/
|
|
214
663
|
type APIGatewayProxyEvent = APIGatewayProxyEventBase<APIGatewayEventDefaultAuthorizerContext>;
|
|
664
|
+
type APIGatewayProxyWithLambdaAuthorizerHandler<TAuthorizerContext> = Handler<APIGatewayProxyWithLambdaAuthorizerEvent<TAuthorizerContext>, APIGatewayProxyResult>;
|
|
665
|
+
type APIGatewayProxyWithCognitoAuthorizerHandler = Handler<APIGatewayProxyWithCognitoAuthorizerEvent, APIGatewayProxyResult>;
|
|
666
|
+
type APIGatewayProxyWithLambdaAuthorizerEvent<TAuthorizerContext> = APIGatewayProxyEventBase<APIGatewayEventLambdaAuthorizerContext<TAuthorizerContext>>;
|
|
667
|
+
type APIGatewayProxyWithLambdaAuthorizerEventRequestContext<TAuthorizerContext> = APIGatewayEventRequestContextWithAuthorizer<APIGatewayEventLambdaAuthorizerContext<TAuthorizerContext>>;
|
|
668
|
+
// API Gateway proxy integration mangles the context from a custom authorizer,
|
|
669
|
+
// converting all number or boolean properties to string, and adding some extra properties.
|
|
670
|
+
type APIGatewayEventLambdaAuthorizerContext<TAuthorizerContext> = { [P in keyof TAuthorizerContext]: TAuthorizerContext[P] extends null ? null : string; } & {
|
|
671
|
+
principalId: string;
|
|
672
|
+
integrationLatency: number;
|
|
673
|
+
};
|
|
674
|
+
type APIGatewayProxyWithCognitoAuthorizerEvent = APIGatewayProxyEventBase<APIGatewayProxyCognitoAuthorizer>;
|
|
675
|
+
// All claims are coerced into strings.
|
|
676
|
+
interface APIGatewayProxyCognitoAuthorizer {
|
|
677
|
+
claims: {
|
|
678
|
+
[name: string]: string;
|
|
679
|
+
};
|
|
680
|
+
}
|
|
215
681
|
interface APIGatewayProxyEventHeaders {
|
|
216
682
|
[name: string]: string | undefined;
|
|
217
683
|
}
|
|
@@ -284,6 +750,26 @@ interface APIGatewayEventRequestContextV2 {
|
|
|
284
750
|
time: string;
|
|
285
751
|
timeEpoch: number;
|
|
286
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* Works with Websocket API integration Payload Format version 2.0
|
|
755
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-requests.html
|
|
756
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-mapping-template-reference.html
|
|
757
|
+
*/
|
|
758
|
+
interface APIGatewayEventWebsocketRequestContextV2 {
|
|
759
|
+
routeKey: string;
|
|
760
|
+
messageId: string;
|
|
761
|
+
eventType: "CONNECT" | "MESSAGE" | "DISCONNECT";
|
|
762
|
+
extendedRequestId: string;
|
|
763
|
+
requestTime: string;
|
|
764
|
+
messageDirection: "IN";
|
|
765
|
+
stage: string;
|
|
766
|
+
connectedAt: number;
|
|
767
|
+
requestTimeEpoch: number;
|
|
768
|
+
requestId: string;
|
|
769
|
+
domainName: string;
|
|
770
|
+
connectionId: string;
|
|
771
|
+
apiId: string;
|
|
772
|
+
}
|
|
287
773
|
/**
|
|
288
774
|
* Proxy Event with adaptable requestContext for different authorizer scenarios
|
|
289
775
|
*/
|
|
@@ -301,10 +787,67 @@ interface APIGatewayProxyEventV2WithRequestContext<TRequestContext> {
|
|
|
301
787
|
isBase64Encoded: boolean;
|
|
302
788
|
stageVariables?: APIGatewayProxyEventStageVariables;
|
|
303
789
|
}
|
|
790
|
+
/**
|
|
791
|
+
* Proxy Websocket Event with adaptable requestContext for different authorizer scenarios
|
|
792
|
+
*/
|
|
793
|
+
interface APIGatewayProxyWebsocketEventV2WithRequestContext<TRequestContext> {
|
|
794
|
+
requestContext: TRequestContext;
|
|
795
|
+
body?: string;
|
|
796
|
+
isBase64Encoded: boolean;
|
|
797
|
+
stageVariables?: APIGatewayProxyEventStageVariables;
|
|
798
|
+
queryStringParameters?: APIGatewayProxyEventQueryStringParameters;
|
|
799
|
+
multiValueQueryStringParameters?: APIGatewayProxyEventMultiValueQueryStringParameters;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Lambda Authorizer Payload
|
|
803
|
+
*/
|
|
804
|
+
interface APIGatewayEventRequestContextLambdaAuthorizer<TAuthorizerContext> {
|
|
805
|
+
lambda: TAuthorizerContext;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* JWT Authorizer Payload
|
|
809
|
+
*/
|
|
810
|
+
interface APIGatewayEventRequestContextJWTAuthorizer {
|
|
811
|
+
principalId: string;
|
|
812
|
+
integrationLatency: number;
|
|
813
|
+
jwt: {
|
|
814
|
+
claims: {
|
|
815
|
+
[name: string]: string | number | boolean | string[];
|
|
816
|
+
};
|
|
817
|
+
scopes: string[] | null;
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* IAM Authorizer Payload
|
|
822
|
+
*/
|
|
823
|
+
interface APIGatewayEventRequestContextIAMAuthorizer {
|
|
824
|
+
iam: {
|
|
825
|
+
accessKey: string;
|
|
826
|
+
accountId: string;
|
|
827
|
+
callerId: string;
|
|
828
|
+
cognitoIdentity: null;
|
|
829
|
+
principalOrgId: string;
|
|
830
|
+
userArn: string;
|
|
831
|
+
userId: string;
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
type APIGatewayProxyEventV2WithJWTAuthorizer = APIGatewayProxyEventV2WithRequestContext<APIGatewayEventRequestContextV2WithAuthorizer<APIGatewayEventRequestContextJWTAuthorizer>>;
|
|
835
|
+
type APIGatewayProxyEventV2WithLambdaAuthorizer<TAuthorizerContext> = APIGatewayProxyEventV2WithRequestContext<APIGatewayEventRequestContextV2WithAuthorizer<APIGatewayEventRequestContextLambdaAuthorizer<TAuthorizerContext>>>;
|
|
836
|
+
/**
|
|
837
|
+
* Event type when invoking Lambda function URLs with IAM authorizer
|
|
838
|
+
*/
|
|
839
|
+
type APIGatewayProxyEventV2WithIAMAuthorizer = APIGatewayProxyEventV2WithRequestContext<APIGatewayEventRequestContextV2WithAuthorizer<APIGatewayEventRequestContextIAMAuthorizer>>;
|
|
840
|
+
interface APIGatewayEventRequestContextV2WithAuthorizer<TAuthorizer> extends APIGatewayEventRequestContextV2 {
|
|
841
|
+
authorizer: TAuthorizer;
|
|
842
|
+
}
|
|
304
843
|
/**
|
|
305
844
|
* Default Proxy event with no Authorizer
|
|
306
845
|
*/
|
|
307
846
|
type APIGatewayProxyEventV2 = APIGatewayProxyEventV2WithRequestContext<APIGatewayEventRequestContextV2>;
|
|
847
|
+
/**
|
|
848
|
+
* Default Websocket Proxy event with no Authorizer
|
|
849
|
+
*/
|
|
850
|
+
type APIGatewayProxyWebsocketEventV2 = APIGatewayProxyWebsocketEventV2WithRequestContext<APIGatewayEventWebsocketRequestContextV2>;
|
|
308
851
|
/**
|
|
309
852
|
* Works with HTTP API integration Payload Format version 2.0
|
|
310
853
|
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
@@ -324,33 +867,2838 @@ interface APIGatewayProxyStructuredResultV2 {
|
|
|
324
867
|
isBase64Encoded?: boolean | undefined;
|
|
325
868
|
cookies?: string[] | undefined;
|
|
326
869
|
}
|
|
870
|
+
// Legacy names
|
|
871
|
+
type ProxyHandler = APIGatewayProxyHandler;
|
|
872
|
+
type ProxyCallback = APIGatewayProxyCallback;
|
|
873
|
+
type APIGatewayEvent = APIGatewayProxyEvent;
|
|
874
|
+
type ProxyResult = APIGatewayProxyResult;
|
|
327
875
|
//#endregion
|
|
328
|
-
//#region
|
|
876
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts
|
|
877
|
+
type APIGatewayAuthorizerHandler = Handler<APIGatewayAuthorizerEvent, APIGatewayAuthorizerResult>;
|
|
878
|
+
type APIGatewayAuthorizerWithContextHandler<TAuthorizerContext extends APIGatewayAuthorizerResultContext> = Handler<APIGatewayAuthorizerEvent, APIGatewayAuthorizerWithContextResult<TAuthorizerContext>>;
|
|
879
|
+
type APIGatewayAuthorizerCallback = Callback<APIGatewayAuthorizerResult>;
|
|
880
|
+
type APIGatewayAuthorizerWithContextCallback<TAuthorizerContext extends APIGatewayAuthorizerResultContext> = Callback<APIGatewayAuthorizerWithContextResult<TAuthorizerContext>>;
|
|
881
|
+
type APIGatewayTokenAuthorizerHandler = Handler<APIGatewayTokenAuthorizerEvent, APIGatewayAuthorizerResult>;
|
|
882
|
+
type APIGatewayTokenAuthorizerWithContextHandler<TAuthorizerContext extends APIGatewayAuthorizerResultContext> = Handler<APIGatewayTokenAuthorizerEvent, APIGatewayAuthorizerWithContextResult<TAuthorizerContext>>;
|
|
883
|
+
type APIGatewayRequestAuthorizerHandler = Handler<APIGatewayRequestAuthorizerEvent, APIGatewayAuthorizerResult>;
|
|
884
|
+
type APIGatewayRequestAuthorizerWithContextHandler<TAuthorizerContext extends APIGatewayAuthorizerResultContext> = Handler<APIGatewayRequestAuthorizerEvent, APIGatewayAuthorizerWithContextResult<TAuthorizerContext>>;
|
|
885
|
+
type APIGatewayAuthorizerEvent = APIGatewayTokenAuthorizerEvent | APIGatewayRequestAuthorizerEvent;
|
|
886
|
+
interface APIGatewayTokenAuthorizerEvent {
|
|
887
|
+
type: "TOKEN";
|
|
888
|
+
methodArn: string;
|
|
889
|
+
authorizationToken: string;
|
|
890
|
+
}
|
|
891
|
+
interface APIGatewayRequestAuthorizerEventV2 {
|
|
892
|
+
version: string;
|
|
893
|
+
type: "REQUEST";
|
|
894
|
+
routeArn: string;
|
|
895
|
+
identitySource: string[];
|
|
896
|
+
routeKey: string;
|
|
897
|
+
rawPath: string;
|
|
898
|
+
rawQueryString: string;
|
|
899
|
+
cookies: string[];
|
|
900
|
+
headers?: APIGatewayRequestAuthorizerEventHeaders;
|
|
901
|
+
queryStringParameters?: APIGatewayRequestAuthorizerEventQueryStringParameters;
|
|
902
|
+
requestContext: APIGatewayEventRequestContextV2;
|
|
903
|
+
pathParameters?: APIGatewayRequestAuthorizerEventPathParameters;
|
|
904
|
+
stageVariables?: APIGatewayRequestAuthorizerEventStageVariables;
|
|
905
|
+
}
|
|
906
|
+
interface APIGatewayRequestAuthorizerEventHeaders {
|
|
907
|
+
[name: string]: string | undefined;
|
|
908
|
+
}
|
|
909
|
+
interface APIGatewayRequestAuthorizerEventMultiValueHeaders {
|
|
910
|
+
[name: string]: string[] | undefined;
|
|
911
|
+
}
|
|
912
|
+
interface APIGatewayRequestAuthorizerEventPathParameters {
|
|
913
|
+
[name: string]: string | undefined;
|
|
914
|
+
}
|
|
915
|
+
interface APIGatewayRequestAuthorizerEventQueryStringParameters {
|
|
916
|
+
[name: string]: string | undefined;
|
|
917
|
+
}
|
|
918
|
+
interface APIGatewayRequestAuthorizerEventMultiValueQueryStringParameters {
|
|
919
|
+
[name: string]: string[] | undefined;
|
|
920
|
+
}
|
|
921
|
+
interface APIGatewayRequestAuthorizerEventStageVariables {
|
|
922
|
+
[name: string]: string | undefined;
|
|
923
|
+
}
|
|
924
|
+
// Note, when invoked by the tester in the AWS web console, the map values can be null,
|
|
925
|
+
// but they will be empty objects in the real object.
|
|
926
|
+
// Worse, it will include "body" and "isBase64Encoded" properties, unlike the real call!
|
|
927
|
+
// See https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-input.html for the
|
|
928
|
+
// formal definition.
|
|
929
|
+
interface APIGatewayRequestAuthorizerEvent {
|
|
930
|
+
type: "REQUEST";
|
|
931
|
+
methodArn: string;
|
|
932
|
+
resource: string;
|
|
933
|
+
path: string;
|
|
934
|
+
httpMethod: string;
|
|
935
|
+
headers: APIGatewayRequestAuthorizerEventHeaders | null;
|
|
936
|
+
multiValueHeaders: APIGatewayRequestAuthorizerEventMultiValueHeaders | null;
|
|
937
|
+
pathParameters: APIGatewayRequestAuthorizerEventPathParameters | null;
|
|
938
|
+
queryStringParameters: APIGatewayRequestAuthorizerEventQueryStringParameters | null;
|
|
939
|
+
multiValueQueryStringParameters: APIGatewayRequestAuthorizerEventMultiValueQueryStringParameters | null;
|
|
940
|
+
stageVariables: APIGatewayRequestAuthorizerEventStageVariables | null;
|
|
941
|
+
requestContext: APIGatewayEventRequestContextWithAuthorizer<undefined>;
|
|
942
|
+
}
|
|
943
|
+
interface APIGatewayAuthorizerResult {
|
|
944
|
+
principalId: string;
|
|
945
|
+
policyDocument: PolicyDocument;
|
|
946
|
+
context?: APIGatewayAuthorizerResultContext | null | undefined;
|
|
947
|
+
usageIdentifierKey?: string | null | undefined;
|
|
948
|
+
}
|
|
949
|
+
// Separate type so the context property is required, without pulling complex type magic.
|
|
950
|
+
interface APIGatewayAuthorizerWithContextResult<TAuthorizerContext extends APIGatewayAuthorizerResultContext> {
|
|
951
|
+
principalId: string;
|
|
952
|
+
policyDocument: PolicyDocument;
|
|
953
|
+
context: TAuthorizerContext;
|
|
954
|
+
usageIdentifierKey?: string | null | undefined;
|
|
955
|
+
}
|
|
329
956
|
/**
|
|
330
|
-
*
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
957
|
+
* IAM Authorizer Types
|
|
958
|
+
*/
|
|
959
|
+
interface APIGatewayIAMAuthorizerResult {
|
|
960
|
+
principalId: string;
|
|
961
|
+
policyDocument: PolicyDocument;
|
|
962
|
+
context?: APIGatewayAuthorizerResultContext | null | undefined;
|
|
963
|
+
usageIdentifierKey?: string | null | undefined;
|
|
964
|
+
}
|
|
965
|
+
interface APIGatewayIAMAuthorizerWithContextResult<TAuthorizerContext extends APIGatewayAuthorizerResultContext> {
|
|
966
|
+
principalId: string;
|
|
967
|
+
policyDocument: PolicyDocument;
|
|
968
|
+
context: TAuthorizerContext;
|
|
969
|
+
usageIdentifierKey?: string | null | undefined;
|
|
970
|
+
}
|
|
971
|
+
type APIGatewayRequestIAMAuthorizerHandlerV2 = Handler<APIGatewayRequestAuthorizerEventV2, APIGatewayIAMAuthorizerResult>;
|
|
972
|
+
type APIGatewayRequestIAMAuthorizerV2WithContextHandler<TAuthorizerContext extends APIGatewayAuthorizerResultContext> = Handler<APIGatewayRequestAuthorizerEventV2, APIGatewayIAMAuthorizerWithContextResult<TAuthorizerContext>>;
|
|
973
|
+
/**
|
|
974
|
+
* Simple Lambda Authorizer Types V2 spec with simple response
|
|
975
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html
|
|
976
|
+
*/
|
|
977
|
+
interface APIGatewaySimpleAuthorizerResult {
|
|
978
|
+
isAuthorized: boolean;
|
|
979
|
+
}
|
|
980
|
+
interface APIGatewaySimpleAuthorizerWithContextResult<TAuthorizerContext> extends APIGatewaySimpleAuthorizerResult {
|
|
981
|
+
context: TAuthorizerContext;
|
|
982
|
+
}
|
|
983
|
+
type APIGatewayRequestSimpleAuthorizerHandlerV2 = Handler<APIGatewayRequestAuthorizerEventV2, APIGatewaySimpleAuthorizerResult>;
|
|
984
|
+
type APIGatewayRequestSimpleAuthorizerHandlerV2WithContext<TAuthorizerContext> = Handler<APIGatewayRequestAuthorizerEventV2, APIGatewaySimpleAuthorizerWithContextResult<TAuthorizerContext>>;
|
|
985
|
+
// Legacy event / names
|
|
986
|
+
/** @deprecated Use APIGatewayAuthorizerHandler or a subtype */
|
|
987
|
+
type CustomAuthorizerHandler = Handler<CustomAuthorizerEvent, APIGatewayAuthorizerResult>;
|
|
988
|
+
// This one is actually fine.
|
|
989
|
+
type CustomAuthorizerCallback = APIGatewayAuthorizerCallback;
|
|
990
|
+
/** @deprecated Use APIGatewayAuthorizerEvent or a subtype */
|
|
991
|
+
interface CustomAuthorizerEvent {
|
|
992
|
+
type: string;
|
|
993
|
+
methodArn: string;
|
|
994
|
+
authorizationToken?: string | undefined;
|
|
995
|
+
resource?: string | undefined;
|
|
996
|
+
path?: string | undefined;
|
|
997
|
+
httpMethod?: string | undefined;
|
|
998
|
+
headers?: {
|
|
999
|
+
[name: string]: string;
|
|
1000
|
+
} | undefined;
|
|
1001
|
+
multiValueHeaders?: {
|
|
1002
|
+
[name: string]: string[];
|
|
1003
|
+
} | undefined;
|
|
1004
|
+
pathParameters?: {
|
|
1005
|
+
[name: string]: string;
|
|
1006
|
+
} | null | undefined;
|
|
1007
|
+
queryStringParameters?: {
|
|
1008
|
+
[name: string]: string;
|
|
1009
|
+
} | null | undefined;
|
|
1010
|
+
multiValueQueryStringParameters?: {
|
|
1011
|
+
[name: string]: string[];
|
|
1012
|
+
} | null | undefined;
|
|
1013
|
+
stageVariables?: {
|
|
1014
|
+
[name: string]: string;
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
requestContext?: APIGatewayEventRequestContextWithAuthorizer<APIGatewayEventDefaultAuthorizerContext> | undefined;
|
|
1017
|
+
domainName?: string | undefined;
|
|
1018
|
+
apiId?: string | undefined;
|
|
1019
|
+
}
|
|
1020
|
+
type CustomAuthorizerResult = APIGatewayAuthorizerResult;
|
|
1021
|
+
type AuthResponse = APIGatewayAuthorizerResult;
|
|
1022
|
+
type AuthResponseContext = APIGatewayAuthorizerResultContext;
|
|
1023
|
+
/**
|
|
1024
|
+
* API Gateway CustomAuthorizer AuthResponse.PolicyDocument.
|
|
1025
|
+
* https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html
|
|
1026
|
+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition
|
|
1027
|
+
*/
|
|
1028
|
+
interface PolicyDocument {
|
|
1029
|
+
Version: string;
|
|
1030
|
+
Id?: string | undefined;
|
|
1031
|
+
Statement: Statement[];
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Condition.
|
|
1035
|
+
* https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-policy-language-overview.html
|
|
1036
|
+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html
|
|
1037
|
+
*/
|
|
1038
|
+
interface ConditionBlock {
|
|
1039
|
+
[condition: string]: Condition | Condition[];
|
|
1040
|
+
}
|
|
1041
|
+
interface Condition {
|
|
1042
|
+
[key: string]: string | string[];
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* API Gateway CustomAuthorizer AuthResponse.PolicyDocument.Statement.
|
|
1046
|
+
* https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-policy-language-overview.html
|
|
1047
|
+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html
|
|
1048
|
+
*/
|
|
1049
|
+
type Statement = BaseStatement & StatementAction & (StatementResource | StatementPrincipal);
|
|
1050
|
+
type StatementEffect = "Allow" | "Deny";
|
|
1051
|
+
interface BaseStatement {
|
|
1052
|
+
Effect: StatementEffect;
|
|
1053
|
+
Sid?: string | undefined;
|
|
1054
|
+
Condition?: ConditionBlock | undefined;
|
|
1055
|
+
}
|
|
1056
|
+
type PrincipalValue = {
|
|
1057
|
+
[key: string]: string | string[];
|
|
1058
|
+
} | string | string[];
|
|
1059
|
+
interface MaybeStatementPrincipal {
|
|
1060
|
+
Principal?: PrincipalValue | undefined;
|
|
1061
|
+
NotPrincipal?: PrincipalValue | undefined;
|
|
1062
|
+
}
|
|
1063
|
+
interface MaybeStatementResource {
|
|
1064
|
+
Resource?: string | string[] | undefined;
|
|
1065
|
+
NotResource?: string | string[] | undefined;
|
|
1066
|
+
}
|
|
1067
|
+
type StatementAction = {
|
|
1068
|
+
Action: string | string[];
|
|
1069
|
+
} | {
|
|
1070
|
+
NotAction: string | string[];
|
|
1071
|
+
};
|
|
1072
|
+
type StatementResource = MaybeStatementPrincipal & ({
|
|
1073
|
+
Resource: string | string[];
|
|
1074
|
+
} | {
|
|
1075
|
+
NotResource: string | string[];
|
|
1076
|
+
});
|
|
1077
|
+
type StatementPrincipal = MaybeStatementResource & ({
|
|
1078
|
+
Principal: PrincipalValue;
|
|
1079
|
+
} | {
|
|
1080
|
+
NotPrincipal: PrincipalValue;
|
|
1081
|
+
});
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts
|
|
1084
|
+
type AppSyncResolverHandler<TArguments, TResult, TSource = Record<string, any> | null> = Handler<AppSyncResolverEvent<TArguments, TSource>, TResult>;
|
|
1085
|
+
// https:docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html#advanced-use-case-batching
|
|
1086
|
+
type AppSyncBatchResolverHandler<TArguments, TResult, TSource = Record<string, any> | null> = Handler<Array<AppSyncResolverEvent<TArguments, TSource>>, TResult[]>;
|
|
1087
|
+
/**
|
|
1088
|
+
* @deprecated Use {@link AppSyncAuthorizerHandler}
|
|
1089
|
+
*/
|
|
1090
|
+
type AppSyncAuthorizerHander<TResolverContext = undefined> = AppSyncAuthorizerHandler<TResolverContext>;
|
|
1091
|
+
/**
|
|
1092
|
+
* See https://docs.aws.amazon.com/appsync/latest/devguide/security-authz.html#aws-lambda-authorization
|
|
346
1093
|
*
|
|
347
|
-
* @param
|
|
348
|
-
|
|
1094
|
+
* @param TResolverContext type of the resolverContext object that you can return from the handler
|
|
1095
|
+
*/
|
|
1096
|
+
type AppSyncAuthorizerHandler<TResolverContext = undefined> = Handler<AppSyncAuthorizerEvent, AppSyncAuthorizerResult<TResolverContext>>;
|
|
1097
|
+
interface AppSyncResolverEventHeaders {
|
|
1098
|
+
[name: string]: string | undefined;
|
|
1099
|
+
}
|
|
1100
|
+
interface AppSyncAuthorizerEventHeaders {
|
|
1101
|
+
[name: string]: string | undefined;
|
|
1102
|
+
}
|
|
1103
|
+
type AppSyncIdentity = AppSyncIdentityIAM | AppSyncIdentityCognito | AppSyncIdentityOIDC | AppSyncIdentityLambda | undefined | null;
|
|
1104
|
+
/**
|
|
1105
|
+
* See https://docs.aws.amazon.com/appsync/latest/devguide/resolver-context-reference.html
|
|
349
1106
|
*
|
|
350
|
-
* @
|
|
351
|
-
* @
|
|
352
|
-
* @see {@link convertBodyToAWSResponse} For details on response body conversion
|
|
1107
|
+
* @param TArguments type of the arguments
|
|
1108
|
+
* @param TSource type of the source
|
|
353
1109
|
*/
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
1110
|
+
// Maintainer's note: Some of these properties are shared with the Amplify resolver.
|
|
1111
|
+
// It may be worth checking if changes here may be applicable there too.
|
|
1112
|
+
interface AppSyncResolverEvent<TArguments, TSource = Record<string, any> | null> {
|
|
1113
|
+
arguments: TArguments;
|
|
1114
|
+
identity?: AppSyncIdentity;
|
|
1115
|
+
source: TSource;
|
|
1116
|
+
request: {
|
|
1117
|
+
headers: AppSyncResolverEventHeaders;
|
|
1118
|
+
/** The API's custom domain if used for the request. */
|
|
1119
|
+
domainName: string | null;
|
|
1120
|
+
};
|
|
1121
|
+
info: {
|
|
1122
|
+
selectionSetList: string[];
|
|
1123
|
+
selectionSetGraphQL: string;
|
|
1124
|
+
parentTypeName: string;
|
|
1125
|
+
fieldName: string;
|
|
1126
|
+
variables: {
|
|
1127
|
+
[key: string]: any;
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
prev: {
|
|
1131
|
+
result: {
|
|
1132
|
+
[key: string]: any;
|
|
1133
|
+
};
|
|
1134
|
+
} | null;
|
|
1135
|
+
stash: {
|
|
1136
|
+
[key: string]: any;
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
interface AppSyncAuthorizerEvent {
|
|
1140
|
+
authorizationToken: string;
|
|
1141
|
+
requestContext: {
|
|
1142
|
+
apiId: string;
|
|
1143
|
+
accountId: string;
|
|
1144
|
+
requestId: string;
|
|
1145
|
+
queryString: string;
|
|
1146
|
+
operationName?: string;
|
|
1147
|
+
variables: {
|
|
1148
|
+
[key: string]: any;
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
requestHeaders: AppSyncAuthorizerEventHeaders;
|
|
1152
|
+
}
|
|
1153
|
+
interface AppSyncAuthorizerResult<TResolverContext = undefined> {
|
|
1154
|
+
isAuthorized: boolean;
|
|
1155
|
+
resolverContext?: TResolverContext;
|
|
1156
|
+
deniedFields?: string[];
|
|
1157
|
+
ttlOverride?: number;
|
|
1158
|
+
}
|
|
1159
|
+
interface AppSyncIdentityIAM {
|
|
1160
|
+
accountId: string;
|
|
1161
|
+
cognitoIdentityPoolId: string;
|
|
1162
|
+
cognitoIdentityId: string;
|
|
1163
|
+
sourceIp: string[];
|
|
1164
|
+
username: string;
|
|
1165
|
+
userArn: string;
|
|
1166
|
+
cognitoIdentityAuthType: string;
|
|
1167
|
+
cognitoIdentityAuthProvider: string;
|
|
1168
|
+
}
|
|
1169
|
+
interface AppSyncIdentityCognito {
|
|
1170
|
+
sub: string;
|
|
1171
|
+
issuer: string;
|
|
1172
|
+
username: string;
|
|
1173
|
+
claims: any;
|
|
1174
|
+
sourceIp: string[];
|
|
1175
|
+
defaultAuthStrategy: string;
|
|
1176
|
+
groups: string[] | null;
|
|
1177
|
+
}
|
|
1178
|
+
interface AppSyncIdentityOIDC {
|
|
1179
|
+
claims: any;
|
|
1180
|
+
issuer: string;
|
|
1181
|
+
sub: string;
|
|
1182
|
+
}
|
|
1183
|
+
interface AppSyncIdentityLambda {
|
|
1184
|
+
resolverContext: any;
|
|
1185
|
+
}
|
|
1186
|
+
//#endregion
|
|
1187
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/autoscaling.d.ts
|
|
1188
|
+
type AutoScalingScaleInHandler = Handler<AutoScalingScaleInEvent, AutoScalingScaleInResult>;
|
|
1189
|
+
type AutoScalingScaleInCallback = Callback<AutoScalingScaleInResult>;
|
|
1190
|
+
type AutoScalingInstanceMarketOption = "spot" | "on-demand";
|
|
1191
|
+
type AutoScalingScaleInCause = "SCALE_IN" | "INSTANCE_REFRESH" | "MAX_INSTANCE_LIFETIME" | "REBALANCE";
|
|
1192
|
+
interface AutoScalingTerminationRequest {
|
|
1193
|
+
AvailabilityZone: string;
|
|
1194
|
+
Capacity: number;
|
|
1195
|
+
InstanceMarketOption: AutoScalingInstanceMarketOption;
|
|
1196
|
+
}
|
|
1197
|
+
interface AutoScalingInstanceRecord {
|
|
1198
|
+
AvailabilityZone: string;
|
|
1199
|
+
InstanceId: string;
|
|
1200
|
+
InstanceType: string;
|
|
1201
|
+
InstanceMarketOption: AutoScalingInstanceMarketOption;
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* An Auto Scaling Group may trigger a Scale In Event when you have attached
|
|
1205
|
+
* a custom termination policy function. This event and the expected response are
|
|
1206
|
+
* described in the Auto Scaling docs at:
|
|
1207
|
+
*
|
|
1208
|
+
* https://docs.aws.amazon.com/autoscaling/ec2/userguide/lambda-custom-termination-policy.html
|
|
1209
|
+
*/
|
|
1210
|
+
interface AutoScalingScaleInEvent {
|
|
1211
|
+
AutoScalingGroupARN: string;
|
|
1212
|
+
AutoScalingGroupName: string;
|
|
1213
|
+
CapacityToTerminate: AutoScalingTerminationRequest[];
|
|
1214
|
+
Instances: AutoScalingInstanceRecord[];
|
|
1215
|
+
Cause: AutoScalingScaleInCause;
|
|
1216
|
+
HasMoreInstances?: boolean;
|
|
1217
|
+
}
|
|
1218
|
+
interface AutoScalingScaleInResult {
|
|
1219
|
+
InstanceIDs: string[];
|
|
1220
|
+
}
|
|
1221
|
+
//#endregion
|
|
1222
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts
|
|
1223
|
+
/**
|
|
1224
|
+
* Named service-defined resource properties
|
|
1225
|
+
* Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html#crpg-ref-request-properties
|
|
1226
|
+
*/
|
|
1227
|
+
interface CloudFormationCustomResourceResourcePropertiesCommon extends Record<string, any> {
|
|
1228
|
+
/**
|
|
1229
|
+
* The service token, such as an Amazon SNS topic ARN or Lambda function ARN. The service token must be from the same Region as the stack.
|
|
1230
|
+
*/
|
|
1231
|
+
ServiceToken: string;
|
|
1232
|
+
/**
|
|
1233
|
+
* The maximum time, in seconds, that can elapse before a custom resource operation times out.
|
|
1234
|
+
* The value must be an integer from 1 to 3600. The default value is 3600 seconds (1 hour).
|
|
1235
|
+
*/
|
|
1236
|
+
ServiceTimeout?: string;
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* Lambda handler function for a Lambda-backed CloudFormation Custom Resource
|
|
1240
|
+
*
|
|
1241
|
+
* NOTE: responses are *not* returned from the Lambda handler but rather they are sent to the event ResponseURL.
|
|
1242
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1243
|
+
* @template TOldResourceProperties User-defined input properties passed to the Custom Resource as part of an `Update` invocation
|
|
1244
|
+
*/
|
|
1245
|
+
type CloudFormationCustomResourceHandler<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon, TOldResourceProperties = TResourceProperties> = Handler<CloudFormationCustomResourceEvent<TResourceProperties, TOldResourceProperties>, void>;
|
|
1246
|
+
/**
|
|
1247
|
+
* Request event sent to the Lambda handler for a Lambda-backed CloudFormation Custom Resource
|
|
1248
|
+
* Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html#crpg-ref-request-fields
|
|
1249
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1250
|
+
* @template TOldResourceProperties User-defined input properties passed to the Custom Resource as part of an `Update` invocation
|
|
1251
|
+
*/
|
|
1252
|
+
type CloudFormationCustomResourceEvent<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon, TOldResourceProperties = TResourceProperties> = CloudFormationCustomResourceCreateEvent<TResourceProperties> | CloudFormationCustomResourceUpdateEvent<TResourceProperties, TOldResourceProperties> | CloudFormationCustomResourceDeleteEvent<TResourceProperties>;
|
|
1253
|
+
/**
|
|
1254
|
+
* Response from a Lambda handler for a Lambda-backed CloudFormation Custom Resource
|
|
1255
|
+
* Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-responses.html
|
|
1256
|
+
*
|
|
1257
|
+
* NOTE: responses are *not* returned from the Lambda handler but rather they are sent to the event ResponseURL.
|
|
1258
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1259
|
+
*/
|
|
1260
|
+
type CloudFormationCustomResourceResponse<TData extends Record<string, any> = Record<string, any>> = CloudFormationCustomResourceSuccessResponse<TData> | CloudFormationCustomResourceFailedResponse<TData>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Request properties that are common to all invocations of a Lambda-backed CloudFormation Custom Resource
|
|
1263
|
+
* Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html#crpg-ref-request-fields
|
|
1264
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1265
|
+
*/
|
|
1266
|
+
interface CloudFormationCustomResourceEventCommon<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon> {
|
|
1267
|
+
/**
|
|
1268
|
+
* The service token, such as an Amazon SNS topic ARN or Lambda function ARN. The service token must be from the same Region as the stack.
|
|
1269
|
+
*/
|
|
1270
|
+
ServiceToken: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* The response URL identifies a presigned S3 bucket that receives responses from the custom resource provider to AWS CloudFormation.
|
|
1273
|
+
*/
|
|
1274
|
+
ResponseURL: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* The Amazon Resource Name (ARN) that identifies the stack that contains the custom resource.
|
|
1277
|
+
* Combining the `StackId` with the `RequestId` forms a value that you can use to uniquely identify a request on a particular custom resource.
|
|
1278
|
+
*/
|
|
1279
|
+
StackId: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* A unique ID for the request.
|
|
1282
|
+
* Combining the `StackId` with the `RequestId` forms a value that you can use to uniquely identify a request on a particular custom resource.
|
|
1283
|
+
*/
|
|
1284
|
+
RequestId: string;
|
|
1285
|
+
/**
|
|
1286
|
+
* The template developer-chosen name (logical ID) of the custom resource in the AWS CloudFormation template. This is provided to facilitate communication between the custom resource provider and the template developer.
|
|
1287
|
+
*/
|
|
1288
|
+
LogicalResourceId: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* The template developer-chosen resource type of the custom resource in the CloudFormation template. Custom resource type names can be up to 60 characters long and can include alphanumeric and the following characters: `_@-`.
|
|
1291
|
+
*/
|
|
1292
|
+
ResourceType: string;
|
|
1293
|
+
/**
|
|
1294
|
+
* This field contains the contents of the `Properties` object sent by the template developer. Its contents are defined by the custom resource provider.
|
|
1295
|
+
*/
|
|
1296
|
+
ResourceProperties: TResourceProperties & CloudFormationCustomResourceResourcePropertiesCommon;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Request properties specifically for the `Create` invocation of a Lambda-backed CloudFormation Custom Resource
|
|
1300
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1301
|
+
*/
|
|
1302
|
+
interface CloudFormationCustomResourceCreateEvent<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon> extends CloudFormationCustomResourceEventCommon<TResourceProperties> {
|
|
1303
|
+
/**
|
|
1304
|
+
* The request type is set by the CloudFormation stack operation (create-stack, update-stack, or delete-stack) that was initiated by the template developer for the stack that contains the custom resource.
|
|
1305
|
+
*/
|
|
1306
|
+
RequestType: "Create";
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Request properties specifically for the `Update` invocation of a Lambda-backed CloudFormation Custom Resource
|
|
1310
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1311
|
+
* @template TOldResourceProperties User-defined input properties passed to the Custom Resource as part of an `Update` invocation
|
|
1312
|
+
*/
|
|
1313
|
+
interface CloudFormationCustomResourceUpdateEvent<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon, TOldResourceProperties = TResourceProperties> extends CloudFormationCustomResourceEventCommon<TResourceProperties> {
|
|
1314
|
+
/**
|
|
1315
|
+
* The request type is set by the CloudFormation stack operation (create-stack, update-stack, or delete-stack) that was initiated by the template developer for the stack that contains the custom resource.
|
|
1316
|
+
*/
|
|
1317
|
+
RequestType: "Update";
|
|
1318
|
+
/**
|
|
1319
|
+
* A required custom resource provider-defined physical ID that is unique for that provider.
|
|
1320
|
+
* The value returned for a `PhysicalResourceId` can change custom resource update operations. If the value returned is the same, it is considered a normal update. If the value returned is different, AWS CloudFormation recognizes the update as a replacement and sends a delete request to the old resource.
|
|
1321
|
+
*/
|
|
1322
|
+
PhysicalResourceId: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* Used only for `Update` requests. Contains the resource properties that were declared previous to the update request.
|
|
1325
|
+
*/
|
|
1326
|
+
OldResourceProperties: TOldResourceProperties;
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Request properties specifically for the `Delete` invocation of a Lambda-backed CloudFormation Custom Resource
|
|
1330
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1331
|
+
*/
|
|
1332
|
+
interface CloudFormationCustomResourceDeleteEvent<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon> extends CloudFormationCustomResourceEventCommon<TResourceProperties> {
|
|
1333
|
+
/**
|
|
1334
|
+
* The request type is set by the CloudFormation stack operation (create-stack, update-stack, or delete-stack) that was initiated by the template developer for the stack that contains the custom resource.
|
|
1335
|
+
*/
|
|
1336
|
+
RequestType: "Delete";
|
|
1337
|
+
/**
|
|
1338
|
+
* A required custom resource provider-defined physical ID that is unique for that provider.
|
|
1339
|
+
* The value returned for a `PhysicalResourceId` can change custom resource update operations. If the value returned is the same, it is considered a normal update. If the value returned is different, AWS CloudFormation recognizes the update as a replacement and sends a delete request to the old resource.
|
|
1340
|
+
*/
|
|
1341
|
+
PhysicalResourceId: string;
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Response properties that are common to all invocations of a Lambda-backed CloudFormation Custom Resource
|
|
1345
|
+
* Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-responses.html
|
|
1346
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1347
|
+
*/
|
|
1348
|
+
interface CloudFormationCustomResourceResponseCommon<TData extends Record<string, any> = Record<string, any>> {
|
|
1349
|
+
/**
|
|
1350
|
+
* This value should be an identifier unique to the custom resource vendor, and can be up to 1 KB in size. The value must be a non-empty string and must be identical for all responses for the same resource.
|
|
1351
|
+
* The value returned for a `PhysicalResourceId` can change custom resource update operations. If the value returned is the same, it is considered a normal update. If the value returned is different, AWS CloudFormation recognizes the update as a replacement and sends a delete request to the old resource.
|
|
1352
|
+
*/
|
|
1353
|
+
PhysicalResourceId: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* The Amazon Resource Name (ARN) that identifies the stack that contains the custom resource. This response value should be copied verbatim from the request.
|
|
1356
|
+
*/
|
|
1357
|
+
StackId: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* A unique ID for the request. This response value should be copied verbatim from the request.
|
|
1360
|
+
*/
|
|
1361
|
+
RequestId: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* The template developer-chosen name (logical ID) of the custom resource in the AWS CloudFormation template. This response value should be copied verbatim from the request.
|
|
1364
|
+
*/
|
|
1365
|
+
LogicalResourceId: string;
|
|
1366
|
+
/**
|
|
1367
|
+
* The custom resource provider-defined name-value pairs to send with the response. You can access the values provided here by name in the template with `Fn::GetAtt`.
|
|
1368
|
+
* NOTE: If the name-value pairs contain sensitive information, you should use the `NoEcho` field to mask the output of the custom resource. Otherwise, the values are visible through APIs that surface property values (such as `DescribeStackEvents`).
|
|
1369
|
+
*/
|
|
1370
|
+
Data?: TData | undefined;
|
|
1371
|
+
/**
|
|
1372
|
+
* Indicates whether to mask the output of the custom resource when retrieved by using the `Fn::GetAtt` function. If set to `true`, all returned values are masked with asterisks (*****), __except for those stored in the `Metadata` section of the template__. AWS CloudFormation does not transform, modify, or redact any information you include in the `Metadata` section. The default value is `false`.
|
|
1373
|
+
*/
|
|
1374
|
+
NoEcho?: boolean | undefined;
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Response properties that are specifically for a response indicating succesful invocation of a Lambda-backed CloudFormation Custom Resource
|
|
1378
|
+
* Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-responses.html
|
|
1379
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1380
|
+
*/
|
|
1381
|
+
interface CloudFormationCustomResourceSuccessResponse<TData extends Record<string, any> = Record<string, any>> extends CloudFormationCustomResourceResponseCommon<TData> {
|
|
1382
|
+
/**
|
|
1383
|
+
* The status value sent by the custom resource provider in response to an AWS CloudFormation-generated request.
|
|
1384
|
+
*/
|
|
1385
|
+
Status: "SUCCESS";
|
|
1386
|
+
/**
|
|
1387
|
+
* Describes the reason for a failure response.
|
|
1388
|
+
*/
|
|
1389
|
+
Reason?: string | undefined;
|
|
1390
|
+
}
|
|
1391
|
+
/**
|
|
1392
|
+
* Response properties that are specifically for a response indicating failed invocation of a Lambda-backed CloudFormation Custom Resource
|
|
1393
|
+
* Reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-responses.html
|
|
1394
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1395
|
+
*/
|
|
1396
|
+
interface CloudFormationCustomResourceFailedResponse<TData extends Record<string, any> = Record<string, any>> extends CloudFormationCustomResourceResponseCommon<TData> {
|
|
1397
|
+
/**
|
|
1398
|
+
* The status value sent by the custom resource provider in response to an AWS CloudFormation-generated request.
|
|
1399
|
+
*/
|
|
1400
|
+
Status: "FAILED";
|
|
1401
|
+
/**
|
|
1402
|
+
* Describes the reason for a failure response.
|
|
1403
|
+
*/
|
|
1404
|
+
Reason: string;
|
|
1405
|
+
}
|
|
1406
|
+
//#endregion
|
|
1407
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts
|
|
1408
|
+
/**
|
|
1409
|
+
* Request event sent to the Lambda `OnEvent` handler for a CDK Custom Resource
|
|
1410
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#handling-lifecycle-events-onevent
|
|
1411
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1412
|
+
* @template TOldResourceProperties User-defined input properties passed to the Custom Resource as part of an `Update` invocation
|
|
1413
|
+
*/
|
|
1414
|
+
type CdkCustomResourceEvent<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon, TOldResourceProperties = TResourceProperties> = CloudFormationCustomResourceEvent<TResourceProperties, TOldResourceProperties> & {
|
|
1415
|
+
/**
|
|
1416
|
+
* The response URL identifies a presigned S3 bucket that receives responses from the custom resource provider to AWS CloudFormation.
|
|
1417
|
+
*
|
|
1418
|
+
* **This URL should not be used.**
|
|
1419
|
+
* The CDK Provider Framework will call this URL automatically based on the response produced by the Lambda handler.
|
|
1420
|
+
*/
|
|
1421
|
+
ResponseURL: string;
|
|
1422
|
+
};
|
|
1423
|
+
/**
|
|
1424
|
+
* Lambda handler function for the `OnEvent` CDK Custom Resource
|
|
1425
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#handling-lifecycle-events-onevent
|
|
1426
|
+
*
|
|
1427
|
+
* NOTE: this is not to be confused with traditional CloudFormation custom resources.
|
|
1428
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1429
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1430
|
+
* @template TOldResourceProperties User-defined input properties passed to the Custom Resource as part of an `Update` invocation
|
|
1431
|
+
*/
|
|
1432
|
+
type CdkCustomResourceHandler<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon, TData extends Record<string, any> = Record<string, any>, TOldResourceProperties = TResourceProperties> = Handler<CdkCustomResourceEvent<TResourceProperties, TOldResourceProperties>, CdkCustomResourceResponse<TData>>;
|
|
1433
|
+
/**
|
|
1434
|
+
* Lambda `OnEvent` callback function for a CDK Custom Resource
|
|
1435
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1436
|
+
*/
|
|
1437
|
+
type CdkCustomResourceCallback<TData extends Record<string, any>> = Callback<CdkCustomResourceResponse<TData>>;
|
|
1438
|
+
/**
|
|
1439
|
+
* Response from the `OnEvent` Lambda handler for a CDK Custom Resource
|
|
1440
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#handling-lifecycle-events-onevent
|
|
1441
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1442
|
+
*/
|
|
1443
|
+
interface CdkCustomResourceResponse<TData extends Record<string, any> = Record<string, any>> {
|
|
1444
|
+
/**
|
|
1445
|
+
* This value should be an identifier unique to the custom resource vendor, and can be up to 1 KB in size. The value must be a non-empty string and must be identical for all responses for the same resource.
|
|
1446
|
+
* The value returned for a `PhysicalResourceId` can change custom resource update operations. If the value returned is the same, it is considered a normal update. If the value returned is different, AWS CloudFormation recognizes the update as a replacement and sends a delete request to the old resource.
|
|
1447
|
+
*
|
|
1448
|
+
* If omitted for `Create` events, the event's `RequestId` will be used.
|
|
1449
|
+
* For `Update`, the current physical ID will be used. If a different value is returned, CloudFormation will follow with a subsequent `Delete` for the previous ID (resource replacement).
|
|
1450
|
+
* For `Delete`, it will always return the current physical resource ID, and if the user returns a different one, an error will occur.
|
|
1451
|
+
*/
|
|
1452
|
+
PhysicalResourceId?: string;
|
|
1453
|
+
/**
|
|
1454
|
+
* The custom resource provider-defined name-value pairs to send with the response. You can access the values provided here by name in the template with `Fn::GetAtt`.
|
|
1455
|
+
* NOTE: If the name-value pairs contain sensitive information, you should use the `NoEcho` field to mask the output of the custom resource. Otherwise, the values are visible through APIs that surface property values (such as `DescribeStackEvents`).
|
|
1456
|
+
*/
|
|
1457
|
+
Data?: TData;
|
|
1458
|
+
/**
|
|
1459
|
+
* Indicates whether to mask the output of the custom resource when retrieved by using the `Fn::GetAtt` function. If set to `true`, all returned values are masked with asterisks (*****), __except for those stored in the `Metadata` section of the template__. AWS CloudFormation does not transform, modify, or redact any information you include in the `Metadata` section. The default value is `false`.
|
|
1460
|
+
*/
|
|
1461
|
+
NoEcho?: boolean;
|
|
1462
|
+
/**
|
|
1463
|
+
* Any other field included in the response will be passed through to `isComplete`. This can sometimes be useful to pass state between the handlers.
|
|
1464
|
+
*/
|
|
1465
|
+
[Key: string]: any;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Request event sent to the Lambda `IsComplete` handler for an asynchronous CDK Custom Resource
|
|
1469
|
+
* The input event to isComplete includes all request fields, combined with all fields returned from onEvent. If PhysicalResourceId has not been explicitly returned from onEvent, it's value will be calculated based on heuristics.
|
|
1470
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#asynchronous-providers-iscomplete
|
|
1471
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1472
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1473
|
+
* @template TOldResourceProperties User-defined input properties passed to the Custom Resource as part of an `Update` invocation
|
|
1474
|
+
*/
|
|
1475
|
+
type CdkCustomResourceIsCompleteEvent<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon, TData extends Record<string, any> = Record<string, any>, TOldResourceProperties = TResourceProperties> = CdkCustomResourceEvent<TResourceProperties, TOldResourceProperties> & CdkCustomResourceResponse<TData>;
|
|
1476
|
+
/**
|
|
1477
|
+
* Common response properties from the `IsComplete` Lambda handler for a CDK Custom Resource
|
|
1478
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#asynchronous-providers-iscomplete
|
|
1479
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1480
|
+
*/
|
|
1481
|
+
type CdkCustomResourceIsCompleteResponse<TData extends Record<string, any> = Record<string, any>> = CdkCustomResourceIsCompleteResponseSuccess<TData> | CdkCustomResourceIsCompleteResponseWaiting;
|
|
1482
|
+
/**
|
|
1483
|
+
* Response properties that are specifically for a successful `IsComplete` response for a CDK Custom Resource
|
|
1484
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#asynchronous-providers-iscomplete
|
|
1485
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1486
|
+
*/
|
|
1487
|
+
interface CdkCustomResourceIsCompleteResponseSuccess<TData extends Record<string, any> = Record<string, any>> {
|
|
1488
|
+
/**
|
|
1489
|
+
* Indicates the operation has finished.
|
|
1490
|
+
*/
|
|
1491
|
+
IsComplete: true;
|
|
1492
|
+
/**
|
|
1493
|
+
* The custom resource provider-defined name-value pairs to send with the response. You can access the values provided here by name in the template with `Fn::GetAtt`.
|
|
1494
|
+
* These attributes will be **merged** with the ones returned from `onEvent`.
|
|
1495
|
+
*/
|
|
1496
|
+
Data?: TData;
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Response properties that are specifically for a still waiting `IsComplete` response for a CDK Custom Resource
|
|
1500
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#asynchronous-providers-iscomplete
|
|
1501
|
+
*/
|
|
1502
|
+
interface CdkCustomResourceIsCompleteResponseWaiting {
|
|
1503
|
+
/**
|
|
1504
|
+
* Indicates the operation has not finished.
|
|
1505
|
+
*/
|
|
1506
|
+
IsComplete: false;
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* Lambda `IsComplete` handler function for asynchronous CDK Custom Resources
|
|
1510
|
+
* Reference: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html#asynchronous-providers-iscomplete
|
|
1511
|
+
* @template TResourceProperties User-defined input properties passed to the Custom Resource as part of any invocation
|
|
1512
|
+
* @template TOnEventData User-defined output properties that are retuned from any invocation of the `OnEvent` function
|
|
1513
|
+
* @template TOldResourceProperties User-defined input properties passed to the Custom Resource as part of an `Update` invocation
|
|
1514
|
+
* @template TIsCompleteData User-defined output properties that are retuned from any invocation of the `IsComplete` function
|
|
1515
|
+
*/
|
|
1516
|
+
type CdkCustomResourceIsCompleteHandler<TResourceProperties = CloudFormationCustomResourceResourcePropertiesCommon, TOnEventData extends Record<string, any> = Record<string, any>, TOldResourceProperties = TResourceProperties, TIsCompleteData extends Record<string, any> = TOnEventData> = Handler<CdkCustomResourceIsCompleteEvent<TResourceProperties, TOnEventData, TOldResourceProperties>, CdkCustomResourceIsCompleteResponse<TIsCompleteData>>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Lambda `IsComplete` callback function for a CDK Custom Resource
|
|
1519
|
+
* @template TData User-defined output properties that are retuned from any invocation
|
|
1520
|
+
*/
|
|
1521
|
+
type CdkCustomResourceIsCompleteCallback<TData extends Record<string, any> = Record<string, any>> = Callback<CdkCustomResourceIsCompleteResponse<TData>>;
|
|
1522
|
+
//#endregion
|
|
1523
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts
|
|
1524
|
+
type CloudFrontRequestHandler = Handler<CloudFrontRequestEvent, CloudFrontRequestResult>;
|
|
1525
|
+
type CloudFrontRequestCallback = Callback<CloudFrontRequestResult>;
|
|
1526
|
+
interface CloudFrontRequestEventRecord {
|
|
1527
|
+
cf: CloudFrontEvent & {
|
|
1528
|
+
request: CloudFrontRequest;
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* CloudFront viewer request or origin request event
|
|
1533
|
+
*
|
|
1534
|
+
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#lambda-event-structure-request
|
|
1535
|
+
*/
|
|
1536
|
+
interface CloudFrontRequestEvent {
|
|
1537
|
+
Records: CloudFrontRequestEventRecord[];
|
|
1538
|
+
}
|
|
1539
|
+
type CloudFrontRequestResult = undefined | null | CloudFrontResultResponse | CloudFrontRequest;
|
|
1540
|
+
//#endregion
|
|
1541
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts
|
|
1542
|
+
type CloudFrontResponseHandler = Handler<CloudFrontResponseEvent, CloudFrontResponseResult>;
|
|
1543
|
+
type CloudFrontResponseCallback = Callback<CloudFrontResponseResult>;
|
|
1544
|
+
interface CloudFrontResponseEventRecord {
|
|
1545
|
+
cf: CloudFrontEvent & {
|
|
1546
|
+
readonly request: Pick<CloudFrontRequest, Exclude<keyof CloudFrontRequest, "body">>;
|
|
1547
|
+
response: CloudFrontResponse;
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* CloudFront viewer response or origin response event
|
|
1552
|
+
*
|
|
1553
|
+
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#lambda-event-structure-response
|
|
1554
|
+
*/
|
|
1555
|
+
interface CloudFrontResponseEvent {
|
|
1556
|
+
Records: CloudFrontResponseEventRecord[];
|
|
1557
|
+
}
|
|
1558
|
+
type CloudFrontResponseResult = undefined | null | CloudFrontResultResponse;
|
|
1559
|
+
//#endregion
|
|
1560
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts
|
|
1561
|
+
type CloudWatchAlarmHandler = Handler<CloudWatchAlarmEvent, void>;
|
|
1562
|
+
interface CloudWatchAlarmEvent {
|
|
1563
|
+
source: string;
|
|
1564
|
+
alarmArn: string;
|
|
1565
|
+
accountId: string;
|
|
1566
|
+
time: string;
|
|
1567
|
+
region: string;
|
|
1568
|
+
alarmData: CloudWatchAlarmData;
|
|
1569
|
+
}
|
|
1570
|
+
interface CloudWatchAlarmState {
|
|
1571
|
+
value: string;
|
|
1572
|
+
reason: string;
|
|
1573
|
+
timestamp: string;
|
|
1574
|
+
reasonData?: string;
|
|
1575
|
+
actionsSuppressedBy?: string;
|
|
1576
|
+
actionsSuppressedReason?: string;
|
|
1577
|
+
}
|
|
1578
|
+
interface CloudWatchMetric {
|
|
1579
|
+
namespace: string;
|
|
1580
|
+
name: string;
|
|
1581
|
+
dimensions?: Record<string, string>;
|
|
1582
|
+
}
|
|
1583
|
+
interface CloudWatchMetricStat {
|
|
1584
|
+
metric: CloudWatchMetric;
|
|
1585
|
+
period: number;
|
|
1586
|
+
stat: string;
|
|
1587
|
+
unit?: string;
|
|
1588
|
+
}
|
|
1589
|
+
interface CloudWatchAlarmMetric {
|
|
1590
|
+
id: string;
|
|
1591
|
+
metricStat: CloudWatchMetricStat;
|
|
1592
|
+
returnData: boolean;
|
|
1593
|
+
}
|
|
1594
|
+
interface CloudWatchAlarmExpression {
|
|
1595
|
+
id: string;
|
|
1596
|
+
expression: string;
|
|
1597
|
+
label: string;
|
|
1598
|
+
returnData: boolean;
|
|
1599
|
+
}
|
|
1600
|
+
type CloudWatchAlarmMetricDataQuery = CloudWatchAlarmMetric | CloudWatchAlarmExpression;
|
|
1601
|
+
interface CloudWatchAlarmConfiguration {
|
|
1602
|
+
metrics: CloudWatchAlarmMetricDataQuery[];
|
|
1603
|
+
description?: string;
|
|
1604
|
+
}
|
|
1605
|
+
interface CloudWatchAlarmCompositeConfiguration {
|
|
1606
|
+
alarmRule: string;
|
|
1607
|
+
description?: string;
|
|
1608
|
+
actionsSuppressor?: string;
|
|
1609
|
+
actionsSuppressorWaitPeriod?: number;
|
|
1610
|
+
actionsSuppressorExtensionPeriod?: number;
|
|
1611
|
+
}
|
|
1612
|
+
interface CloudWatchAlarmData {
|
|
1613
|
+
alarmName: string;
|
|
1614
|
+
state: CloudWatchAlarmState;
|
|
1615
|
+
previousState: CloudWatchAlarmState;
|
|
1616
|
+
configuration: CloudWatchAlarmConfiguration | CloudWatchAlarmCompositeConfiguration;
|
|
1617
|
+
}
|
|
1618
|
+
//#endregion
|
|
1619
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/eventbridge.d.ts
|
|
1620
|
+
type EventBridgeHandler<TDetailType extends string, TDetail, TResult> = Handler<EventBridgeEvent<TDetailType, TDetail>, TResult>;
|
|
1621
|
+
interface EventBridgeEvent<TDetailType extends string, TDetail> {
|
|
1622
|
+
id: string;
|
|
1623
|
+
version: string;
|
|
1624
|
+
account: string;
|
|
1625
|
+
time: string;
|
|
1626
|
+
region: string;
|
|
1627
|
+
resources: string[];
|
|
1628
|
+
source: string;
|
|
1629
|
+
"detail-type": TDetailType;
|
|
1630
|
+
detail: TDetail;
|
|
1631
|
+
"replay-name"?: string;
|
|
1632
|
+
}
|
|
1633
|
+
//#endregion
|
|
1634
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts
|
|
1635
|
+
type ScheduledHandler<TDetail = any> = EventBridgeHandler<"Scheduled Event", TDetail, void>;
|
|
1636
|
+
/**
|
|
1637
|
+
* https://docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html
|
|
1638
|
+
*/
|
|
1639
|
+
interface ScheduledEvent<TDetail = any> extends EventBridgeEvent<"Scheduled Event", TDetail> {}
|
|
1640
|
+
//#endregion
|
|
1641
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts
|
|
1642
|
+
type CloudWatchLogsHandler = Handler<CloudWatchLogsEvent, void>;
|
|
1643
|
+
/**
|
|
1644
|
+
* See http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-cloudwatch-logs
|
|
1645
|
+
*/
|
|
1646
|
+
interface CloudWatchLogsEvent {
|
|
1647
|
+
awslogs: CloudWatchLogsEventData;
|
|
1648
|
+
}
|
|
1649
|
+
interface CloudWatchLogsEventData {
|
|
1650
|
+
data: string;
|
|
1651
|
+
}
|
|
1652
|
+
interface CloudWatchLogsDecodedData {
|
|
1653
|
+
owner: string;
|
|
1654
|
+
logGroup: string;
|
|
1655
|
+
logStream: string;
|
|
1656
|
+
subscriptionFilters: string[];
|
|
1657
|
+
messageType: string;
|
|
1658
|
+
logEvents: CloudWatchLogsLogEvent[];
|
|
1659
|
+
}
|
|
1660
|
+
interface CloudWatchLogsLogEventExtractedFields {
|
|
1661
|
+
[name: string]: string | undefined;
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* See http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#LambdaFunctionExample
|
|
1665
|
+
*/
|
|
1666
|
+
interface CloudWatchLogsLogEvent {
|
|
1667
|
+
id: string;
|
|
1668
|
+
timestamp: number;
|
|
1669
|
+
message: string;
|
|
1670
|
+
extractedFields?: CloudWatchLogsLogEventExtractedFields | undefined;
|
|
1671
|
+
}
|
|
1672
|
+
//#endregion
|
|
1673
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts
|
|
1674
|
+
type CodeBuildCloudWatchStateHandler = EventBridgeHandler<"CodeBuild Build State Change", CodeBuildStateEventDetail, void>;
|
|
1675
|
+
type CodeBuildStateType = "IN_PROGRESS" | "SUCCEEDED" | "FAILED" | "STOPPED";
|
|
1676
|
+
type CodeBuildPhaseType = "COMPLETED" | "FINALIZING" | "UPLOAD_ARTIFACTS" | "POST_BUILD" | "BUILD" | "PRE_BUILD" | "INSTALL" | "QUEUED" | "DOWNLOAD_SOURCE" | "PROVISIONING" | "SUBMITTED";
|
|
1677
|
+
type CodeBuildPhaseStatusType = "TIMED_OUT" | "STOPPED" | "FAILED" | "SUCCEEDED" | "FAULT" | "CLIENT_ERROR";
|
|
1678
|
+
type CodeBuildCacheType = "NO_CACHE" | "LOCAL" | "S3";
|
|
1679
|
+
type CodeBuildSourceLocationType = "CODECOMMIT" | "CODEPIPELINE" | "GITHUB" | "GITHUB_ENTERPRISE" | "BITBUCKET" | "S3" | "NO_SOURCE";
|
|
1680
|
+
type CodeBuildEnvironmentType = "LINUX_CONTAINER" | "LINUX_GPU_CONTAINER" | "WINDOWS_CONTAINER" | "ARM_CONTAINER";
|
|
1681
|
+
type CodeBuildEnvironmentPullCredentialsType = "CODEBUILD" | "SERVICE_ROLE";
|
|
1682
|
+
type CodeBuildEnvironmentComputeType = "BUILD_GENERAL1_SMALL" | "BUILD_GENERAL1_MEDIUM" | "BUILD_GENERAL1_LARGE" | "BUILD_GENERAL1_2XLARGE";
|
|
1683
|
+
type CodeBuildEnvironmentVariableType = "PARAMETER_STORE" | "PLAINTEXT" | "SECRETS_MANAGER";
|
|
1684
|
+
interface CodeBuildStateEventDetail {
|
|
1685
|
+
"build-status": CodeBuildStateType;
|
|
1686
|
+
"project-name": string;
|
|
1687
|
+
"build-id": string;
|
|
1688
|
+
"current-phase": CodeBuildPhaseType;
|
|
1689
|
+
"current-phase-context": string;
|
|
1690
|
+
version: string;
|
|
1691
|
+
"additional-information": {
|
|
1692
|
+
cache: {
|
|
1693
|
+
type: CodeBuildCacheType;
|
|
1694
|
+
};
|
|
1695
|
+
"build-number": number;
|
|
1696
|
+
"timeout-in-minutes": number;
|
|
1697
|
+
"build-complete": boolean;
|
|
1698
|
+
initiator: string;
|
|
1699
|
+
"build-start-time": string;
|
|
1700
|
+
source: {
|
|
1701
|
+
buildspec: string;
|
|
1702
|
+
location: string;
|
|
1703
|
+
type: CodeBuildSourceLocationType;
|
|
1704
|
+
};
|
|
1705
|
+
"source-version": string;
|
|
1706
|
+
artifact: {
|
|
1707
|
+
location: string;
|
|
1708
|
+
};
|
|
1709
|
+
environment: {
|
|
1710
|
+
image: string;
|
|
1711
|
+
"privileged-mode": boolean;
|
|
1712
|
+
"image-pull-credentials-type"?: CodeBuildEnvironmentPullCredentialsType | undefined;
|
|
1713
|
+
"compute-type": CodeBuildEnvironmentComputeType;
|
|
1714
|
+
type: CodeBuildEnvironmentType;
|
|
1715
|
+
"environment-variables": Array<{
|
|
1716
|
+
name: string;
|
|
1717
|
+
type?: CodeBuildEnvironmentVariableType | undefined;
|
|
1718
|
+
value: string;
|
|
1719
|
+
}>;
|
|
1720
|
+
};
|
|
1721
|
+
"project-file-system-locations": [];
|
|
1722
|
+
logs: {
|
|
1723
|
+
"group-name": string;
|
|
1724
|
+
"stream-name": string;
|
|
1725
|
+
"deep-link": string;
|
|
1726
|
+
};
|
|
1727
|
+
phases: Array<{
|
|
1728
|
+
"phase-context"?: string[] | undefined; // Not available for COMPLETED phase-type
|
|
1729
|
+
"start-time": string;
|
|
1730
|
+
"end-time"?: string | undefined; // Not available for COMPLETED phase-type
|
|
1731
|
+
"duration-in-seconds"?: number | undefined; // Not available for COMPLETED phase-type
|
|
1732
|
+
"phase-type": CodeBuildPhaseType;
|
|
1733
|
+
"phase-status"?: CodeBuildPhaseStatusType | undefined; // Not available for COMPLETED phase-type
|
|
1734
|
+
}>;
|
|
1735
|
+
"queued-timeout-in-minutes": number;
|
|
1736
|
+
};
|
|
1737
|
+
}
|
|
1738
|
+
interface CodeBuildCloudWatchStateEvent extends EventBridgeEvent<"CodeBuild Build State Change", CodeBuildStateEventDetail> {
|
|
1739
|
+
source: "aws.codebuild";
|
|
1740
|
+
}
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/codecommit.d.ts
|
|
1743
|
+
type CodeCommitHandler = Handler<CodeCommitTrigger, void>;
|
|
1744
|
+
/**
|
|
1745
|
+
* CodeCommit events
|
|
1746
|
+
* https://docs.aws.amazon.com/lambda/latest/dg/services-codecommit.html
|
|
1747
|
+
*/
|
|
1748
|
+
interface CodeCommitTrigger {
|
|
1749
|
+
awsRegion: string;
|
|
1750
|
+
codecommit: {
|
|
1751
|
+
references: Array<{
|
|
1752
|
+
commit: string;
|
|
1753
|
+
created?: boolean;
|
|
1754
|
+
deleted?: boolean;
|
|
1755
|
+
ref: string;
|
|
1756
|
+
}>;
|
|
1757
|
+
};
|
|
1758
|
+
customData?: string;
|
|
1759
|
+
eventId: string;
|
|
1760
|
+
eventName: string;
|
|
1761
|
+
eventPartNumber: number;
|
|
1762
|
+
eventSource: string;
|
|
1763
|
+
eventSourceARN: string;
|
|
1764
|
+
eventTime: string;
|
|
1765
|
+
eventTotalParts: number;
|
|
1766
|
+
eventTriggerConfigId: string;
|
|
1767
|
+
eventTriggerName: string;
|
|
1768
|
+
eventVersion: string;
|
|
1769
|
+
userIdentityARN: string;
|
|
1770
|
+
}
|
|
1771
|
+
interface CodeCommitTriggerEvent {
|
|
1772
|
+
Records: CodeCommitTrigger[];
|
|
1773
|
+
}
|
|
1774
|
+
//#endregion
|
|
1775
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/codepipeline.d.ts
|
|
1776
|
+
type CodePipelineHandler = Handler<CodePipelineEvent, void>;
|
|
1777
|
+
/**
|
|
1778
|
+
* CodePipeline events
|
|
1779
|
+
* https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html
|
|
1780
|
+
*/
|
|
1781
|
+
interface S3ArtifactLocation {
|
|
1782
|
+
bucketName: string;
|
|
1783
|
+
objectKey: string;
|
|
1784
|
+
}
|
|
1785
|
+
interface S3ArtifactStore {
|
|
1786
|
+
type: "S3";
|
|
1787
|
+
s3Location: S3ArtifactLocation;
|
|
1788
|
+
}
|
|
1789
|
+
type ArtifactLocation = S3ArtifactStore;
|
|
1790
|
+
interface Artifact {
|
|
1791
|
+
name: string;
|
|
1792
|
+
revision: string | null;
|
|
1793
|
+
location: ArtifactLocation;
|
|
1794
|
+
}
|
|
1795
|
+
interface Credentials {
|
|
1796
|
+
accessKeyId: string;
|
|
1797
|
+
secretAccessKey: string;
|
|
1798
|
+
sessionToken?: string | undefined;
|
|
1799
|
+
}
|
|
1800
|
+
interface EncryptionKey {
|
|
1801
|
+
type: string;
|
|
1802
|
+
id: string;
|
|
1803
|
+
}
|
|
1804
|
+
interface CodePipelineEvent {
|
|
1805
|
+
"CodePipeline.job": {
|
|
1806
|
+
id: string;
|
|
1807
|
+
accountId: string;
|
|
1808
|
+
data: {
|
|
1809
|
+
actionConfiguration: {
|
|
1810
|
+
configuration: {
|
|
1811
|
+
FunctionName: string;
|
|
1812
|
+
UserParameters: string;
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
inputArtifacts: Artifact[];
|
|
1816
|
+
outputArtifacts: Artifact[];
|
|
1817
|
+
artifactCredentials: Credentials;
|
|
1818
|
+
encryptionKey?: (EncryptionKey & {
|
|
1819
|
+
type: "KMS";
|
|
1820
|
+
}) | undefined;
|
|
1821
|
+
continuationToken?: string | undefined;
|
|
1822
|
+
};
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
//#endregion
|
|
1826
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts
|
|
1827
|
+
type CodePipelineCloudWatchActionHandler = Handler<CodePipelineCloudWatchActionEvent, void>;
|
|
1828
|
+
type CodePipelineActionCategory = "Approval" | "Build" | "Deploy" | "Invoke" | "Source" | "Test";
|
|
1829
|
+
type CodePipelineActionState = "STARTED" | "SUCCEEDED" | "FAILED" | "CANCELED";
|
|
1830
|
+
interface CodePipelineCloudWatchActionEvent {
|
|
1831
|
+
version: string;
|
|
1832
|
+
id: string;
|
|
1833
|
+
"detail-type": "CodePipeline Action Execution State Change";
|
|
1834
|
+
source: "aws.codepipeline";
|
|
1835
|
+
account: string;
|
|
1836
|
+
time: string;
|
|
1837
|
+
region: string;
|
|
1838
|
+
resources: string[];
|
|
1839
|
+
detail: {
|
|
1840
|
+
pipeline: string;
|
|
1841
|
+
version: number;
|
|
1842
|
+
"execution-id": string;
|
|
1843
|
+
stage: string;
|
|
1844
|
+
action: string;
|
|
1845
|
+
state: CodePipelineActionState;
|
|
1846
|
+
type: {
|
|
1847
|
+
owner: "AWS" | "Custom" | "ThirdParty";
|
|
1848
|
+
category: CodePipelineActionCategory;
|
|
1849
|
+
provider: string;
|
|
1850
|
+
version: number;
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
}
|
|
1854
|
+
//#endregion
|
|
1855
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts
|
|
1856
|
+
type CodePipelineCloudWatchPipelineHandler = Handler<CodePipelineCloudWatchPipelineEvent, void>;
|
|
1857
|
+
type CodePipelineState = "STARTED" | "SUCCEEDED" | "RESUMED" | "FAILED" | "CANCELED" | "SUPERSEDED";
|
|
1858
|
+
/**
|
|
1859
|
+
* CodePipeline CloudWatch Events
|
|
1860
|
+
* https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html
|
|
1861
|
+
*
|
|
1862
|
+
* The above CodePipelineEvent is when a lambda is invoked by a CodePipeline.
|
|
1863
|
+
* These events are when you subscribe to CodePipeline events in CloudWatch.
|
|
1864
|
+
*
|
|
1865
|
+
* Their documentation says that detail.version is a string, but it is actually an integer
|
|
1866
|
+
*/
|
|
1867
|
+
interface CodePipelineCloudWatchPipelineEvent {
|
|
1868
|
+
version: string;
|
|
1869
|
+
id: string;
|
|
1870
|
+
"detail-type": "CodePipeline Pipeline Execution State Change";
|
|
1871
|
+
source: "aws.codepipeline";
|
|
1872
|
+
account: string;
|
|
1873
|
+
time: string;
|
|
1874
|
+
region: string;
|
|
1875
|
+
resources: string[];
|
|
1876
|
+
detail: {
|
|
1877
|
+
pipeline: string;
|
|
1878
|
+
version: number;
|
|
1879
|
+
state: CodePipelineState;
|
|
1880
|
+
"execution-id": string;
|
|
1881
|
+
};
|
|
1882
|
+
}
|
|
1883
|
+
//#endregion
|
|
1884
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts
|
|
1885
|
+
type CodePipelineCloudWatchStageHandler = Handler<CodePipelineCloudWatchStageEvent, void>;
|
|
1886
|
+
type CodePipelineStageState = "STARTED" | "SUCCEEDED" | "RESUMED" | "FAILED" | "CANCELED";
|
|
1887
|
+
interface CodePipelineCloudWatchStageEvent {
|
|
1888
|
+
version: string;
|
|
1889
|
+
id: string;
|
|
1890
|
+
"detail-type": "CodePipeline Stage Execution State Change";
|
|
1891
|
+
source: "aws.codepipeline";
|
|
1892
|
+
account: string;
|
|
1893
|
+
time: string;
|
|
1894
|
+
region: string;
|
|
1895
|
+
resources: string[];
|
|
1896
|
+
detail: {
|
|
1897
|
+
pipeline: string;
|
|
1898
|
+
version: number;
|
|
1899
|
+
"execution-id": string;
|
|
1900
|
+
stage: string;
|
|
1901
|
+
state: CodePipelineStageState;
|
|
1902
|
+
};
|
|
1903
|
+
}
|
|
1904
|
+
//#endregion
|
|
1905
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts
|
|
1906
|
+
type CodePipelineCloudWatchHandler = Handler<CodePipelineCloudWatchEvent, void>;
|
|
1907
|
+
type CodePipelineCloudWatchEvent = CodePipelineCloudWatchPipelineEvent | CodePipelineCloudWatchStageEvent | CodePipelineCloudWatchActionEvent;
|
|
1908
|
+
//#endregion
|
|
1909
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts
|
|
1910
|
+
interface StringMap {
|
|
1911
|
+
[name: string]: string;
|
|
1912
|
+
}
|
|
1913
|
+
type ChallengeName = "PASSWORD_VERIFIER" | "SMS_MFA" | "DEVICE_SRP_AUTH" | "DEVICE_PASSWORD_VERIFIER" | "ADMIN_NO_SRP_AUTH" | "SRP_A";
|
|
1914
|
+
interface ChallengeResult {
|
|
1915
|
+
challengeName: ChallengeName;
|
|
1916
|
+
challengeResult: boolean;
|
|
1917
|
+
challengeMetadata?: undefined;
|
|
1918
|
+
}
|
|
1919
|
+
interface CustomChallengeResult {
|
|
1920
|
+
challengeName: "CUSTOM_CHALLENGE";
|
|
1921
|
+
challengeResult: boolean;
|
|
1922
|
+
challengeMetadata?: string | undefined;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* Common attributes shared by all User Pool Lambda Trigger Events
|
|
1926
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html#cognito-user-pools-lambda-trigger-event-parameter-shared
|
|
1927
|
+
*/
|
|
1928
|
+
interface BaseTriggerEvent<T extends string> {
|
|
1929
|
+
version: string;
|
|
1930
|
+
region: string;
|
|
1931
|
+
userPoolId: string;
|
|
1932
|
+
triggerSource: T;
|
|
1933
|
+
userName: string;
|
|
1934
|
+
callerContext: {
|
|
1935
|
+
awsSdkVersion: string;
|
|
1936
|
+
clientId: string;
|
|
1937
|
+
};
|
|
1938
|
+
request: {};
|
|
1939
|
+
response: {};
|
|
1940
|
+
}
|
|
1941
|
+
//#endregion
|
|
1942
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts
|
|
1943
|
+
/**
|
|
1944
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-create-auth-challenge.html
|
|
1945
|
+
*/
|
|
1946
|
+
interface CreateAuthChallengeTriggerEvent extends BaseTriggerEvent<"CreateAuthChallenge_Authentication"> {
|
|
1947
|
+
request: {
|
|
1948
|
+
userAttributes: StringMap;
|
|
1949
|
+
challengeName: string;
|
|
1950
|
+
session: Array<ChallengeResult | CustomChallengeResult>;
|
|
1951
|
+
userNotFound?: boolean | undefined;
|
|
1952
|
+
clientMetadata?: StringMap | undefined;
|
|
1953
|
+
};
|
|
1954
|
+
response: {
|
|
1955
|
+
publicChallengeParameters: StringMap;
|
|
1956
|
+
privateChallengeParameters: StringMap;
|
|
1957
|
+
challengeMetadata: string;
|
|
1958
|
+
};
|
|
1959
|
+
}
|
|
1960
|
+
type CreateAuthChallengeTriggerHandler = Handler<CreateAuthChallengeTriggerEvent>;
|
|
1961
|
+
//#endregion
|
|
1962
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts
|
|
1963
|
+
interface BaseCustomEmailSenderTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
1964
|
+
request: {
|
|
1965
|
+
type: string;
|
|
1966
|
+
code: string | null;
|
|
1967
|
+
userAttributes: StringMap;
|
|
1968
|
+
clientMetadata?: StringMap | undefined;
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
type AccountTakeOverActionType = "BLOCK" | "NO_ACTION" | "MFA" | "MFA_IF_CONFIGURED" | "MFA_REQUIRED";
|
|
1972
|
+
interface CustomEmailSender_AccountTakeOverNotification_UserAttributes {
|
|
1973
|
+
EVENT_ID: string;
|
|
1974
|
+
USER_NAME: string;
|
|
1975
|
+
IP_ADDRESS: string;
|
|
1976
|
+
ACCOUNT_TAKE_OVER_ACTION: AccountTakeOverActionType;
|
|
1977
|
+
ONE_CLICK_LINK_VALID: string;
|
|
1978
|
+
ONE_CLICK_LINK_INVALID: string;
|
|
1979
|
+
LOGIN_TIME: string;
|
|
1980
|
+
FEEDBACK_TOKEN: string;
|
|
1981
|
+
CITY?: string | undefined;
|
|
1982
|
+
COUNTRY?: string | undefined;
|
|
1983
|
+
DEVICE_NAME?: string | undefined;
|
|
1984
|
+
}
|
|
1985
|
+
interface CustomEmailSenderSignUpTriggerEvent extends BaseCustomEmailSenderTriggerEvent<"CustomEmailSender_SignUp"> {}
|
|
1986
|
+
interface CustomEmailSenderResendCodeTriggerEvent extends BaseCustomEmailSenderTriggerEvent<"CustomEmailSender_ResendCode"> {}
|
|
1987
|
+
interface CustomEmailSenderForgotPasswordTriggerEvent extends BaseCustomEmailSenderTriggerEvent<"CustomEmailSender_ForgotPassword"> {}
|
|
1988
|
+
interface CustomEmailSenderUpdateUserAttributeTriggerEvent extends BaseCustomEmailSenderTriggerEvent<"CustomEmailSender_UpdateUserAttribute"> {}
|
|
1989
|
+
interface CustomEmailSenderVerifyUserAttributeTriggerEvent extends BaseCustomEmailSenderTriggerEvent<"CustomEmailSender_VerifyUserAttribute"> {}
|
|
1990
|
+
interface CustomEmailSenderAdminCreateUserTriggerEvent extends BaseCustomEmailSenderTriggerEvent<"CustomEmailSender_AdminCreateUser"> {}
|
|
1991
|
+
interface CustomEmailSenderAuthenticationTriggerEvent extends BaseCustomEmailSenderTriggerEvent<"CustomEmailSender_Authentication"> {}
|
|
1992
|
+
interface CustomEmailSenderAccountTakeOverNotificationTriggerEvent extends BaseTriggerEvent<"CustomEmailSender_AccountTakeOverNotification"> {
|
|
1993
|
+
request: {
|
|
1994
|
+
type: string;
|
|
1995
|
+
code: string | null;
|
|
1996
|
+
userAttributes: CustomEmailSender_AccountTakeOverNotification_UserAttributes;
|
|
1997
|
+
clientMetadata?: StringMap | undefined;
|
|
1998
|
+
};
|
|
1999
|
+
}
|
|
2000
|
+
/**
|
|
2001
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-email-sender.html
|
|
2002
|
+
*/
|
|
2003
|
+
type CustomEmailSenderTriggerEvent = CustomEmailSenderSignUpTriggerEvent | CustomEmailSenderResendCodeTriggerEvent | CustomEmailSenderForgotPasswordTriggerEvent | CustomEmailSenderUpdateUserAttributeTriggerEvent | CustomEmailSenderVerifyUserAttributeTriggerEvent | CustomEmailSenderAdminCreateUserTriggerEvent | CustomEmailSenderAuthenticationTriggerEvent | CustomEmailSenderAccountTakeOverNotificationTriggerEvent;
|
|
2004
|
+
type CustomEmailSenderTriggerHandler = Handler<CustomEmailSenderTriggerEvent>;
|
|
2005
|
+
//#endregion
|
|
2006
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts
|
|
2007
|
+
interface BaseCustomMessageTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2008
|
+
request: {
|
|
2009
|
+
userAttributes: StringMap;
|
|
2010
|
+
codeParameter: string;
|
|
2011
|
+
linkParameter: string;
|
|
2012
|
+
/**
|
|
2013
|
+
* This is null for all events other than the AdminCreateUser action.
|
|
2014
|
+
*/
|
|
2015
|
+
usernameParameter: string | null;
|
|
2016
|
+
clientMetadata?: StringMap | undefined;
|
|
2017
|
+
};
|
|
2018
|
+
response: {
|
|
2019
|
+
smsMessage: string | null;
|
|
2020
|
+
emailMessage: string | null;
|
|
2021
|
+
emailSubject: string | null;
|
|
2022
|
+
};
|
|
2023
|
+
}
|
|
2024
|
+
type CustomMessageAdminCreateUserTriggerEvent = BaseCustomMessageTriggerEvent<"CustomMessage_AdminCreateUser">;
|
|
2025
|
+
type CustomMessageAuthenticationTriggerEvent = BaseCustomMessageTriggerEvent<"CustomMessage_Authentication">;
|
|
2026
|
+
type CustomMessageForgotPasswordTriggerEvent = BaseCustomMessageTriggerEvent<"CustomMessage_ForgotPassword">;
|
|
2027
|
+
type CustomMessageResendCodeTriggerEvent = BaseCustomMessageTriggerEvent<"CustomMessage_ResendCode">;
|
|
2028
|
+
type CustomMessageSignUpTriggerEvent = BaseCustomMessageTriggerEvent<"CustomMessage_SignUp">;
|
|
2029
|
+
type CustomMessageUpdateUserAttributeTriggerEvent = BaseCustomMessageTriggerEvent<"CustomMessage_UpdateUserAttribute">;
|
|
2030
|
+
type CustomMessageVerifyUserAttributeTriggerEvent = BaseCustomMessageTriggerEvent<"CustomMessage_VerifyUserAttribute">;
|
|
2031
|
+
/**
|
|
2032
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html
|
|
2033
|
+
*/
|
|
2034
|
+
type CustomMessageTriggerEvent = CustomMessageSignUpTriggerEvent | CustomMessageAdminCreateUserTriggerEvent | CustomMessageResendCodeTriggerEvent | CustomMessageForgotPasswordTriggerEvent | CustomMessageUpdateUserAttributeTriggerEvent | CustomMessageVerifyUserAttributeTriggerEvent | CustomMessageAuthenticationTriggerEvent;
|
|
2035
|
+
type CustomMessageTriggerHandler = Handler<CustomMessageTriggerEvent>;
|
|
2036
|
+
//#endregion
|
|
2037
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts
|
|
2038
|
+
interface BaseCustomSMSSenderTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2039
|
+
request: {
|
|
2040
|
+
type: string;
|
|
2041
|
+
code: string | null;
|
|
2042
|
+
userAttributes: StringMap;
|
|
2043
|
+
clientMetadata?: StringMap | undefined;
|
|
2044
|
+
};
|
|
2045
|
+
}
|
|
2046
|
+
interface CustomSMSSenderSignUpTriggerEvent extends BaseCustomSMSSenderTriggerEvent<"CustomSMSSender_SignUp"> {}
|
|
2047
|
+
interface CustomSMSSenderResendCodeTriggerEvent extends BaseCustomSMSSenderTriggerEvent<"CustomSMSSender_ResendCode"> {}
|
|
2048
|
+
interface CustomSMSSenderForgotPasswordTriggerEvent extends BaseCustomSMSSenderTriggerEvent<"CustomSMSSender_ForgotPassword"> {}
|
|
2049
|
+
interface CustomSMSSenderUpdateUserAttributeTriggerEvent extends BaseCustomSMSSenderTriggerEvent<"CustomSMSSender_UpdateUserAttribute"> {}
|
|
2050
|
+
interface CustomSMSSenderVerifyUserAttributeTriggerEvent extends BaseCustomSMSSenderTriggerEvent<"CustomSMSSender_VerifyUserAttribute"> {}
|
|
2051
|
+
interface CustomSMSSenderAdminCreateUserTriggerEvent extends BaseCustomSMSSenderTriggerEvent<"CustomSMSSender_AdminCreateUser"> {}
|
|
2052
|
+
interface CustomSMSSenderAuthenticationUserTriggerEvent extends BaseCustomSMSSenderTriggerEvent<"CustomSMSSender_Authentication"> {}
|
|
2053
|
+
/**
|
|
2054
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html
|
|
2055
|
+
*/
|
|
2056
|
+
type CustomSMSSenderTriggerEvent = CustomSMSSenderSignUpTriggerEvent | CustomSMSSenderResendCodeTriggerEvent | CustomSMSSenderForgotPasswordTriggerEvent | CustomSMSSenderUpdateUserAttributeTriggerEvent | CustomSMSSenderVerifyUserAttributeTriggerEvent | CustomSMSSenderAdminCreateUserTriggerEvent | CustomSMSSenderAuthenticationUserTriggerEvent;
|
|
2057
|
+
type CustomSMSSenderTriggerHandler = Handler<CustomSMSSenderTriggerEvent>;
|
|
2058
|
+
//#endregion
|
|
2059
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts
|
|
2060
|
+
/**
|
|
2061
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-define-auth-challenge.html
|
|
2062
|
+
*/
|
|
2063
|
+
interface DefineAuthChallengeTriggerEvent extends BaseTriggerEvent<"DefineAuthChallenge_Authentication"> {
|
|
2064
|
+
request: {
|
|
2065
|
+
userAttributes: StringMap;
|
|
2066
|
+
session: Array<ChallengeResult | CustomChallengeResult>;
|
|
2067
|
+
userNotFound?: boolean | undefined;
|
|
2068
|
+
clientMetadata?: StringMap | undefined;
|
|
2069
|
+
};
|
|
2070
|
+
response: {
|
|
2071
|
+
challengeName?: string | undefined;
|
|
2072
|
+
failAuthentication: boolean;
|
|
2073
|
+
issueTokens: boolean;
|
|
2074
|
+
};
|
|
2075
|
+
}
|
|
2076
|
+
type DefineAuthChallengeTriggerHandler = Handler<DefineAuthChallengeTriggerEvent>;
|
|
2077
|
+
//#endregion
|
|
2078
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/inbound-federation.d.ts
|
|
2079
|
+
type InboundFederationProviderType = "OIDC" | "SAML" | "Facebook" | "Google" | "SignInWithApple" | "LoginWithAmazon";
|
|
2080
|
+
/**
|
|
2081
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-inbound-federation.html
|
|
2082
|
+
*/
|
|
2083
|
+
interface InboundFederationTriggerEvent extends BaseTriggerEvent<"InboundFederation_ExternalProvider"> {
|
|
2084
|
+
request: {
|
|
2085
|
+
providerName: string;
|
|
2086
|
+
providerType: InboundFederationProviderType;
|
|
2087
|
+
attributes: {
|
|
2088
|
+
/** OAuth token response. Present for OIDC and social providers. */
|
|
2089
|
+
tokenResponse?: StringMap | undefined;
|
|
2090
|
+
/** Decoded JWT claims. Present for OIDC and social providers. */
|
|
2091
|
+
idToken?: StringMap | undefined;
|
|
2092
|
+
/** Extended profile info. Present for OIDC and social providers. */
|
|
2093
|
+
userInfo?: StringMap | undefined;
|
|
2094
|
+
/** SAML assertion attributes. Present for SAML providers. */
|
|
2095
|
+
samlResponse?: StringMap | undefined;
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
response: {
|
|
2099
|
+
/**
|
|
2100
|
+
* User attributes to apply to the user profile.
|
|
2101
|
+
* All attributes to be retained must be included; omitted attributes are dropped.
|
|
2102
|
+
* Return an empty object `{}` to retain all original attributes unchanged.
|
|
2103
|
+
*/
|
|
2104
|
+
userAttributesToMap: StringMap;
|
|
2105
|
+
};
|
|
2106
|
+
}
|
|
2107
|
+
type InboundFederationTriggerHandler = Handler<InboundFederationTriggerEvent>;
|
|
2108
|
+
//#endregion
|
|
2109
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts
|
|
2110
|
+
/**
|
|
2111
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-authentication.html
|
|
2112
|
+
*/
|
|
2113
|
+
interface PostAuthenticationTriggerEvent extends BaseTriggerEvent<"PostAuthentication_Authentication"> {
|
|
2114
|
+
request: {
|
|
2115
|
+
userAttributes: StringMap;
|
|
2116
|
+
newDeviceUsed: boolean;
|
|
2117
|
+
clientMetadata?: StringMap | undefined;
|
|
2118
|
+
};
|
|
2119
|
+
}
|
|
2120
|
+
type PostAuthenticationTriggerHandler = Handler<PostAuthenticationTriggerEvent>;
|
|
2121
|
+
//#endregion
|
|
2122
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts
|
|
2123
|
+
interface BasePostConfirmationTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2124
|
+
request: {
|
|
2125
|
+
userAttributes: StringMap;
|
|
2126
|
+
clientMetadata?: StringMap | undefined;
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
type PostConfirmationConfirmSignUpTriggerEvent = BasePostConfirmationTriggerEvent<"PostConfirmation_ConfirmSignUp">;
|
|
2130
|
+
type PostConfirmationConfirmForgotPassword = BasePostConfirmationTriggerEvent<"PostConfirmation_ConfirmForgotPassword">;
|
|
2131
|
+
/**
|
|
2132
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html
|
|
2133
|
+
*/
|
|
2134
|
+
type PostConfirmationTriggerEvent = PostConfirmationConfirmSignUpTriggerEvent | PostConfirmationConfirmForgotPassword;
|
|
2135
|
+
type PostConfirmationTriggerHandler = Handler<PostConfirmationTriggerEvent>;
|
|
2136
|
+
//#endregion
|
|
2137
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts
|
|
2138
|
+
/**
|
|
2139
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-authentication.html
|
|
2140
|
+
*/
|
|
2141
|
+
interface PreAuthenticationTriggerEvent extends BaseTriggerEvent<"PreAuthentication_Authentication"> {
|
|
2142
|
+
request: {
|
|
2143
|
+
userAttributes: StringMap;
|
|
2144
|
+
userNotFound?: boolean | undefined;
|
|
2145
|
+
validationData?: StringMap | undefined;
|
|
2146
|
+
clientMetadata?: StringMap | undefined;
|
|
2147
|
+
};
|
|
2148
|
+
}
|
|
2149
|
+
type PreAuthenticationTriggerHandler = Handler<PreAuthenticationTriggerEvent>;
|
|
2150
|
+
//#endregion
|
|
2151
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts
|
|
2152
|
+
interface BasePreSignUpTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2153
|
+
request: {
|
|
2154
|
+
userAttributes: StringMap;
|
|
2155
|
+
validationData?: StringMap | undefined;
|
|
2156
|
+
clientMetadata?: StringMap | undefined;
|
|
2157
|
+
};
|
|
2158
|
+
response: {
|
|
2159
|
+
autoConfirmUser: boolean;
|
|
2160
|
+
autoVerifyEmail: boolean;
|
|
2161
|
+
autoVerifyPhone: boolean;
|
|
2162
|
+
};
|
|
2163
|
+
}
|
|
2164
|
+
type PreSignUpEmailTriggerEvent = BasePreSignUpTriggerEvent<"PreSignUp_SignUp">;
|
|
2165
|
+
type PreSignUpExternalProviderTriggerEvent = BasePreSignUpTriggerEvent<"PreSignUp_ExternalProvider">;
|
|
2166
|
+
type PreSignUpAdminCreateUserTriggerEvent = BasePreSignUpTriggerEvent<"PreSignUp_AdminCreateUser">;
|
|
2167
|
+
/**
|
|
2168
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html
|
|
2169
|
+
*/
|
|
2170
|
+
type PreSignUpTriggerEvent = PreSignUpEmailTriggerEvent | PreSignUpExternalProviderTriggerEvent | PreSignUpAdminCreateUserTriggerEvent;
|
|
2171
|
+
type PreSignUpTriggerHandler = Handler<PreSignUpTriggerEvent>;
|
|
2172
|
+
//#endregion
|
|
2173
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts
|
|
2174
|
+
interface GroupOverrideDetails {
|
|
2175
|
+
groupsToOverride?: string[] | undefined;
|
|
2176
|
+
iamRolesToOverride?: string[] | undefined;
|
|
2177
|
+
preferredRole?: string | undefined;
|
|
2178
|
+
}
|
|
2179
|
+
interface BasePreTokenGenerationTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2180
|
+
request: {
|
|
2181
|
+
userAttributes: StringMap;
|
|
2182
|
+
groupConfiguration: GroupOverrideDetails;
|
|
2183
|
+
clientMetadata?: StringMap | undefined;
|
|
2184
|
+
};
|
|
2185
|
+
response: {
|
|
2186
|
+
claimsOverrideDetails: {
|
|
2187
|
+
claimsToAddOrOverride?: StringMap | undefined;
|
|
2188
|
+
claimsToSuppress?: string[] | undefined;
|
|
2189
|
+
groupOverrideDetails?: GroupOverrideDetails | undefined;
|
|
2190
|
+
};
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2193
|
+
type PreTokenGenerationHostedAuthTriggerEvent = BasePreTokenGenerationTriggerEvent<"TokenGeneration_HostedAuth">;
|
|
2194
|
+
type PreTokenGenerationAuthenticationTriggerEvent = BasePreTokenGenerationTriggerEvent<"TokenGeneration_Authentication">;
|
|
2195
|
+
type PreTokenGenerationNewPasswordChallengeTriggerEvent = BasePreTokenGenerationTriggerEvent<"TokenGeneration_NewPasswordChallenge">;
|
|
2196
|
+
type PreTokenGenerationAuthenticateDeviceTriggerEvent = BasePreTokenGenerationTriggerEvent<"TokenGeneration_AuthenticateDevice">;
|
|
2197
|
+
type PreTokenGenerationRefreshTokensTriggerEvent = BasePreTokenGenerationTriggerEvent<"TokenGeneration_RefreshTokens">;
|
|
2198
|
+
/**
|
|
2199
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html
|
|
2200
|
+
*/
|
|
2201
|
+
type PreTokenGenerationTriggerEvent = PreTokenGenerationHostedAuthTriggerEvent | PreTokenGenerationAuthenticationTriggerEvent | PreTokenGenerationNewPasswordChallengeTriggerEvent | PreTokenGenerationAuthenticateDeviceTriggerEvent | PreTokenGenerationRefreshTokensTriggerEvent;
|
|
2202
|
+
type PreTokenGenerationTriggerHandler = Handler<PreTokenGenerationTriggerEvent>;
|
|
2203
|
+
//#endregion
|
|
2204
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts
|
|
2205
|
+
interface GroupOverrideDetailsV2 {
|
|
2206
|
+
groupsToOverride?: string[] | undefined;
|
|
2207
|
+
iamRolesToOverride?: string[] | undefined;
|
|
2208
|
+
preferredRole?: string | undefined;
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html#cognito-user-pools-lambda-trigger-syntax-pre-token-generation
|
|
2212
|
+
*/
|
|
2213
|
+
interface IdTokenGeneration {
|
|
2214
|
+
claimsToAddOrOverride?: StringMap | undefined;
|
|
2215
|
+
claimsToSuppress?: string[] | undefined;
|
|
2216
|
+
}
|
|
2217
|
+
interface AccessTokenGeneration {
|
|
2218
|
+
claimsToAddOrOverride?: StringMap | undefined;
|
|
2219
|
+
claimsToSuppress?: string[] | undefined;
|
|
2220
|
+
scopesToAdd?: string[] | undefined;
|
|
2221
|
+
scopesToSuppress?: string[] | undefined;
|
|
2222
|
+
}
|
|
2223
|
+
interface ClaimsAndScopeOverrideDetails {
|
|
2224
|
+
idTokenGeneration?: IdTokenGeneration | undefined;
|
|
2225
|
+
accessTokenGeneration?: AccessTokenGeneration | undefined;
|
|
2226
|
+
groupOverrideDetails?: GroupOverrideDetailsV2 | undefined;
|
|
2227
|
+
}
|
|
2228
|
+
interface BasePreTokenGenerationV2TriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2229
|
+
request: {
|
|
2230
|
+
userAttributes: StringMap;
|
|
2231
|
+
groupConfiguration: GroupOverrideDetailsV2;
|
|
2232
|
+
scopes?: string[] | undefined;
|
|
2233
|
+
clientMetadata?: StringMap | undefined;
|
|
2234
|
+
};
|
|
2235
|
+
response: {
|
|
2236
|
+
claimsAndScopeOverrideDetails: ClaimsAndScopeOverrideDetails;
|
|
2237
|
+
};
|
|
2238
|
+
}
|
|
2239
|
+
type PreTokenGenerationHostedAuthV2TriggerEvent = BasePreTokenGenerationV2TriggerEvent<"TokenGeneration_HostedAuth">;
|
|
2240
|
+
type PreTokenGenerationAuthenticationV2TriggerEvent = BasePreTokenGenerationV2TriggerEvent<"TokenGeneration_Authentication">;
|
|
2241
|
+
type PreTokenGenerationNewPasswordChallengeV2TriggerEvent = BasePreTokenGenerationV2TriggerEvent<"TokenGeneration_NewPasswordChallenge">;
|
|
2242
|
+
type PreTokenGenerationAuthenticateDeviceV2TriggerEvent = BasePreTokenGenerationV2TriggerEvent<"TokenGeneration_AuthenticateDevice">;
|
|
2243
|
+
type PreTokenGenerationRefreshTokensV2TriggerEvent = BasePreTokenGenerationV2TriggerEvent<"TokenGeneration_RefreshTokens">;
|
|
2244
|
+
/**
|
|
2245
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html
|
|
2246
|
+
*/
|
|
2247
|
+
type PreTokenGenerationV2TriggerEvent = PreTokenGenerationHostedAuthV2TriggerEvent | PreTokenGenerationAuthenticationV2TriggerEvent | PreTokenGenerationNewPasswordChallengeV2TriggerEvent | PreTokenGenerationAuthenticateDeviceV2TriggerEvent | PreTokenGenerationRefreshTokensV2TriggerEvent;
|
|
2248
|
+
type PreTokenGenerationV2TriggerHandler = Handler<PreTokenGenerationV2TriggerEvent>;
|
|
2249
|
+
//#endregion
|
|
2250
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v3.d.ts
|
|
2251
|
+
interface GroupOverrideDetailsV3 {
|
|
2252
|
+
groupsToOverride?: string[];
|
|
2253
|
+
iamRolesToOverride?: string[];
|
|
2254
|
+
preferredRole?: string;
|
|
2255
|
+
}
|
|
2256
|
+
interface IdTokenGenerationV3 {
|
|
2257
|
+
claimsToAddOrOverride?: StringMap;
|
|
2258
|
+
claimsToSuppress?: string[];
|
|
2259
|
+
}
|
|
2260
|
+
interface AccessTokenGenerationV3 {
|
|
2261
|
+
claimsToAddOrOverride?: StringMap;
|
|
2262
|
+
claimsToSuppress?: string[];
|
|
2263
|
+
scopesToAdd?: string[];
|
|
2264
|
+
scopesToSuppress?: string[];
|
|
2265
|
+
}
|
|
2266
|
+
interface ClaimsAndScopeOverrideDetailsV3 {
|
|
2267
|
+
idTokenGeneration?: IdTokenGenerationV3;
|
|
2268
|
+
accessTokenGeneration?: AccessTokenGenerationV3;
|
|
2269
|
+
groupOverrideDetails?: GroupOverrideDetailsV3;
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-generation.html
|
|
2273
|
+
*/
|
|
2274
|
+
interface BasePreTokenGenerationV3TriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2275
|
+
version: "3";
|
|
2276
|
+
request: {
|
|
2277
|
+
userAttributes: StringMap;
|
|
2278
|
+
groupConfiguration: GroupOverrideDetailsV3;
|
|
2279
|
+
scopes?: string[];
|
|
2280
|
+
clientMetadata?: StringMap;
|
|
2281
|
+
};
|
|
2282
|
+
response: {
|
|
2283
|
+
claimsAndScopeOverrideDetails: ClaimsAndScopeOverrideDetailsV3;
|
|
2284
|
+
};
|
|
2285
|
+
}
|
|
2286
|
+
type PreTokenGenerationClientCredentialsV3TriggerEvent = BasePreTokenGenerationV3TriggerEvent<"TokenGeneration_ClientCredentials">;
|
|
2287
|
+
type PreTokenGenerationV3TriggerEvent = PreTokenGenerationClientCredentialsV3TriggerEvent;
|
|
2288
|
+
type PreTokenGenerationV3TriggerHandler = Handler<PreTokenGenerationV3TriggerEvent>;
|
|
2289
|
+
//#endregion
|
|
2290
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts
|
|
2291
|
+
type UserStatus = "UNCONFIRMED" | "CONFIRMED" | "ARCHIVED" | "COMPROMISED" | "UNKNOWN" | "RESET_REQUIRED" | "FORCE_CHANGE_PASSWORD";
|
|
2292
|
+
interface BaseUserMigrationTriggerEvent<T extends string> extends BaseTriggerEvent<T> {
|
|
2293
|
+
request: {
|
|
2294
|
+
password: string;
|
|
2295
|
+
validationData?: StringMap | undefined;
|
|
2296
|
+
clientMetadata?: StringMap | undefined;
|
|
2297
|
+
};
|
|
2298
|
+
response: {
|
|
2299
|
+
userAttributes: StringMap;
|
|
2300
|
+
finalUserStatus?: UserStatus | undefined;
|
|
2301
|
+
messageAction?: "RESEND" | "SUPPRESS" | undefined;
|
|
2302
|
+
desiredDeliveryMediums: Array<"SMS" | "EMAIL">;
|
|
2303
|
+
forceAliasCreation?: boolean | undefined;
|
|
2304
|
+
enableSMSMFA?: boolean | undefined;
|
|
2305
|
+
};
|
|
2306
|
+
}
|
|
2307
|
+
type UserMigrationAuthenticationTriggerEvent = BaseUserMigrationTriggerEvent<"UserMigration_Authentication">;
|
|
2308
|
+
type UserMigrationForgotPasswordTriggerEvent = BaseUserMigrationTriggerEvent<"UserMigration_ForgotPassword">;
|
|
2309
|
+
/**
|
|
2310
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-migrate-user.html
|
|
2311
|
+
*/
|
|
2312
|
+
type UserMigrationTriggerEvent = UserMigrationAuthenticationTriggerEvent | UserMigrationForgotPasswordTriggerEvent;
|
|
2313
|
+
type UserMigrationTriggerHandler = Handler<UserMigrationTriggerEvent>;
|
|
2314
|
+
//#endregion
|
|
2315
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts
|
|
2316
|
+
/**
|
|
2317
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-verify-auth-challenge-response.html
|
|
2318
|
+
*/
|
|
2319
|
+
interface VerifyAuthChallengeResponseTriggerEvent extends BaseTriggerEvent<"VerifyAuthChallengeResponse_Authentication"> {
|
|
2320
|
+
request: {
|
|
2321
|
+
userAttributes: StringMap;
|
|
2322
|
+
privateChallengeParameters: StringMap;
|
|
2323
|
+
challengeAnswer: string;
|
|
2324
|
+
userNotFound?: boolean | undefined;
|
|
2325
|
+
clientMetadata?: StringMap | undefined;
|
|
2326
|
+
};
|
|
2327
|
+
response: {
|
|
2328
|
+
answerCorrect: boolean;
|
|
2329
|
+
};
|
|
2330
|
+
}
|
|
2331
|
+
type VerifyAuthChallengeResponseTriggerHandler = Handler<VerifyAuthChallengeResponseTriggerEvent>;
|
|
2332
|
+
//#endregion
|
|
2333
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts
|
|
2334
|
+
/**
|
|
2335
|
+
* Cognito User Pool event
|
|
2336
|
+
* @deprecated Please use specific event types instead
|
|
2337
|
+
* http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html
|
|
2338
|
+
*/
|
|
2339
|
+
interface CognitoUserPoolTriggerEvent {
|
|
2340
|
+
version: number;
|
|
2341
|
+
triggerSource: "PreSignUp_SignUp" | "PreSignUp_ExternalProvider" | "PostConfirmation_ConfirmSignUp" | "PreAuthentication_Authentication" | "PostAuthentication_Authentication" | "CustomMessage_SignUp" | "CustomMessage_AdminCreateUser" | "CustomMessage_ResendCode" | "CustomMessage_ForgotPassword" | "CustomMessage_UpdateUserAttribute" | "CustomMessage_VerifyUserAttribute" | "CustomMessage_Authentication" | "DefineAuthChallenge_Authentication" | "CreateAuthChallenge_Authentication" | "VerifyAuthChallengeResponse_Authentication" | "PreSignUp_AdminCreateUser" | "PostConfirmation_ConfirmForgotPassword" | "TokenGeneration_HostedAuth" | "TokenGeneration_Authentication" | "TokenGeneration_NewPasswordChallenge" | "TokenGeneration_AuthenticateDevice" | "TokenGeneration_RefreshTokens" | "TokenGeneration_ClientCredentials" | "UserMigration_Authentication" | "UserMigration_ForgotPassword" | "InboundFederation_ExternalProvider";
|
|
2342
|
+
region: string;
|
|
2343
|
+
userPoolId: string;
|
|
2344
|
+
userName?: string | undefined;
|
|
2345
|
+
callerContext: {
|
|
2346
|
+
awsSdkVersion: string;
|
|
2347
|
+
clientId: string;
|
|
2348
|
+
};
|
|
2349
|
+
request: {
|
|
2350
|
+
userAttributes: {
|
|
2351
|
+
[key: string]: string;
|
|
2352
|
+
};
|
|
2353
|
+
validationData?: {
|
|
2354
|
+
[key: string]: string;
|
|
2355
|
+
} | undefined;
|
|
2356
|
+
codeParameter?: string | undefined;
|
|
2357
|
+
linkParameter?: string | undefined;
|
|
2358
|
+
usernameParameter?: string | undefined;
|
|
2359
|
+
newDeviceUsed?: boolean | undefined;
|
|
2360
|
+
session?: Array<{
|
|
2361
|
+
challengeName: "CUSTOM_CHALLENGE" | "PASSWORD_VERIFIER" | "SMS_MFA" | "DEVICE_SRP_AUTH" | "DEVICE_PASSWORD_VERIFIER" | "ADMIN_NO_SRP_AUTH" | "SRP_A";
|
|
2362
|
+
challengeResult: boolean;
|
|
2363
|
+
challengeMetadata?: string | undefined;
|
|
2364
|
+
}> | undefined;
|
|
2365
|
+
challengeName?: string | undefined;
|
|
2366
|
+
privateChallengeParameters?: {
|
|
2367
|
+
[key: string]: string;
|
|
2368
|
+
} | undefined;
|
|
2369
|
+
challengeAnswer?: string | undefined;
|
|
2370
|
+
password?: string | undefined;
|
|
2371
|
+
clientMetadata?: {
|
|
2372
|
+
[key: string]: string;
|
|
2373
|
+
} | undefined;
|
|
2374
|
+
userNotFound?: boolean | undefined;
|
|
2375
|
+
};
|
|
2376
|
+
response: {
|
|
2377
|
+
autoConfirmUser?: boolean | undefined;
|
|
2378
|
+
autoVerifyPhone?: boolean | undefined;
|
|
2379
|
+
autoVerifyEmail?: boolean | undefined;
|
|
2380
|
+
smsMessage?: string | undefined;
|
|
2381
|
+
emailMessage?: string | undefined;
|
|
2382
|
+
emailSubject?: string | undefined;
|
|
2383
|
+
challengeName?: string | undefined;
|
|
2384
|
+
issueTokens?: boolean | undefined;
|
|
2385
|
+
failAuthentication?: boolean | undefined;
|
|
2386
|
+
publicChallengeParameters?: {
|
|
2387
|
+
[key: string]: string;
|
|
2388
|
+
} | undefined;
|
|
2389
|
+
privateChallengeParameters?: {
|
|
2390
|
+
[key: string]: string;
|
|
2391
|
+
} | undefined;
|
|
2392
|
+
challengeMetadata?: string | undefined;
|
|
2393
|
+
answerCorrect?: boolean | undefined;
|
|
2394
|
+
userAttributes?: {
|
|
2395
|
+
[key: string]: string;
|
|
2396
|
+
} | undefined;
|
|
2397
|
+
finalUserStatus?: "CONFIRMED" | "RESET_REQUIRED" | undefined;
|
|
2398
|
+
messageAction?: "SUPPRESS" | undefined;
|
|
2399
|
+
desiredDeliveryMediums?: Array<"EMAIL" | "SMS"> | undefined;
|
|
2400
|
+
forceAliasCreation?: boolean | undefined;
|
|
2401
|
+
claimsOverrideDetails?: {
|
|
2402
|
+
claimsToAddOrOverride?: {
|
|
2403
|
+
[key: string]: string;
|
|
2404
|
+
} | undefined;
|
|
2405
|
+
claimsToSuppress?: string[] | undefined;
|
|
2406
|
+
groupOverrideDetails?: null | {
|
|
2407
|
+
groupsToOverride?: string[] | undefined;
|
|
2408
|
+
iamRolesToOverride?: string[] | undefined;
|
|
2409
|
+
preferredRole?: string | undefined;
|
|
2410
|
+
} | undefined;
|
|
2411
|
+
} | undefined;
|
|
2412
|
+
};
|
|
2413
|
+
}
|
|
2414
|
+
/**
|
|
2415
|
+
* @deprecated Please use specific event types instead
|
|
2416
|
+
*/
|
|
2417
|
+
type CognitoUserPoolEvent = CognitoUserPoolTriggerEvent;
|
|
2418
|
+
/**
|
|
2419
|
+
* @deprecated Please use specific event handler types instead
|
|
2420
|
+
*/
|
|
2421
|
+
type CognitoUserPoolTriggerHandler = Handler<CognitoUserPoolTriggerEvent>;
|
|
2422
|
+
//#endregion
|
|
2423
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts
|
|
2424
|
+
type ConnectContactFlowHandler = Handler<ConnectContactFlowEvent, ConnectContactFlowResult>;
|
|
2425
|
+
type ConnectContactFlowCallback = Callback<ConnectContactFlowResult>;
|
|
2426
|
+
// Connect
|
|
2427
|
+
// https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html
|
|
2428
|
+
interface ConnectContactFlowEvent {
|
|
2429
|
+
Details: {
|
|
2430
|
+
ContactData: {
|
|
2431
|
+
Attributes: {
|
|
2432
|
+
[key: string]: string;
|
|
2433
|
+
};
|
|
2434
|
+
Channel: ConnectContactFlowChannel;
|
|
2435
|
+
ContactId: string;
|
|
2436
|
+
CustomerEndpoint: ConnectContactFlowEndpoint | null;
|
|
2437
|
+
InitialContactId: string;
|
|
2438
|
+
InitiationMethod: ConnectContactFlowInitiationMethod;
|
|
2439
|
+
InstanceARN: string;
|
|
2440
|
+
PreviousContactId: string;
|
|
2441
|
+
Queue: ConnectContactFlowQueue | null;
|
|
2442
|
+
SystemEndpoint: ConnectContactFlowEndpoint | null;
|
|
2443
|
+
MediaStreams: {
|
|
2444
|
+
Customer: {
|
|
2445
|
+
Audio: CustomerAudio;
|
|
2446
|
+
};
|
|
2447
|
+
};
|
|
2448
|
+
};
|
|
2449
|
+
Parameters: {
|
|
2450
|
+
[key: string]: string;
|
|
2451
|
+
};
|
|
2452
|
+
};
|
|
2453
|
+
Name: "ContactFlowEvent";
|
|
2454
|
+
}
|
|
2455
|
+
type ConnectContactFlowChannel = "VOICE" | "CHAT" | "EMAIL";
|
|
2456
|
+
type ConnectContactFlowInitiationMethod = "INBOUND" | "OUTBOUND" | "TRANSFER" | "CALLBACK" | "API";
|
|
2457
|
+
interface ConnectContactFlowEndpoint {
|
|
2458
|
+
Address: string;
|
|
2459
|
+
Type: "TELEPHONE_NUMBER";
|
|
2460
|
+
}
|
|
2461
|
+
interface ConnectContactFlowQueue {
|
|
2462
|
+
ARN: string;
|
|
2463
|
+
Name: string;
|
|
2464
|
+
}
|
|
2465
|
+
interface ConnectContactFlowResult {
|
|
2466
|
+
[key: string]: string | null;
|
|
2467
|
+
}
|
|
2468
|
+
type CustomerAudio = null // If Media Streaming has never been started.
|
|
2469
|
+
| StartedCustomerAudio // If Media Streaming has been started, but not stopped.
|
|
2470
|
+
| (StartedCustomerAudio & StoppedCustomerAudio); // If Media Streaming has been started and stopped.
|
|
2471
|
+
interface StartedCustomerAudio {
|
|
2472
|
+
StartFragmentNumber: string;
|
|
2473
|
+
StartTimestamp: string;
|
|
2474
|
+
StreamARN: string;
|
|
2475
|
+
}
|
|
2476
|
+
interface StoppedCustomerAudio {
|
|
2477
|
+
StopFragmentNumber: string;
|
|
2478
|
+
StopTimestamp: string;
|
|
2479
|
+
}
|
|
2480
|
+
//#endregion
|
|
2481
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts
|
|
2482
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2483
|
+
type DynamoDBStreamHandler = Handler<DynamoDBStreamEvent, DynamoDBBatchResponse | void>;
|
|
2484
|
+
// eslint-disable-next-line @definitelytyped/strict-export-declare-modifiers, @definitelytyped/no-single-element-tuple-type
|
|
2485
|
+
type Merge<T> = [{ [K in keyof T]: T[K]; }][number];
|
|
2486
|
+
// eslint-disable-next-line @definitelytyped/strict-export-declare-modifiers
|
|
2487
|
+
type ExclusivePropertyUnion<T, P = keyof T> = P extends any ? Merge<{ [K in Extract<keyof T, P>]: T[K]; } & { [K in Exclude<keyof T, P>]?: never; }> : never;
|
|
2488
|
+
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_AttributeValue.html
|
|
2489
|
+
type AttributeValue = ExclusivePropertyUnion<{
|
|
2490
|
+
B: string;
|
|
2491
|
+
BOOL: boolean;
|
|
2492
|
+
BS: string[];
|
|
2493
|
+
L: AttributeValue[];
|
|
2494
|
+
M: Record<string, AttributeValue>;
|
|
2495
|
+
N: string;
|
|
2496
|
+
NS: string[];
|
|
2497
|
+
NULL: boolean;
|
|
2498
|
+
S: string;
|
|
2499
|
+
SS: string[];
|
|
2500
|
+
}>;
|
|
2501
|
+
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_StreamRecord.html
|
|
2502
|
+
interface StreamRecord {
|
|
2503
|
+
ApproximateCreationDateTime?: number | undefined;
|
|
2504
|
+
Keys?: {
|
|
2505
|
+
[key: string]: AttributeValue;
|
|
2506
|
+
} | undefined;
|
|
2507
|
+
NewImage?: {
|
|
2508
|
+
[key: string]: AttributeValue;
|
|
2509
|
+
} | undefined;
|
|
2510
|
+
OldImage?: {
|
|
2511
|
+
[key: string]: AttributeValue;
|
|
2512
|
+
} | undefined;
|
|
2513
|
+
SequenceNumber?: string | undefined;
|
|
2514
|
+
SizeBytes?: number | undefined;
|
|
2515
|
+
StreamViewType?: "KEYS_ONLY" | "NEW_IMAGE" | "OLD_IMAGE" | "NEW_AND_OLD_IMAGES" | undefined;
|
|
2516
|
+
}
|
|
2517
|
+
// http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_Record.html
|
|
2518
|
+
interface DynamoDBRecord {
|
|
2519
|
+
awsRegion?: string | undefined;
|
|
2520
|
+
dynamodb?: StreamRecord | undefined;
|
|
2521
|
+
eventID?: string | undefined;
|
|
2522
|
+
eventName?: "INSERT" | "MODIFY" | "REMOVE" | undefined;
|
|
2523
|
+
eventSource?: string | undefined;
|
|
2524
|
+
eventSourceARN?: string | undefined;
|
|
2525
|
+
eventVersion?: string | undefined;
|
|
2526
|
+
userIdentity?: any;
|
|
2527
|
+
}
|
|
2528
|
+
// http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-ddb-update
|
|
2529
|
+
interface DynamoDBStreamEvent {
|
|
2530
|
+
Records: DynamoDBRecord[];
|
|
2531
|
+
}
|
|
2532
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting
|
|
2533
|
+
interface DynamoDBBatchResponse {
|
|
2534
|
+
batchItemFailures: DynamoDBBatchItemFailure[];
|
|
2535
|
+
}
|
|
2536
|
+
interface DynamoDBBatchItemFailure {
|
|
2537
|
+
itemIdentifier: string;
|
|
2538
|
+
}
|
|
2539
|
+
//#endregion
|
|
2540
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts
|
|
2541
|
+
/**
|
|
2542
|
+
* Guard Duty events
|
|
2543
|
+
* https://docs.aws.amazon.com/guardduty/latest/ug/monitor-with-eventbridge-s3-malware-protection.html
|
|
2544
|
+
*/
|
|
2545
|
+
interface GuardDutyScanResultNotificationEvent extends EventBridgeEvent<"GuardDuty Malware Protection Object Scan Result", GuardDutyScanResultNotificationEventDetail> {
|
|
2546
|
+
source: "aws.guardduty";
|
|
2547
|
+
}
|
|
2548
|
+
interface GuardDutyScanResultNotificationEventDetail {
|
|
2549
|
+
schemaVersion: "1.0";
|
|
2550
|
+
scanStatus: "COMPLETED" | "SKIPPED" | "FAILED";
|
|
2551
|
+
resourceType: "S3_OBJECT";
|
|
2552
|
+
s3ObjectDetails: {
|
|
2553
|
+
bucketName: string;
|
|
2554
|
+
objectKey: string;
|
|
2555
|
+
eTag: string;
|
|
2556
|
+
versionId: string;
|
|
2557
|
+
s3Throttled: boolean;
|
|
2558
|
+
};
|
|
2559
|
+
scanResultDetails: {
|
|
2560
|
+
scanResultStatus: "NO_THREATS_FOUND" | "THREATS_FOUND" | "UNSUPPORTED" | "ACCESS_DENIED" | "FAILED";
|
|
2561
|
+
threats: GuardDutyThreatDetail[] | null;
|
|
2562
|
+
};
|
|
2563
|
+
}
|
|
2564
|
+
interface GuardDutyThreatDetail {
|
|
2565
|
+
name: string;
|
|
2566
|
+
}
|
|
2567
|
+
type GuardDutyNotificationEvent = GuardDutyScanResultNotificationEvent;
|
|
2568
|
+
//#endregion
|
|
2569
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/iot.d.ts
|
|
2570
|
+
type IoTHandler = Handler<IoTEvent, void>;
|
|
2571
|
+
// IoT
|
|
2572
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/services-iot.html
|
|
2573
|
+
// IoT payload is not restriced to JSON, but JSON is highly recommended. Types as string, number or array are possible to use.
|
|
2574
|
+
type IoTEvent<T = never> = string | number | T;
|
|
2575
|
+
// PreProvisioningHook
|
|
2576
|
+
// https://docs.aws.amazon.com/iot/latest/developerguide/pre-provisioning-hook.html
|
|
2577
|
+
// 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.
|
|
2578
|
+
type IoTPreProvisioningHookHandler = Handler<IoTPreProvisioningHookEvent, IoTPreProvisioningHookResult>;
|
|
2579
|
+
interface IoTPreProvisioningHookEvent {
|
|
2580
|
+
claimCertificateId: string;
|
|
2581
|
+
certificateId: string;
|
|
2582
|
+
certificatePem: string;
|
|
2583
|
+
templateArn: string;
|
|
2584
|
+
clientId: string;
|
|
2585
|
+
parameters: Record<string, string>;
|
|
2586
|
+
}
|
|
2587
|
+
interface IoTPreProvisioningHookResult {
|
|
2588
|
+
allowProvisioning: boolean;
|
|
2589
|
+
parameterOverrides: Record<string, string>;
|
|
2590
|
+
}
|
|
2591
|
+
//#endregion
|
|
2592
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts
|
|
2593
|
+
type IoTProtocolType = "http" | "mqtt" | "tls";
|
|
2594
|
+
type IoTCustomAuthorizerHandler = Handler<IoTCustomAuthorizerEvent, IoTCustomAuthorizerResult>;
|
|
2595
|
+
interface IoTProtocolDataTLS {
|
|
2596
|
+
serverName: string; // The server name indication (SNI) host_name string.
|
|
2597
|
+
}
|
|
2598
|
+
interface IoTProtocolDataHTTP {
|
|
2599
|
+
headers: Record<string, string>;
|
|
2600
|
+
queryString: string;
|
|
2601
|
+
}
|
|
2602
|
+
interface IoTProtocolDataMQTT {
|
|
2603
|
+
username?: string;
|
|
2604
|
+
password?: string; // A base64-encoded string.
|
|
2605
|
+
clientId: string; // Included in the event only when the device sends the value.
|
|
2606
|
+
}
|
|
2607
|
+
interface IoTCustomAuthorizerEvent {
|
|
2608
|
+
token?: string;
|
|
2609
|
+
signatureVerified: boolean; // Indicates whether the device gateway has validated the signature.
|
|
2610
|
+
protocols: IoTProtocolType[]; // Indicates which protocols to expect for the request.
|
|
2611
|
+
protocolData: {
|
|
2612
|
+
tls?: IoTProtocolDataTLS;
|
|
2613
|
+
http?: IoTProtocolDataHTTP;
|
|
2614
|
+
mqtt?: IoTProtocolDataMQTT;
|
|
2615
|
+
};
|
|
2616
|
+
connectionMetadata: {
|
|
2617
|
+
id: string; // The connection ID. You can use this for logging.
|
|
2618
|
+
};
|
|
2619
|
+
}
|
|
2620
|
+
/**
|
|
2621
|
+
* IoT CustomAuthorizer AuthResponse.PolicyDocument.
|
|
2622
|
+
* https://docs.aws.amazon.com/iot/latest/developerguide/config-custom-auth.html#custom-auth-lambda
|
|
2623
|
+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html#Condition
|
|
2624
|
+
*/
|
|
2625
|
+
interface IoTCustomAuthorizerResult {
|
|
2626
|
+
isAuthenticated: boolean; // A Boolean that determines whether client can connect.
|
|
2627
|
+
principalId: string; // A string that identifies the connection in logs.
|
|
2628
|
+
disconnectAfterInSeconds: number;
|
|
2629
|
+
refreshAfterInSeconds: number;
|
|
2630
|
+
policyDocuments: PolicyDocument[];
|
|
2631
|
+
}
|
|
2632
|
+
//#endregion
|
|
2633
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts
|
|
2634
|
+
type FirehoseTransformationHandler = Handler<FirehoseTransformationEvent, FirehoseTransformationResult>;
|
|
2635
|
+
type FirehoseTransformationCallback = Callback<FirehoseTransformationResult>;
|
|
2636
|
+
// Kinesis Data Firehose Event
|
|
2637
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-kinesis-firehose
|
|
2638
|
+
// https://docs.aws.amazon.com/firehose/latest/dev/data-transformation.html
|
|
2639
|
+
// https://aws.amazon.com/blogs/compute/amazon-kinesis-firehose-data-transformation-with-aws-lambda/
|
|
2640
|
+
// Examples in the lambda blueprints
|
|
2641
|
+
interface FirehoseTransformationEvent {
|
|
2642
|
+
invocationId: string;
|
|
2643
|
+
deliveryStreamArn: string;
|
|
2644
|
+
sourceKinesisStreamArn?: string | undefined;
|
|
2645
|
+
region: string;
|
|
2646
|
+
records: FirehoseTransformationEventRecord[];
|
|
2647
|
+
}
|
|
2648
|
+
interface FirehoseTransformationEventRecord {
|
|
2649
|
+
recordId: string;
|
|
2650
|
+
approximateArrivalTimestamp: number;
|
|
2651
|
+
/** Base64 encoded */
|
|
2652
|
+
data: string;
|
|
2653
|
+
kinesisRecordMetadata?: FirehoseRecordMetadata | undefined;
|
|
2654
|
+
}
|
|
2655
|
+
interface FirehoseRecordMetadata {
|
|
2656
|
+
shardId: string;
|
|
2657
|
+
partitionKey: string;
|
|
2658
|
+
approximateArrivalTimestamp: number;
|
|
2659
|
+
sequenceNumber: string;
|
|
2660
|
+
subsequenceNumber: string;
|
|
2661
|
+
}
|
|
2662
|
+
type FirehoseRecordTransformationStatus = "Ok" | "Dropped" | "ProcessingFailed";
|
|
2663
|
+
interface FirehoseTransformationMetadata {
|
|
2664
|
+
partitionKeys: {
|
|
2665
|
+
[name: string]: string;
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
interface FirehoseTransformationResultRecord {
|
|
2669
|
+
recordId: string;
|
|
2670
|
+
result: FirehoseRecordTransformationStatus;
|
|
2671
|
+
/** Encode in Base64 */
|
|
2672
|
+
data?: string;
|
|
2673
|
+
metadata?: FirehoseTransformationMetadata;
|
|
2674
|
+
}
|
|
2675
|
+
interface FirehoseTransformationResult {
|
|
2676
|
+
records: FirehoseTransformationResultRecord[];
|
|
2677
|
+
}
|
|
2678
|
+
//#endregion
|
|
2679
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts
|
|
2680
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2681
|
+
type KinesisStreamHandler = Handler<KinesisStreamEvent, KinesisStreamBatchResponse | void>;
|
|
2682
|
+
type KinesisStreamTumblingWindowHandler = Handler<KinesisStreamTumblingWindowEvent,
|
|
2683
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2684
|
+
KinesisStreamStateResponse | void>;
|
|
2685
|
+
// Kinesis Streams
|
|
2686
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-kinesis-streams
|
|
2687
|
+
interface KinesisStreamRecordPayload {
|
|
2688
|
+
approximateArrivalTimestamp: number;
|
|
2689
|
+
data: string;
|
|
2690
|
+
kinesisSchemaVersion: string;
|
|
2691
|
+
partitionKey: string;
|
|
2692
|
+
sequenceNumber: string;
|
|
2693
|
+
}
|
|
2694
|
+
interface KinesisStreamRecord {
|
|
2695
|
+
awsRegion: string;
|
|
2696
|
+
eventID: string;
|
|
2697
|
+
eventName: string;
|
|
2698
|
+
eventSource: string;
|
|
2699
|
+
eventSourceARN: string;
|
|
2700
|
+
eventVersion: string;
|
|
2701
|
+
invokeIdentityArn: string;
|
|
2702
|
+
kinesis: KinesisStreamRecordPayload;
|
|
2703
|
+
}
|
|
2704
|
+
interface KinesisStreamEvent {
|
|
2705
|
+
Records: KinesisStreamRecord[];
|
|
2706
|
+
}
|
|
2707
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-windows
|
|
2708
|
+
interface KinesisStreamTumblingWindowEvent extends KinesisStreamEvent {
|
|
2709
|
+
window: {
|
|
2710
|
+
start: string;
|
|
2711
|
+
end: string;
|
|
2712
|
+
};
|
|
2713
|
+
state?: {
|
|
2714
|
+
[key: string]: any;
|
|
2715
|
+
};
|
|
2716
|
+
isFinalInvokeForWindow: boolean;
|
|
2717
|
+
isWindowTerminatedEarly: boolean;
|
|
2718
|
+
}
|
|
2719
|
+
interface KinesisStreamStateResponse extends Partial<KinesisStreamBatchResponse> {
|
|
2720
|
+
state: {
|
|
2721
|
+
[key: string]: any;
|
|
2722
|
+
};
|
|
2723
|
+
}
|
|
2724
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-batchfailurereporting
|
|
2725
|
+
interface KinesisStreamBatchResponse {
|
|
2726
|
+
batchItemFailures: KinesisStreamBatchItemFailure[];
|
|
2727
|
+
}
|
|
2728
|
+
interface KinesisStreamBatchItemFailure {
|
|
2729
|
+
itemIdentifier: string;
|
|
2730
|
+
}
|
|
2731
|
+
//#endregion
|
|
2732
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts
|
|
2733
|
+
/**
|
|
2734
|
+
* Default Lambda Function URL event with no Authorizer
|
|
2735
|
+
*/
|
|
2736
|
+
type LambdaFunctionURLEvent = APIGatewayProxyEventV2;
|
|
2737
|
+
/**
|
|
2738
|
+
* Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
|
2739
|
+
* @see - https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads
|
|
2740
|
+
*/
|
|
2741
|
+
type LambdaFunctionURLResult<T = never> = APIGatewayProxyResultV2<T>;
|
|
2742
|
+
/**
|
|
2743
|
+
* Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
|
2744
|
+
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
|
2745
|
+
*/
|
|
2746
|
+
type LambdaFunctionURLCallback = APIGatewayProxyCallbackV2;
|
|
2747
|
+
/**
|
|
2748
|
+
* Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
|
2749
|
+
* @see - https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads
|
|
2750
|
+
*/
|
|
2751
|
+
type LambdaFunctionURLHandler<T = never> = Handler<LambdaFunctionURLEvent, LambdaFunctionURLResult<T>>;
|
|
2752
|
+
type LambdaFunctionURLEventWithIAMAuthorizer = APIGatewayProxyEventV2WithRequestContext<APIGatewayEventRequestContextV2WithAuthorizer<APIGatewayEventRequestContextIAMAuthorizer>>;
|
|
2753
|
+
/**
|
|
2754
|
+
* Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
|
2755
|
+
* @see - https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads
|
|
2756
|
+
*/
|
|
2757
|
+
type LambdaFunctionURLHandlerWithIAMAuthorizer<T = never> = Handler<LambdaFunctionURLEventWithIAMAuthorizer, LambdaFunctionURLResult<T>>;
|
|
2758
|
+
//#endregion
|
|
2759
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/lex.d.ts
|
|
2760
|
+
type LexHandler = Handler<LexEvent, LexResult>;
|
|
2761
|
+
type LexCallback = Callback<LexResult>;
|
|
2762
|
+
interface LexEventSlots {
|
|
2763
|
+
[name: string]: string | undefined | null;
|
|
2764
|
+
}
|
|
2765
|
+
interface LexEventSessionAttributes {
|
|
2766
|
+
[key: string]: string | undefined;
|
|
2767
|
+
}
|
|
2768
|
+
interface LexEventRequestAttributes {
|
|
2769
|
+
[key: string]: string | undefined;
|
|
2770
|
+
}
|
|
2771
|
+
// Lex
|
|
2772
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html#supported-event-source-lex
|
|
2773
|
+
interface LexEvent {
|
|
2774
|
+
currentIntent: {
|
|
2775
|
+
name: string;
|
|
2776
|
+
slots: LexEventSlots;
|
|
2777
|
+
slotDetails: LexSlotDetails;
|
|
2778
|
+
confirmationStatus: "None" | "Confirmed" | "Denied";
|
|
2779
|
+
};
|
|
2780
|
+
bot: {
|
|
2781
|
+
name: string;
|
|
2782
|
+
alias: string;
|
|
2783
|
+
version: string;
|
|
2784
|
+
};
|
|
2785
|
+
userId: string;
|
|
2786
|
+
inputTranscript: string;
|
|
2787
|
+
invocationSource: "DialogCodeHook" | "FulfillmentCodeHook";
|
|
2788
|
+
outputDialogMode: "Text" | "Voice";
|
|
2789
|
+
messageVersion: "1.0";
|
|
2790
|
+
sessionAttributes: LexEventSessionAttributes;
|
|
2791
|
+
requestAttributes: LexEventRequestAttributes | null;
|
|
2792
|
+
}
|
|
2793
|
+
interface LexSlotResolution {
|
|
2794
|
+
value: string;
|
|
2795
|
+
}
|
|
2796
|
+
interface LexSlotDetail {
|
|
2797
|
+
// "at least 1 but no more than 5 items"
|
|
2798
|
+
resolutions: [LexSlotResolution, LexSlotResolution?, LexSlotResolution?, LexSlotResolution?, LexSlotResolution?];
|
|
2799
|
+
originalValue: string;
|
|
2800
|
+
}
|
|
2801
|
+
interface LexSlotDetails {
|
|
2802
|
+
[name: string]: LexSlotDetail;
|
|
2803
|
+
}
|
|
2804
|
+
interface LexGenericAttachment {
|
|
2805
|
+
title: string;
|
|
2806
|
+
subTitle: string;
|
|
2807
|
+
imageUrl: string;
|
|
2808
|
+
attachmentLinkUrl: string;
|
|
2809
|
+
buttons: Array<{
|
|
2810
|
+
text: string;
|
|
2811
|
+
value: string;
|
|
2812
|
+
}>;
|
|
2813
|
+
}
|
|
2814
|
+
interface LexDialogActionBase {
|
|
2815
|
+
type: "Close" | "ElicitIntent" | "ElicitSlot" | "ConfirmIntent";
|
|
2816
|
+
message?: {
|
|
2817
|
+
contentType: "PlainText" | "SSML" | "CustomPayload";
|
|
2818
|
+
content: string;
|
|
2819
|
+
} | undefined;
|
|
2820
|
+
responseCard?: {
|
|
2821
|
+
version: number;
|
|
2822
|
+
contentType: "application/vnd.amazonaws.card.generic";
|
|
2823
|
+
genericAttachments: LexGenericAttachment[];
|
|
2824
|
+
} | undefined;
|
|
2825
|
+
}
|
|
2826
|
+
interface LexDialogActionClose extends LexDialogActionBase {
|
|
2827
|
+
type: "Close";
|
|
2828
|
+
fulfillmentState: "Fulfilled" | "Failed";
|
|
2829
|
+
}
|
|
2830
|
+
interface LexDialogActionElicitIntent extends LexDialogActionBase {
|
|
2831
|
+
type: "ElicitIntent";
|
|
2832
|
+
}
|
|
2833
|
+
interface LexDialogActionElicitSlot extends LexDialogActionBase {
|
|
2834
|
+
type: "ElicitSlot";
|
|
2835
|
+
intentName: string;
|
|
2836
|
+
slots: {
|
|
2837
|
+
[name: string]: string | null;
|
|
2838
|
+
};
|
|
2839
|
+
slotToElicit: string;
|
|
2840
|
+
}
|
|
2841
|
+
interface LexDialogActionConfirmIntent extends LexDialogActionBase {
|
|
2842
|
+
type: "ConfirmIntent";
|
|
2843
|
+
intentName: string;
|
|
2844
|
+
slots: {
|
|
2845
|
+
[name: string]: string | null;
|
|
2846
|
+
};
|
|
2847
|
+
}
|
|
2848
|
+
interface LexDialogActionDelegate {
|
|
2849
|
+
type: "Delegate";
|
|
2850
|
+
slots: {
|
|
2851
|
+
[name: string]: string | null;
|
|
2852
|
+
};
|
|
2853
|
+
}
|
|
2854
|
+
type LexDialogAction = LexDialogActionClose | LexDialogActionElicitIntent | LexDialogActionElicitSlot | LexDialogActionConfirmIntent | LexDialogActionDelegate;
|
|
2855
|
+
interface LexResult {
|
|
2856
|
+
sessionAttributes?: {
|
|
2857
|
+
[key: string]: string;
|
|
2858
|
+
} | undefined;
|
|
2859
|
+
dialogAction: LexDialogAction;
|
|
2860
|
+
}
|
|
2861
|
+
//#endregion
|
|
2862
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/lex-v2.d.ts
|
|
2863
|
+
type LexV2Handler = Handler<LexV2Event, LexV2Result>;
|
|
2864
|
+
type LexV2Callback = Callback<LexV2Result>;
|
|
2865
|
+
// Lex V2
|
|
2866
|
+
// https://docs.aws.amazon.com/lexv2/latest/dg/lambda.html
|
|
2867
|
+
interface LexV2Event {
|
|
2868
|
+
messageVersion: string;
|
|
2869
|
+
invocationSource: "DialogCodeHook" | "FulfillmentCodeHook";
|
|
2870
|
+
inputMode: "DTMF" | "Speech" | "Text";
|
|
2871
|
+
responseContentType: string;
|
|
2872
|
+
sessionId: string;
|
|
2873
|
+
inputTranscript: string;
|
|
2874
|
+
bot: LexV2Bot;
|
|
2875
|
+
interpretations: LexV2Interpretation[];
|
|
2876
|
+
proposedNextState: {
|
|
2877
|
+
dialogAction: LexV2DialogAction;
|
|
2878
|
+
intent: LexV2Intent;
|
|
2879
|
+
};
|
|
2880
|
+
requestAttributes?: Record<string, string>;
|
|
2881
|
+
sessionState: LexV2SessionState;
|
|
2882
|
+
transcriptions: LexV2Transcription[];
|
|
2883
|
+
}
|
|
2884
|
+
interface LexV2Bot {
|
|
2885
|
+
id: string;
|
|
2886
|
+
name: string;
|
|
2887
|
+
aliasId: string;
|
|
2888
|
+
aliasName: string;
|
|
2889
|
+
localeId: string;
|
|
2890
|
+
version: string; // 'DRAFT' | `${number}`
|
|
2891
|
+
}
|
|
2892
|
+
interface LexV2Interpretation {
|
|
2893
|
+
intent: LexV2Intent;
|
|
2894
|
+
nluConfidence?: number;
|
|
2895
|
+
sentimentResponse?: LexV2SentimentResponse;
|
|
2896
|
+
}
|
|
2897
|
+
interface LexV2Intent {
|
|
2898
|
+
confirmationState: "Confirmed" | "Denied" | "None";
|
|
2899
|
+
name: string;
|
|
2900
|
+
slots: LexV2Slots;
|
|
2901
|
+
state: LexV2IntentState;
|
|
2902
|
+
kendraResponse?: any;
|
|
2903
|
+
}
|
|
2904
|
+
type LexV2IntentState = "Failed" | "Fulfilled" | "FulfillmentInProgress" | "InProgress" | "ReadyForFulfillment" | "Waiting";
|
|
2905
|
+
interface LexV2SentimentResponse {
|
|
2906
|
+
sentiment: string;
|
|
2907
|
+
sentimentScore: LexV2SentimentScore;
|
|
2908
|
+
}
|
|
2909
|
+
interface LexV2SentimentScore {
|
|
2910
|
+
mixed: number;
|
|
2911
|
+
negative: number;
|
|
2912
|
+
neutral: number;
|
|
2913
|
+
positive: number;
|
|
2914
|
+
}
|
|
2915
|
+
interface LexV2SessionState {
|
|
2916
|
+
activeContexts?: LexV2ActiveContext[];
|
|
2917
|
+
sessionAttributes?: Record<string, string>;
|
|
2918
|
+
dialogAction?: LexV2DialogAction;
|
|
2919
|
+
intent: LexV2Intent;
|
|
2920
|
+
originatingRequestId: string;
|
|
2921
|
+
}
|
|
2922
|
+
interface LexV2ActiveContext {
|
|
2923
|
+
name: string;
|
|
2924
|
+
contextAttributes: Record<string, string>;
|
|
2925
|
+
timeToLive: {
|
|
2926
|
+
timeToLiveInSeconds: number;
|
|
2927
|
+
turnsToLive: number;
|
|
2928
|
+
};
|
|
2929
|
+
}
|
|
2930
|
+
type LevV2DialogActionWithoutSlot = {
|
|
2931
|
+
type: "Close";
|
|
2932
|
+
} | {
|
|
2933
|
+
type: "ConfirmIntent";
|
|
2934
|
+
} | {
|
|
2935
|
+
type: "Delegate";
|
|
2936
|
+
} | {
|
|
2937
|
+
type: "ElicitIntent";
|
|
2938
|
+
};
|
|
2939
|
+
type LexV2DialogAction = (LevV2DialogActionWithoutSlot & {
|
|
2940
|
+
slotToElicit?: never;
|
|
2941
|
+
}) | {
|
|
2942
|
+
type: "ElicitSlot";
|
|
2943
|
+
slotToElicit: string;
|
|
2944
|
+
};
|
|
2945
|
+
type LexV2ResultDialogAction = (LevV2DialogActionWithoutSlot & {
|
|
2946
|
+
slotToElicit?: never;
|
|
2947
|
+
}) | {
|
|
2948
|
+
type: "ElicitSlot";
|
|
2949
|
+
slotToElicit: string;
|
|
2950
|
+
slotElicitationStyle?: "Default" | "SpellByLetter" | "SpellByWord";
|
|
2951
|
+
};
|
|
2952
|
+
interface LexV2Result {
|
|
2953
|
+
sessionState: {
|
|
2954
|
+
sessionAttributes?: Record<string, string>;
|
|
2955
|
+
dialogAction: LexV2ResultDialogAction;
|
|
2956
|
+
intent?: {
|
|
2957
|
+
name?: string;
|
|
2958
|
+
state: LexV2IntentState;
|
|
2959
|
+
slots?: LexV2Slots;
|
|
2960
|
+
};
|
|
2961
|
+
};
|
|
2962
|
+
messages?: LexV2Message[];
|
|
2963
|
+
}
|
|
2964
|
+
type LexV2Message = LexV2ContentMessage | LexV2ImageResponseCardMessage;
|
|
2965
|
+
interface LexV2ContentMessage {
|
|
2966
|
+
contentType: "CustomPayload" | "PlainText" | "SSML";
|
|
2967
|
+
content: string;
|
|
2968
|
+
}
|
|
2969
|
+
interface LexV2ImageResponseCardMessage {
|
|
2970
|
+
contentType: "ImageResponseCard";
|
|
2971
|
+
imageResponseCard: LexV2ImageResponseCard;
|
|
2972
|
+
}
|
|
2973
|
+
interface LexV2ImageResponseCard {
|
|
2974
|
+
title: string;
|
|
2975
|
+
subtitle?: string;
|
|
2976
|
+
imageUrl?: string;
|
|
2977
|
+
buttons?: LexV2ImageResponseCardButton[];
|
|
2978
|
+
}
|
|
2979
|
+
interface LexV2ImageResponseCardButton {
|
|
2980
|
+
text: string;
|
|
2981
|
+
value: string;
|
|
2982
|
+
}
|
|
2983
|
+
type LexV2Slot = LexV2ScalarSlotValue | LexV2ListSlotValue;
|
|
2984
|
+
type LexV2Slots = Record<string, LexV2Slot | null>;
|
|
2985
|
+
interface LexV2ScalarSlotValue {
|
|
2986
|
+
shape: "Scalar";
|
|
2987
|
+
value: LexV2SlotValue;
|
|
2988
|
+
}
|
|
2989
|
+
interface LexV2ListSlotValue {
|
|
2990
|
+
shape: "List";
|
|
2991
|
+
value: LexV2SlotValue;
|
|
2992
|
+
values: LexV2ScalarSlotValue[];
|
|
2993
|
+
}
|
|
2994
|
+
interface LexV2SlotValue {
|
|
2995
|
+
interpretedValue?: string;
|
|
2996
|
+
originalValue: string;
|
|
2997
|
+
resolvedValues: string[];
|
|
2998
|
+
}
|
|
2999
|
+
interface LexV2Transcription {
|
|
3000
|
+
transcription: string;
|
|
3001
|
+
transcriptionConfidence: number;
|
|
3002
|
+
resolvedContext: {
|
|
3003
|
+
intent: string;
|
|
3004
|
+
};
|
|
3005
|
+
resolvedSlots: LexV2Slots;
|
|
3006
|
+
}
|
|
3007
|
+
//#endregion
|
|
3008
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts
|
|
3009
|
+
/**
|
|
3010
|
+
* An AWS Amplify GraphQL resolver event. It differs slightly from a native ('direct') AppSync resolver event.
|
|
3011
|
+
*
|
|
3012
|
+
* @see https://docs.amplify.aws/cli/graphql/custom-business-logic/#structure-of-the-function-event
|
|
3013
|
+
*/
|
|
3014
|
+
interface AmplifyGraphQlResolverEvent<TArguments = Record<string, any>, TSource = Record<string, any>> {
|
|
3015
|
+
/** The name of the parent object type (data model) of the field being resolved. */
|
|
3016
|
+
typeName: string;
|
|
3017
|
+
/** The field within the given type to resolve. */
|
|
3018
|
+
fieldName: string;
|
|
3019
|
+
/** A map of GraphQL arguments passed to the field being resolved. */
|
|
3020
|
+
arguments: TArguments;
|
|
3021
|
+
/** The identity used to authenticate the request to AppSync. */
|
|
3022
|
+
identity?: AppSyncIdentity;
|
|
3023
|
+
/** The parent object's value if resolving a nested field. */
|
|
3024
|
+
source: TSource;
|
|
3025
|
+
/** The request headers */
|
|
3026
|
+
request: {
|
|
3027
|
+
headers: AppSyncResolverEventHeaders;
|
|
3028
|
+
domainName: string | null;
|
|
3029
|
+
};
|
|
3030
|
+
/** The object returned by a possible previous pipeline resolver function. */
|
|
3031
|
+
prev: {
|
|
3032
|
+
result: {
|
|
3033
|
+
[key: string]: any;
|
|
3034
|
+
};
|
|
3035
|
+
} | null;
|
|
3036
|
+
}
|
|
3037
|
+
/**
|
|
3038
|
+
* A handler for Amplify GraphQL Lambda resolvers. The returned result will be resolved as the value (no need to convert to a JSON string).
|
|
3039
|
+
*
|
|
3040
|
+
* @see https://docs.amplify.aws/cli/graphql/custom-business-logic/#structure-of-the-function-event
|
|
3041
|
+
*/
|
|
3042
|
+
type AmplifyGraphQlResolverHandler<TArguments = Record<string, any>, TSource = Record<string, any>, TResult = any> = Handler<AmplifyGraphQlResolverEvent<TArguments, TSource>, TResult>;
|
|
3043
|
+
//#endregion
|
|
3044
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/msk.d.ts
|
|
3045
|
+
type MSKHandler = Handler<MSKEvent, void>;
|
|
3046
|
+
interface MSKRecordHeader {
|
|
3047
|
+
[headerKey: string]: number[];
|
|
3048
|
+
}
|
|
3049
|
+
interface MSKRecord {
|
|
3050
|
+
topic: string;
|
|
3051
|
+
partition: number;
|
|
3052
|
+
offset: number;
|
|
3053
|
+
timestamp: number;
|
|
3054
|
+
timestampType: "CREATE_TIME" | "LOG_APPEND_TIME";
|
|
3055
|
+
key: string;
|
|
3056
|
+
value: string;
|
|
3057
|
+
headers: MSKRecordHeader[];
|
|
3058
|
+
}
|
|
3059
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html
|
|
3060
|
+
interface MSKEvent {
|
|
3061
|
+
eventSource: "aws:kafka";
|
|
3062
|
+
eventSourceArn: string;
|
|
3063
|
+
bootstrapServers: string;
|
|
3064
|
+
records: {
|
|
3065
|
+
[topic: string]: MSKRecord[];
|
|
3066
|
+
};
|
|
3067
|
+
}
|
|
3068
|
+
//#endregion
|
|
3069
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/s3.d.ts
|
|
3070
|
+
type S3Handler = Handler<S3Event, void>;
|
|
3071
|
+
/**
|
|
3072
|
+
* S3Create event
|
|
3073
|
+
* https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html
|
|
3074
|
+
*/
|
|
3075
|
+
interface S3EventRecordGlacierRestoreEventData {
|
|
3076
|
+
lifecycleRestorationExpiryTime: string;
|
|
3077
|
+
lifecycleRestoreStorageClass: string;
|
|
3078
|
+
}
|
|
3079
|
+
interface S3EventRecordGlacierEventData {
|
|
3080
|
+
restoreEventData: S3EventRecordGlacierRestoreEventData;
|
|
3081
|
+
}
|
|
3082
|
+
interface S3EventRecord {
|
|
3083
|
+
eventVersion: string;
|
|
3084
|
+
eventSource: string;
|
|
3085
|
+
awsRegion: string;
|
|
3086
|
+
eventTime: string;
|
|
3087
|
+
eventName: string;
|
|
3088
|
+
userIdentity: {
|
|
3089
|
+
principalId: string;
|
|
3090
|
+
};
|
|
3091
|
+
requestParameters: {
|
|
3092
|
+
sourceIPAddress: string;
|
|
3093
|
+
};
|
|
3094
|
+
responseElements: {
|
|
3095
|
+
"x-amz-request-id": string;
|
|
3096
|
+
"x-amz-id-2": string;
|
|
3097
|
+
};
|
|
3098
|
+
s3: {
|
|
3099
|
+
s3SchemaVersion: string;
|
|
3100
|
+
configurationId: string;
|
|
3101
|
+
bucket: {
|
|
3102
|
+
name: string;
|
|
3103
|
+
ownerIdentity: {
|
|
3104
|
+
principalId: string;
|
|
3105
|
+
};
|
|
3106
|
+
arn: string;
|
|
3107
|
+
};
|
|
3108
|
+
object: {
|
|
3109
|
+
key: string;
|
|
3110
|
+
size: number;
|
|
3111
|
+
eTag: string;
|
|
3112
|
+
versionId?: string | undefined;
|
|
3113
|
+
sequencer: string;
|
|
3114
|
+
};
|
|
3115
|
+
};
|
|
3116
|
+
glacierEventData?: S3EventRecordGlacierEventData | undefined;
|
|
3117
|
+
}
|
|
3118
|
+
interface S3Event {
|
|
3119
|
+
Records: S3EventRecord[];
|
|
3120
|
+
}
|
|
3121
|
+
type S3CreateEvent = S3Event; // old name
|
|
3122
|
+
//#endregion
|
|
3123
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/s3-batch.d.ts
|
|
3124
|
+
/**
|
|
3125
|
+
* S3 Batch Operations event
|
|
3126
|
+
* https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-invoke-lambda.html
|
|
3127
|
+
*/
|
|
3128
|
+
type S3BatchHandler = Handler<S3BatchEvent, S3BatchResult>;
|
|
3129
|
+
type S3BatchCallback = Callback<S3BatchResult>;
|
|
3130
|
+
interface S3BatchEvent {
|
|
3131
|
+
invocationSchemaVersion: string;
|
|
3132
|
+
invocationId: string;
|
|
3133
|
+
job: S3BatchEventJob;
|
|
3134
|
+
tasks: S3BatchEventTask[];
|
|
3135
|
+
}
|
|
3136
|
+
interface S3BatchEventJob {
|
|
3137
|
+
id: string;
|
|
3138
|
+
}
|
|
3139
|
+
interface S3BatchEventTask {
|
|
3140
|
+
taskId: string;
|
|
3141
|
+
s3Key: string;
|
|
3142
|
+
s3VersionId: string | null;
|
|
3143
|
+
s3BucketArn: string;
|
|
3144
|
+
}
|
|
3145
|
+
interface S3BatchResult {
|
|
3146
|
+
invocationSchemaVersion: string;
|
|
3147
|
+
treatMissingKeysAs: S3BatchResultResultCode;
|
|
3148
|
+
invocationId: string;
|
|
3149
|
+
results: S3BatchResultResult[];
|
|
3150
|
+
}
|
|
3151
|
+
type S3BatchResultResultCode = "Succeeded" | "TemporaryFailure" | "PermanentFailure";
|
|
3152
|
+
interface S3BatchResultResult {
|
|
3153
|
+
taskId: string;
|
|
3154
|
+
resultCode: S3BatchResultResultCode;
|
|
3155
|
+
resultString: string;
|
|
3156
|
+
}
|
|
3157
|
+
//#endregion
|
|
3158
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts
|
|
3159
|
+
interface S3ObjectAccessTierChangedNotificationEventDetail {
|
|
3160
|
+
version: "0";
|
|
3161
|
+
bucket: {
|
|
3162
|
+
name: string;
|
|
3163
|
+
};
|
|
3164
|
+
object: {
|
|
3165
|
+
key: string;
|
|
3166
|
+
size: number;
|
|
3167
|
+
etag: string;
|
|
3168
|
+
"version-id": string;
|
|
3169
|
+
};
|
|
3170
|
+
"request-id": string;
|
|
3171
|
+
requester: string;
|
|
3172
|
+
"destination-access-tier": "ARCHIVE_ACCESS" | "DEEP_ARCHIVE_ACCESS"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_Tiering.html
|
|
3173
|
+
}
|
|
3174
|
+
interface S3ObjectACLUpdatedNotificationEventDetail {
|
|
3175
|
+
version: "0";
|
|
3176
|
+
bucket: {
|
|
3177
|
+
name: string;
|
|
3178
|
+
};
|
|
3179
|
+
object: {
|
|
3180
|
+
key: string;
|
|
3181
|
+
etag: string;
|
|
3182
|
+
"version-id": string;
|
|
3183
|
+
};
|
|
3184
|
+
"request-id": string;
|
|
3185
|
+
requester: string;
|
|
3186
|
+
"source-ip-address": string;
|
|
3187
|
+
}
|
|
3188
|
+
interface S3ObjectCreatedNotificationEventDetail {
|
|
3189
|
+
version: "0";
|
|
3190
|
+
bucket: {
|
|
3191
|
+
name: string;
|
|
3192
|
+
};
|
|
3193
|
+
object: {
|
|
3194
|
+
key: string;
|
|
3195
|
+
size: number;
|
|
3196
|
+
etag: string;
|
|
3197
|
+
"version-id": string;
|
|
3198
|
+
sequencer: string;
|
|
3199
|
+
};
|
|
3200
|
+
"request-id": string;
|
|
3201
|
+
requester: string;
|
|
3202
|
+
"source-ip-address": string;
|
|
3203
|
+
reason: "PutObject" | "POST Object" | "CopyObject" | "CompleteMultipartUpload";
|
|
3204
|
+
}
|
|
3205
|
+
interface S3ObjectDeletedNotificationEventLifecycleExpirationDetail {
|
|
3206
|
+
version: "0";
|
|
3207
|
+
bucket: {
|
|
3208
|
+
name: string;
|
|
3209
|
+
};
|
|
3210
|
+
object: {
|
|
3211
|
+
key: string;
|
|
3212
|
+
etag: string;
|
|
3213
|
+
"version-id": string;
|
|
3214
|
+
sequencer: string;
|
|
3215
|
+
};
|
|
3216
|
+
"request-id": string;
|
|
3217
|
+
requester: string;
|
|
3218
|
+
reason: "Lifecycle Expiration";
|
|
3219
|
+
"deletion-type": "Permanently Deleted" | "Delete Marker Created";
|
|
3220
|
+
}
|
|
3221
|
+
interface S3ObjectDeletedNotificationEventDeleteObjectDetail {
|
|
3222
|
+
version: "0";
|
|
3223
|
+
bucket: {
|
|
3224
|
+
name: string;
|
|
3225
|
+
};
|
|
3226
|
+
object: {
|
|
3227
|
+
key: string;
|
|
3228
|
+
etag: string;
|
|
3229
|
+
"version-id": string;
|
|
3230
|
+
sequencer: string;
|
|
3231
|
+
};
|
|
3232
|
+
"request-id": string;
|
|
3233
|
+
requester: string;
|
|
3234
|
+
"source-ip-address": string;
|
|
3235
|
+
reason: "DeleteObject";
|
|
3236
|
+
"deletion-type": "Permanently Deleted" | "Delete Marker Created";
|
|
3237
|
+
}
|
|
3238
|
+
type S3ObjectDeletedNotificationEventDetail = S3ObjectDeletedNotificationEventLifecycleExpirationDetail | S3ObjectDeletedNotificationEventDeleteObjectDetail;
|
|
3239
|
+
interface S3ObjectRestoreCompletedNotificationEventDetail {
|
|
3240
|
+
version: "0";
|
|
3241
|
+
bucket: {
|
|
3242
|
+
name: string;
|
|
3243
|
+
};
|
|
3244
|
+
object: {
|
|
3245
|
+
key: string;
|
|
3246
|
+
size: number;
|
|
3247
|
+
"version-id": string;
|
|
3248
|
+
etag: string;
|
|
3249
|
+
};
|
|
3250
|
+
"request-id": string;
|
|
3251
|
+
requester: "s3.amazonaws.com";
|
|
3252
|
+
"restore-expiry-time": string;
|
|
3253
|
+
"source-storage-class": "STANDARD" | "REDUCED_REDUNDANCY" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "GLACIER" | "DEEP_ARCHIVE" | "OUTPOSTS" | "GLACIER_IR"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax
|
|
3254
|
+
}
|
|
3255
|
+
interface S3ObjectRestoreExpiredNotificationEventDetail {
|
|
3256
|
+
version: "0";
|
|
3257
|
+
bucket: {
|
|
3258
|
+
name: string;
|
|
3259
|
+
};
|
|
3260
|
+
object: {
|
|
3261
|
+
key: string;
|
|
3262
|
+
"version-id": string;
|
|
3263
|
+
etag: string;
|
|
3264
|
+
};
|
|
3265
|
+
"request-id": string;
|
|
3266
|
+
requester: "s3.amazonaws.com";
|
|
3267
|
+
}
|
|
3268
|
+
interface S3ObjectRestoreInitiatedNotificationEventDetail {
|
|
3269
|
+
version: "0";
|
|
3270
|
+
bucket: {
|
|
3271
|
+
name: string;
|
|
3272
|
+
};
|
|
3273
|
+
object: {
|
|
3274
|
+
key: string;
|
|
3275
|
+
size: number;
|
|
3276
|
+
"version-id": string;
|
|
3277
|
+
etag: string;
|
|
3278
|
+
};
|
|
3279
|
+
"request-id": string;
|
|
3280
|
+
requester: string;
|
|
3281
|
+
"source-ip-address": string;
|
|
3282
|
+
"source-storage-class": "STANDARD" | "REDUCED_REDUNDANCY" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "GLACIER" | "DEEP_ARCHIVE" | "OUTPOSTS" | "GLACIER_IR"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax
|
|
3283
|
+
}
|
|
3284
|
+
interface S3ObjectStorageClassChangedNotificationEventDetail {
|
|
3285
|
+
version: "0";
|
|
3286
|
+
bucket: {
|
|
3287
|
+
name: string;
|
|
3288
|
+
};
|
|
3289
|
+
object: {
|
|
3290
|
+
key: string;
|
|
3291
|
+
size: number;
|
|
3292
|
+
"version-id": string;
|
|
3293
|
+
etag: string;
|
|
3294
|
+
};
|
|
3295
|
+
"request-id": string;
|
|
3296
|
+
requester: string;
|
|
3297
|
+
"destination-storage-class": "STANDARD" | "REDUCED_REDUNDANCY" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "GLACIER" | "DEEP_ARCHIVE" | "OUTPOSTS" | "GLACIER_IR"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax
|
|
3298
|
+
}
|
|
3299
|
+
interface S3ObjectTagsAddedNotificationEventDetail {
|
|
3300
|
+
version: "0";
|
|
3301
|
+
bucket: {
|
|
3302
|
+
name: string;
|
|
3303
|
+
};
|
|
3304
|
+
object: {
|
|
3305
|
+
key: string;
|
|
3306
|
+
"version-id": string;
|
|
3307
|
+
etag: string;
|
|
3308
|
+
};
|
|
3309
|
+
"request-id": string;
|
|
3310
|
+
requester: string;
|
|
3311
|
+
"source-ip-address": string;
|
|
3312
|
+
}
|
|
3313
|
+
interface S3ObjectTagsDeletedNotificationEventDetail {
|
|
3314
|
+
version: "0";
|
|
3315
|
+
bucket: {
|
|
3316
|
+
name: string;
|
|
3317
|
+
};
|
|
3318
|
+
object: {
|
|
3319
|
+
key: string;
|
|
3320
|
+
"version-id": string;
|
|
3321
|
+
etag: string;
|
|
3322
|
+
};
|
|
3323
|
+
"request-id": string;
|
|
3324
|
+
requester: string;
|
|
3325
|
+
"source-ip-address": string;
|
|
3326
|
+
}
|
|
3327
|
+
interface S3ObjectAccessTierChangedNotificationEvent extends EventBridgeEvent<"Object Access Tier Changed", S3ObjectAccessTierChangedNotificationEventDetail> {
|
|
3328
|
+
source: "aws.s3";
|
|
3329
|
+
}
|
|
3330
|
+
interface S3ObjectACLUpdatedNotificationEvent extends EventBridgeEvent<"Object ACL Updated", S3ObjectACLUpdatedNotificationEventDetail> {
|
|
3331
|
+
source: "aws.s3";
|
|
3332
|
+
}
|
|
3333
|
+
interface S3ObjectCreatedNotificationEvent extends EventBridgeEvent<"Object Created", S3ObjectCreatedNotificationEventDetail> {
|
|
3334
|
+
source: "aws.s3";
|
|
3335
|
+
}
|
|
3336
|
+
interface S3ObjectDeletedNotificationEvent extends EventBridgeEvent<"Object Deleted", S3ObjectDeletedNotificationEventDetail> {
|
|
3337
|
+
source: "aws.s3";
|
|
3338
|
+
}
|
|
3339
|
+
interface S3ObjectRestoreCompletedNotificationEvent extends EventBridgeEvent<"Object Restore Completed", S3ObjectRestoreCompletedNotificationEventDetail> {
|
|
3340
|
+
source: "aws.s3";
|
|
3341
|
+
}
|
|
3342
|
+
interface S3ObjectRestoreExpiredNotificationEvent extends EventBridgeEvent<"Object Restore Expired", S3ObjectRestoreExpiredNotificationEventDetail> {
|
|
3343
|
+
source: "aws.s3";
|
|
3344
|
+
}
|
|
3345
|
+
interface S3ObjectRestoreInitiatedNotificationEvent extends EventBridgeEvent<"Object Restore Initiated", S3ObjectRestoreInitiatedNotificationEventDetail> {
|
|
3346
|
+
source: "aws.s3";
|
|
3347
|
+
}
|
|
3348
|
+
interface S3ObjectStorageClassChangedNotificationEvent extends EventBridgeEvent<"Object Storage Class Changed", S3ObjectStorageClassChangedNotificationEventDetail> {
|
|
3349
|
+
source: "aws.s3";
|
|
3350
|
+
}
|
|
3351
|
+
interface S3ObjectTagsAddedNotificationEvent extends EventBridgeEvent<"Object Tags Added", S3ObjectTagsAddedNotificationEventDetail> {
|
|
3352
|
+
source: "aws.s3";
|
|
3353
|
+
}
|
|
3354
|
+
interface S3ObjectTagsDeletedNotificationEvent extends EventBridgeEvent<"Object Tags Deleted", S3ObjectTagsDeletedNotificationEventDetail> {
|
|
3355
|
+
source: "aws.s3";
|
|
3356
|
+
}
|
|
3357
|
+
type S3NotificationEvent = S3ObjectAccessTierChangedNotificationEvent | S3ObjectACLUpdatedNotificationEvent | S3ObjectCreatedNotificationEvent | S3ObjectDeletedNotificationEvent | S3ObjectRestoreCompletedNotificationEvent | S3ObjectRestoreExpiredNotificationEvent | S3ObjectRestoreInitiatedNotificationEvent | S3ObjectStorageClassChangedNotificationEvent | S3ObjectTagsAddedNotificationEvent | S3ObjectTagsDeletedNotificationEvent;
|
|
3358
|
+
type S3NotificationEventBridgeHandler<EventType extends S3NotificationEvent = S3NotificationEvent> = Handler<EventBridgeEvent<EventType["detail-type"], EventType["detail"]> & {
|
|
3359
|
+
source: "aws.s3";
|
|
3360
|
+
}, void>;
|
|
3361
|
+
//#endregion
|
|
3362
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts
|
|
3363
|
+
type SecretsManagerRotationHandler = Handler<SecretsManagerRotationEvent, void>;
|
|
3364
|
+
type SecretsManagerRotationEventStep = "createSecret" | "setSecret" | "testSecret" | "finishSecret";
|
|
3365
|
+
/**
|
|
3366
|
+
* Secrets Manager Rotation event
|
|
3367
|
+
* https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets-lambda-function-overview.html
|
|
3368
|
+
*/
|
|
3369
|
+
interface SecretsManagerRotationEvent {
|
|
3370
|
+
Step: SecretsManagerRotationEventStep;
|
|
3371
|
+
SecretId: string;
|
|
3372
|
+
ClientRequestToken: string;
|
|
3373
|
+
}
|
|
3374
|
+
//#endregion
|
|
3375
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts
|
|
3376
|
+
type SelfManagedKafkaHandler = Handler<SelfManagedKafkaEvent, void>;
|
|
3377
|
+
interface SelfManagedKafkaRecordHeader {
|
|
3378
|
+
[headerKey: string]: number[];
|
|
3379
|
+
}
|
|
3380
|
+
interface SelfManagedKafkaRecord {
|
|
3381
|
+
topic: string;
|
|
3382
|
+
partition: number;
|
|
3383
|
+
offset: number;
|
|
3384
|
+
timestamp: number;
|
|
3385
|
+
timestampType: "CREATE_TIME" | "LOG_APPEND_TIME";
|
|
3386
|
+
key: string;
|
|
3387
|
+
value: string;
|
|
3388
|
+
headers: SelfManagedKafkaRecordHeader[];
|
|
3389
|
+
}
|
|
3390
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html
|
|
3391
|
+
interface SelfManagedKafkaEvent {
|
|
3392
|
+
eventSource: "SelfManagedKafka";
|
|
3393
|
+
bootstrapServers: string;
|
|
3394
|
+
records: {
|
|
3395
|
+
[topic: string]: SelfManagedKafkaRecord[];
|
|
3396
|
+
};
|
|
3397
|
+
}
|
|
3398
|
+
//#endregion
|
|
3399
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/ses.d.ts
|
|
3400
|
+
type SESHandler = Handler<SESEvent, void>;
|
|
3401
|
+
// SES event
|
|
3402
|
+
interface SESMailHeader {
|
|
3403
|
+
name: string;
|
|
3404
|
+
value: string;
|
|
3405
|
+
}
|
|
3406
|
+
interface SESMailCommonHeaders {
|
|
3407
|
+
returnPath: string;
|
|
3408
|
+
from?: string[] | undefined;
|
|
3409
|
+
date: string;
|
|
3410
|
+
to?: string[] | undefined;
|
|
3411
|
+
cc?: string[] | undefined;
|
|
3412
|
+
bcc?: string[] | undefined;
|
|
3413
|
+
sender?: string[] | undefined;
|
|
3414
|
+
replyTo?: string[] | undefined;
|
|
3415
|
+
messageId: string;
|
|
3416
|
+
subject?: string | undefined;
|
|
3417
|
+
}
|
|
3418
|
+
interface SESMail {
|
|
3419
|
+
timestamp: string;
|
|
3420
|
+
source: string;
|
|
3421
|
+
messageId: string;
|
|
3422
|
+
destination: string[];
|
|
3423
|
+
headersTruncated: boolean;
|
|
3424
|
+
headers: SESMailHeader[];
|
|
3425
|
+
commonHeaders: SESMailCommonHeaders;
|
|
3426
|
+
}
|
|
3427
|
+
interface SESReceiptStatus {
|
|
3428
|
+
status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" | "DISABLED";
|
|
3429
|
+
}
|
|
3430
|
+
interface SESReceiptS3Action {
|
|
3431
|
+
type: "S3";
|
|
3432
|
+
topicArn?: string | undefined;
|
|
3433
|
+
bucketName: string;
|
|
3434
|
+
objectKey: string;
|
|
3435
|
+
}
|
|
3436
|
+
interface SESReceiptSnsAction {
|
|
3437
|
+
type: "SNS";
|
|
3438
|
+
topicArn: string;
|
|
3439
|
+
}
|
|
3440
|
+
interface SESReceiptBounceAction {
|
|
3441
|
+
type: "Bounce";
|
|
3442
|
+
topicArn?: string | undefined;
|
|
3443
|
+
smtpReplyCode: string;
|
|
3444
|
+
statusCode: string;
|
|
3445
|
+
message: string;
|
|
3446
|
+
sender: string;
|
|
3447
|
+
}
|
|
3448
|
+
interface SESReceiptLambdaAction {
|
|
3449
|
+
type: "Lambda";
|
|
3450
|
+
topicArn?: string | undefined;
|
|
3451
|
+
functionArn: string;
|
|
3452
|
+
invocationType: string;
|
|
3453
|
+
}
|
|
3454
|
+
interface SESReceiptStopAction {
|
|
3455
|
+
type: "Stop";
|
|
3456
|
+
topicArn?: string | undefined;
|
|
3457
|
+
}
|
|
3458
|
+
interface SESReceiptWorkMailAction {
|
|
3459
|
+
type: "WorkMail";
|
|
3460
|
+
topicArn?: string | undefined;
|
|
3461
|
+
organizationArn: string;
|
|
3462
|
+
}
|
|
3463
|
+
interface SESReceipt {
|
|
3464
|
+
timestamp: string;
|
|
3465
|
+
processingTimeMillis: number;
|
|
3466
|
+
recipients: string[];
|
|
3467
|
+
spamVerdict: SESReceiptStatus;
|
|
3468
|
+
virusVerdict: SESReceiptStatus;
|
|
3469
|
+
spfVerdict: SESReceiptStatus;
|
|
3470
|
+
dkimVerdict: SESReceiptStatus;
|
|
3471
|
+
dmarcVerdict: SESReceiptStatus;
|
|
3472
|
+
dmarcPolicy?: "none" | "quarantine" | "reject" | undefined;
|
|
3473
|
+
action: SESReceiptS3Action | SESReceiptSnsAction | SESReceiptBounceAction | SESReceiptLambdaAction | SESReceiptStopAction | SESReceiptWorkMailAction;
|
|
3474
|
+
}
|
|
3475
|
+
interface SESMessage {
|
|
3476
|
+
mail: SESMail;
|
|
3477
|
+
receipt: SESReceipt;
|
|
3478
|
+
}
|
|
3479
|
+
interface SESEventRecord {
|
|
3480
|
+
eventSource: string;
|
|
3481
|
+
eventVersion: string;
|
|
3482
|
+
ses: SESMessage;
|
|
3483
|
+
}
|
|
3484
|
+
interface SESEvent {
|
|
3485
|
+
Records: SESEventRecord[];
|
|
3486
|
+
}
|
|
3487
|
+
//#endregion
|
|
3488
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/sns.d.ts
|
|
3489
|
+
type SNSHandler = Handler<SNSEvent, void>;
|
|
3490
|
+
// SNS "event"
|
|
3491
|
+
interface SNSMessageAttribute {
|
|
3492
|
+
Type: string;
|
|
3493
|
+
Value: string;
|
|
3494
|
+
}
|
|
3495
|
+
interface SNSMessageAttributes {
|
|
3496
|
+
[name: string]: SNSMessageAttribute;
|
|
3497
|
+
}
|
|
3498
|
+
interface SNSMessage {
|
|
3499
|
+
SignatureVersion: string;
|
|
3500
|
+
Timestamp: string;
|
|
3501
|
+
Signature: string;
|
|
3502
|
+
SigningCertUrl: string; // Not SigningCertURL; see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/73817#issuecomment-3367340170
|
|
3503
|
+
MessageId: string;
|
|
3504
|
+
Message: string;
|
|
3505
|
+
MessageAttributes: SNSMessageAttributes;
|
|
3506
|
+
Type: string;
|
|
3507
|
+
UnsubscribeUrl: string; // Not UnsubscribeURL; see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/73817#issuecomment-3367340170
|
|
3508
|
+
TopicArn: string;
|
|
3509
|
+
Subject?: string;
|
|
3510
|
+
Token?: string;
|
|
3511
|
+
}
|
|
3512
|
+
interface SNSEventRecord {
|
|
3513
|
+
EventVersion: string;
|
|
3514
|
+
EventSubscriptionArn: string;
|
|
3515
|
+
EventSource: string;
|
|
3516
|
+
Sns: SNSMessage;
|
|
3517
|
+
}
|
|
3518
|
+
interface SNSEvent {
|
|
3519
|
+
Records: SNSEventRecord[];
|
|
3520
|
+
}
|
|
3521
|
+
//#endregion
|
|
3522
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/sqs.d.ts
|
|
3523
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
3524
|
+
type SQSHandler = Handler<SQSEvent, SQSBatchResponse | void>;
|
|
3525
|
+
// SQS
|
|
3526
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html#supported-event-source-sqs
|
|
3527
|
+
interface SQSRecord {
|
|
3528
|
+
messageId: string;
|
|
3529
|
+
receiptHandle: string;
|
|
3530
|
+
body: string;
|
|
3531
|
+
attributes: SQSRecordAttributes;
|
|
3532
|
+
messageAttributes: SQSMessageAttributes;
|
|
3533
|
+
md5OfBody: string;
|
|
3534
|
+
md5OfMessageAttributes?: string;
|
|
3535
|
+
eventSource: string;
|
|
3536
|
+
eventSourceARN: string;
|
|
3537
|
+
awsRegion: string;
|
|
3538
|
+
}
|
|
3539
|
+
interface SQSEvent {
|
|
3540
|
+
Records: SQSRecord[];
|
|
3541
|
+
}
|
|
3542
|
+
interface SQSRecordAttributes {
|
|
3543
|
+
AWSTraceHeader?: string | undefined;
|
|
3544
|
+
ApproximateReceiveCount: string;
|
|
3545
|
+
SentTimestamp: string;
|
|
3546
|
+
SenderId: string;
|
|
3547
|
+
ApproximateFirstReceiveTimestamp: string;
|
|
3548
|
+
SequenceNumber?: string | undefined;
|
|
3549
|
+
MessageGroupId?: string | undefined;
|
|
3550
|
+
MessageDeduplicationId?: string | undefined;
|
|
3551
|
+
DeadLetterQueueSourceArn?: string | undefined; // Undocumented, but used by AWS to support their re-drive functionality in the console
|
|
3552
|
+
}
|
|
3553
|
+
type SQSMessageAttributeDataType = "String" | "Number" | "Binary" | string;
|
|
3554
|
+
interface SQSMessageAttribute {
|
|
3555
|
+
stringValue?: string | undefined;
|
|
3556
|
+
binaryValue?: string | undefined;
|
|
3557
|
+
stringListValues?: string[] | undefined; // Not implemented. Reserved for future use.
|
|
3558
|
+
binaryListValues?: string[] | undefined; // Not implemented. Reserved for future use.
|
|
3559
|
+
dataType: SQSMessageAttributeDataType;
|
|
3560
|
+
}
|
|
3561
|
+
interface SQSMessageAttributes {
|
|
3562
|
+
[name: string]: SQSMessageAttribute;
|
|
3563
|
+
}
|
|
3564
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
|
|
3565
|
+
interface SQSBatchResponse {
|
|
3566
|
+
batchItemFailures: SQSBatchItemFailure[];
|
|
3567
|
+
}
|
|
3568
|
+
interface SQSBatchItemFailure {
|
|
3569
|
+
itemIdentifier: string;
|
|
3570
|
+
}
|
|
3571
|
+
//#endregion
|
|
3572
|
+
//#region ../../node_modules/.pnpm/@types+aws-lambda@8.10.163/node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts
|
|
3573
|
+
/**
|
|
3574
|
+
* Use this only if you want to use callbacks. AWS [recommends against](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html) using those,
|
|
3575
|
+
* so you might want to use async/await instead, like this:
|
|
3576
|
+
*
|
|
3577
|
+
* ```typescript
|
|
3578
|
+
* const handler = async (event: TransferFamilyAuthorizerEvent): Promise<TransferFamilyAuthorizerResult> => {
|
|
3579
|
+
* ... add your logic here
|
|
3580
|
+
* }
|
|
3581
|
+
* ```
|
|
3582
|
+
*/
|
|
3583
|
+
type TransferFamilyAuthorizerHandler = Handler<TransferFamilyAuthorizerEvent, TransferFamilyAuthorizerResult>;
|
|
3584
|
+
/**
|
|
3585
|
+
* Transfer Family Authorizer Event. This is the event that will be passed to the Lambda function.
|
|
3586
|
+
* Event message structure can be found here: https://docs.aws.amazon.com/transfer/latest/userguide/custom-lambda-idp.html
|
|
3587
|
+
* While the documentation is not explicit, for key based auth, password will be undefined
|
|
3588
|
+
*/
|
|
3589
|
+
interface TransferFamilyAuthorizerEvent {
|
|
3590
|
+
username: string;
|
|
3591
|
+
password?: string;
|
|
3592
|
+
protocol: "SFTP" | "FTP" | "FTPS";
|
|
3593
|
+
serverId: string;
|
|
3594
|
+
sourceIp: string;
|
|
3595
|
+
}
|
|
3596
|
+
/**
|
|
3597
|
+
* The values that Transfer Family accepts for Lambda functions that are used for custom identity providers.
|
|
3598
|
+
* For some examples, see https://docs.aws.amazon.com/transfer/latest/userguide/custom-lambda-idp.html#lambda-auth-examples
|
|
3599
|
+
*/
|
|
3600
|
+
interface TransferFamilyAuthorizerResult {
|
|
3601
|
+
/**
|
|
3602
|
+
* [**Required if authentication was successful. The user is authenticated if and only if the Role field is not blank**]
|
|
3603
|
+
*
|
|
3604
|
+
* Specifies the Amazon Resource Name (ARN) of the IAM role that controls your users' access to your Amazon S3 bucket or Amazon EFS file system.
|
|
3605
|
+
* The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 or Amazon EFS file system.
|
|
3606
|
+
* The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users' transfer requests.
|
|
3607
|
+
*
|
|
3608
|
+
* For details on establishing a trust relationship, see [To establish a trust relationship](https://docs.aws.amazon.com/transfer/latest/userguide/requirements-roles.html#establish-trust-transfer).
|
|
3609
|
+
*/
|
|
3610
|
+
Role?: string;
|
|
3611
|
+
/**
|
|
3612
|
+
* [**Required for Amazon EFS backing storage**]
|
|
3613
|
+
*
|
|
3614
|
+
* The full POSIX identity, including user ID (`Uid`), group ID (`Gid`), and any secondary group IDs (`SecondaryGids`), that controls your users' access to your Amazon EFS file systems.
|
|
3615
|
+
* The POSIX permissions that are set on files and directories in your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.
|
|
3616
|
+
*/
|
|
3617
|
+
PosixProfile?: {
|
|
3618
|
+
/**
|
|
3619
|
+
* User ID (UID) for the POSIX profile.
|
|
3620
|
+
*/
|
|
3621
|
+
Uid: number;
|
|
3622
|
+
/**
|
|
3623
|
+
* Group ID (GID) for the POSIX profile.
|
|
3624
|
+
*/
|
|
3625
|
+
Gid: number;
|
|
3626
|
+
/**
|
|
3627
|
+
* Secondary group IDs for the POSIX profile, if any.
|
|
3628
|
+
*/
|
|
3629
|
+
SecondaryGids?: number[];
|
|
3630
|
+
} | undefined;
|
|
3631
|
+
/**
|
|
3632
|
+
* [**Optional**]
|
|
3633
|
+
*
|
|
3634
|
+
* A list of SSH public key values that are valid for this user.
|
|
3635
|
+
* An empty list implies that this is not a valid login.
|
|
3636
|
+
* Must not be returned during password authentication.
|
|
3637
|
+
*/
|
|
3638
|
+
PublicKeys?: string[] | undefined;
|
|
3639
|
+
/**
|
|
3640
|
+
* [**Optional**]
|
|
3641
|
+
*
|
|
3642
|
+
* A session policy for your user so that you can use the same IAM role across multiple users.
|
|
3643
|
+
* This policy scopes down user access to portions of their Amazon S3 bucket.
|
|
3644
|
+
*/
|
|
3645
|
+
Policy?: string | undefined;
|
|
3646
|
+
/**
|
|
3647
|
+
* [**Optional**]
|
|
3648
|
+
*
|
|
3649
|
+
* The type of landing directory (folder) that you want your users' home directory to be when they log in to the server.
|
|
3650
|
+
*
|
|
3651
|
+
* - If you set it to `PATH`, the user sees the absolute Amazon S3 bucket or Amazon EFS paths as is in their file transfer protocol clients.
|
|
3652
|
+
* - If you set it to `LOGICAL`, you must provide mappings in the `HomeDirectoryDetails` parameter to make Amazon S3 or Amazon EFS paths visible to your users.
|
|
3653
|
+
*/
|
|
3654
|
+
HomeDirectoryType?: "PATH" | "LOGICAL" | undefined;
|
|
3655
|
+
/**
|
|
3656
|
+
* [**Required if `HomeDirectoryType` has a value of `LOGICAL`**]
|
|
3657
|
+
*
|
|
3658
|
+
* Logical directory mappings that specify which Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible.
|
|
3659
|
+
* You must specify the Entry and Target pair, where Entry shows how the path is made visible and Target is the actual Amazon S3 or Amazon EFS path.
|
|
3660
|
+
*
|
|
3661
|
+
* **Note**: `HomeDirectoryDetails` is a string representation of a JSON map.
|
|
3662
|
+
* This is in contrast to `PosixProfile`, which is an actual JSON map object, and `PublicKeys` which is a JSON array of strings.
|
|
3663
|
+
* See the [code examples](https://docs.aws.amazon.com/transfer/latest/userguide/custom-lambda-idp.html#lambda-auth-examples).
|
|
3664
|
+
*/
|
|
3665
|
+
HomeDirectoryDetails?: string | undefined;
|
|
3666
|
+
/**
|
|
3667
|
+
* [**Optional**]
|
|
3668
|
+
*
|
|
3669
|
+
* The landing directory for a user when they log in to the server using the client.
|
|
3670
|
+
*/
|
|
3671
|
+
HomeDirectory?: string | undefined;
|
|
3672
|
+
}
|
|
3673
|
+
declare namespace index_d_exports {
|
|
3674
|
+
export { ALBCallback, ALBEvent, ALBEventHeaders, ALBEventMultiValueHeaders, ALBEventMultiValueQueryStringParameters, ALBEventQueryStringParameters, ALBEventRequestContext, ALBHandler, ALBResult, APIGatewayAuthorizerCallback, APIGatewayAuthorizerEvent, APIGatewayAuthorizerHandler, APIGatewayAuthorizerResult, APIGatewayAuthorizerResultContext, APIGatewayAuthorizerWithContextCallback, APIGatewayAuthorizerWithContextHandler, APIGatewayAuthorizerWithContextResult, APIGatewayEvent, APIGatewayEventClientCertificate, APIGatewayEventDefaultAuthorizerContext, APIGatewayEventIdentity, APIGatewayEventLambdaAuthorizerContext, APIGatewayEventRequestContext, APIGatewayEventRequestContextIAMAuthorizer, APIGatewayEventRequestContextJWTAuthorizer, APIGatewayEventRequestContextLambdaAuthorizer, APIGatewayEventRequestContextV2, APIGatewayEventRequestContextV2WithAuthorizer, APIGatewayEventRequestContextWithAuthorizer, APIGatewayEventWebsocketRequestContextV2, APIGatewayIAMAuthorizerResult, APIGatewayIAMAuthorizerWithContextResult, APIGatewayProxyCallback, APIGatewayProxyCallbackV2, APIGatewayProxyCognitoAuthorizer, APIGatewayProxyEvent, APIGatewayProxyEventBase, APIGatewayProxyEventHeaders, APIGatewayProxyEventMultiValueHeaders, APIGatewayProxyEventMultiValueQueryStringParameters, APIGatewayProxyEventPathParameters, APIGatewayProxyEventQueryStringParameters, APIGatewayProxyEventStageVariables, APIGatewayProxyEventV2, APIGatewayProxyEventV2WithIAMAuthorizer, APIGatewayProxyEventV2WithJWTAuthorizer, APIGatewayProxyEventV2WithLambdaAuthorizer, APIGatewayProxyEventV2WithRequestContext, APIGatewayProxyHandler, APIGatewayProxyHandlerV2, APIGatewayProxyHandlerV2WithIAMAuthorizer, APIGatewayProxyHandlerV2WithJWTAuthorizer, APIGatewayProxyHandlerV2WithLambdaAuthorizer, APIGatewayProxyResult, APIGatewayProxyResultV2, APIGatewayProxyStructuredResultV2, APIGatewayProxyWebsocketEventV2, APIGatewayProxyWebsocketEventV2WithRequestContext, APIGatewayProxyWebsocketHandlerV2, APIGatewayProxyWithCognitoAuthorizerEvent, APIGatewayProxyWithCognitoAuthorizerHandler, APIGatewayProxyWithLambdaAuthorizerEvent, APIGatewayProxyWithLambdaAuthorizerEventRequestContext, APIGatewayProxyWithLambdaAuthorizerHandler, APIGatewayRequestAuthorizerEvent, APIGatewayRequestAuthorizerEventHeaders, APIGatewayRequestAuthorizerEventMultiValueHeaders, APIGatewayRequestAuthorizerEventMultiValueQueryStringParameters, APIGatewayRequestAuthorizerEventPathParameters, APIGatewayRequestAuthorizerEventQueryStringParameters, APIGatewayRequestAuthorizerEventStageVariables, APIGatewayRequestAuthorizerEventV2, APIGatewayRequestAuthorizerHandler, APIGatewayRequestAuthorizerWithContextHandler, APIGatewayRequestIAMAuthorizerHandlerV2, APIGatewayRequestIAMAuthorizerV2WithContextHandler, APIGatewayRequestSimpleAuthorizerHandlerV2, APIGatewayRequestSimpleAuthorizerHandlerV2WithContext, APIGatewaySimpleAuthorizerResult, APIGatewaySimpleAuthorizerWithContextResult, APIGatewayTokenAuthorizerEvent, APIGatewayTokenAuthorizerHandler, APIGatewayTokenAuthorizerWithContextHandler, AccessTokenGeneration, AccessTokenGenerationV3, AccountTakeOverActionType, AmplifyGraphQlResolverEvent, AmplifyGraphQlResolverHandler, AppSyncAuthorizerEvent, AppSyncAuthorizerEventHeaders, AppSyncAuthorizerHander, AppSyncAuthorizerHandler, AppSyncAuthorizerResult, AppSyncBatchResolverHandler, AppSyncIdentity, AppSyncIdentityCognito, AppSyncIdentityIAM, AppSyncIdentityLambda, AppSyncIdentityOIDC, AppSyncResolverEvent, AppSyncResolverEventHeaders, AppSyncResolverHandler, Artifact, ArtifactLocation, AttributeValue, AuthResponse, AuthResponseContext, AutoScalingInstanceMarketOption, AutoScalingInstanceRecord, AutoScalingScaleInCallback, AutoScalingScaleInCause, AutoScalingScaleInEvent, AutoScalingScaleInHandler, AutoScalingScaleInResult, AutoScalingTerminationRequest, BaseCustomEmailSenderTriggerEvent, BaseCustomMessageTriggerEvent, BaseCustomSMSSenderTriggerEvent, BasePostConfirmationTriggerEvent, BasePreSignUpTriggerEvent, BasePreTokenGenerationTriggerEvent, BasePreTokenGenerationV2TriggerEvent, BasePreTokenGenerationV3TriggerEvent, BaseStatement, BaseUserMigrationTriggerEvent, Callback, CdkCustomResourceCallback, CdkCustomResourceEvent, CdkCustomResourceHandler, CdkCustomResourceIsCompleteCallback, CdkCustomResourceIsCompleteEvent, CdkCustomResourceIsCompleteHandler, CdkCustomResourceIsCompleteResponse, CdkCustomResourceIsCompleteResponseSuccess, CdkCustomResourceIsCompleteResponseWaiting, CdkCustomResourceResponse, ClaimsAndScopeOverrideDetails, ClaimsAndScopeOverrideDetailsV3, ClientContext, ClientContextClient, ClientContextEnv, CloudFormationCustomResourceCreateEvent, CloudFormationCustomResourceDeleteEvent, CloudFormationCustomResourceEvent, CloudFormationCustomResourceEventCommon, CloudFormationCustomResourceFailedResponse, CloudFormationCustomResourceHandler, CloudFormationCustomResourceResourcePropertiesCommon, CloudFormationCustomResourceResponse, CloudFormationCustomResourceResponseCommon, CloudFormationCustomResourceSuccessResponse, CloudFormationCustomResourceUpdateEvent, CloudFrontCustomOrigin, CloudFrontEvent, CloudFrontFunctionsCookies, CloudFrontFunctionsEvent, CloudFrontFunctionsHeaders, CloudFrontFunctionsQuerystring, CloudFrontHeaders, CloudFrontOrigin, CloudFrontRequest, CloudFrontRequestCallback, CloudFrontRequestEvent, CloudFrontRequestEventRecord, CloudFrontRequestHandler, CloudFrontRequestResult, CloudFrontResponse, CloudFrontResponseCallback, CloudFrontResponseEvent, CloudFrontResponseEventRecord, CloudFrontResponseHandler, CloudFrontResponseResult, CloudFrontResultResponse, CloudFrontS3Origin, CloudFrontS3OriginAuthMethodNone, CloudFrontS3OriginAuthMethodOriginAccessIdentity, CloudFrontS3OriginBase, CloudWatchAlarmCompositeConfiguration, CloudWatchAlarmConfiguration, CloudWatchAlarmData, CloudWatchAlarmEvent, CloudWatchAlarmExpression, CloudWatchAlarmHandler, CloudWatchAlarmMetric, CloudWatchAlarmMetricDataQuery, CloudWatchAlarmState, CloudWatchLogsDecodedData, CloudWatchLogsEvent, CloudWatchLogsEventData, CloudWatchLogsHandler, CloudWatchLogsLogEvent, CloudWatchLogsLogEventExtractedFields, CloudWatchMetric, CloudWatchMetricStat, CodeBuildCacheType, CodeBuildCloudWatchStateEvent, CodeBuildCloudWatchStateHandler, CodeBuildEnvironmentComputeType, CodeBuildEnvironmentPullCredentialsType, CodeBuildEnvironmentType, CodeBuildEnvironmentVariableType, CodeBuildPhaseStatusType, CodeBuildPhaseType, CodeBuildSourceLocationType, CodeBuildStateEventDetail, CodeBuildStateType, CodeCommitHandler, CodeCommitTrigger, CodeCommitTriggerEvent, CodePipelineActionCategory, CodePipelineActionState, CodePipelineCloudWatchActionEvent, CodePipelineCloudWatchActionHandler, CodePipelineCloudWatchEvent, CodePipelineCloudWatchHandler, CodePipelineCloudWatchPipelineEvent, CodePipelineCloudWatchPipelineHandler, CodePipelineCloudWatchStageEvent, CodePipelineCloudWatchStageHandler, CodePipelineEvent, CodePipelineHandler, CodePipelineStageState, CodePipelineState, CognitoIdentity, CognitoUserPoolEvent, CognitoUserPoolTriggerEvent, CognitoUserPoolTriggerHandler, Condition, ConditionBlock, ConnectContactFlowCallback, ConnectContactFlowChannel, ConnectContactFlowEndpoint, ConnectContactFlowEvent, ConnectContactFlowHandler, ConnectContactFlowInitiationMethod, ConnectContactFlowQueue, ConnectContactFlowResult, Context, CreateAuthChallengeTriggerEvent, CreateAuthChallengeTriggerHandler, Credentials, CustomAuthorizerCallback, CustomAuthorizerEvent, CustomAuthorizerHandler, CustomAuthorizerResult, CustomEmailSenderAccountTakeOverNotificationTriggerEvent, CustomEmailSenderAdminCreateUserTriggerEvent, CustomEmailSenderAuthenticationTriggerEvent, CustomEmailSenderForgotPasswordTriggerEvent, CustomEmailSenderResendCodeTriggerEvent, CustomEmailSenderSignUpTriggerEvent, CustomEmailSenderTriggerEvent, CustomEmailSenderTriggerHandler, CustomEmailSenderUpdateUserAttributeTriggerEvent, CustomEmailSenderVerifyUserAttributeTriggerEvent, CustomEmailSender_AccountTakeOverNotification_UserAttributes, CustomMessageAdminCreateUserTriggerEvent, CustomMessageAuthenticationTriggerEvent, CustomMessageForgotPasswordTriggerEvent, CustomMessageResendCodeTriggerEvent, CustomMessageSignUpTriggerEvent, CustomMessageTriggerEvent, CustomMessageTriggerHandler, CustomMessageUpdateUserAttributeTriggerEvent, CustomMessageVerifyUserAttributeTriggerEvent, CustomSMSSenderAdminCreateUserTriggerEvent, CustomSMSSenderAuthenticationUserTriggerEvent, CustomSMSSenderForgotPasswordTriggerEvent, CustomSMSSenderResendCodeTriggerEvent, CustomSMSSenderSignUpTriggerEvent, CustomSMSSenderTriggerEvent, CustomSMSSenderTriggerHandler, CustomSMSSenderUpdateUserAttributeTriggerEvent, CustomSMSSenderVerifyUserAttributeTriggerEvent, CustomerAudio, DefineAuthChallengeTriggerEvent, DefineAuthChallengeTriggerHandler, DynamoDBBatchItemFailure, DynamoDBBatchResponse, DynamoDBRecord, DynamoDBStreamEvent, DynamoDBStreamHandler, EncryptionKey, EventBridgeEvent, EventBridgeHandler, FirehoseRecordMetadata, FirehoseRecordTransformationStatus, FirehoseTransformationCallback, FirehoseTransformationEvent, FirehoseTransformationEventRecord, FirehoseTransformationHandler, FirehoseTransformationMetadata, FirehoseTransformationResult, FirehoseTransformationResultRecord, GroupOverrideDetails, GroupOverrideDetailsV2, GroupOverrideDetailsV3, GuardDutyNotificationEvent, GuardDutyScanResultNotificationEvent, GuardDutyScanResultNotificationEventDetail, GuardDutyThreatDetail, Handler, IdTokenGeneration, IdTokenGenerationV3, InboundFederationProviderType, InboundFederationTriggerEvent, InboundFederationTriggerHandler, IoTCustomAuthorizerEvent, IoTCustomAuthorizerHandler, IoTCustomAuthorizerResult, IoTEvent, IoTHandler, IoTPreProvisioningHookEvent, IoTPreProvisioningHookHandler, IoTPreProvisioningHookResult, IoTProtocolDataHTTP, IoTProtocolDataMQTT, IoTProtocolDataTLS, IoTProtocolType, KinesisStreamBatchItemFailure, KinesisStreamBatchResponse, KinesisStreamEvent, KinesisStreamHandler, KinesisStreamRecord, KinesisStreamRecordPayload, KinesisStreamStateResponse, KinesisStreamTumblingWindowEvent, KinesisStreamTumblingWindowHandler, LambdaFunctionURLCallback, LambdaFunctionURLEvent, LambdaFunctionURLEventWithIAMAuthorizer, LambdaFunctionURLHandler, LambdaFunctionURLHandlerWithIAMAuthorizer, LambdaFunctionURLResult, LevV2DialogActionWithoutSlot, LexCallback, LexDialogAction, LexDialogActionBase, LexDialogActionClose, LexDialogActionConfirmIntent, LexDialogActionDelegate, LexDialogActionElicitIntent, LexDialogActionElicitSlot, LexEvent, LexEventRequestAttributes, LexEventSessionAttributes, LexEventSlots, LexGenericAttachment, LexHandler, LexResult, LexSlotDetail, LexSlotDetails, LexSlotResolution, LexV2ActiveContext, LexV2Bot, LexV2Callback, LexV2ContentMessage, LexV2DialogAction, LexV2Event, LexV2Handler, LexV2ImageResponseCard, LexV2ImageResponseCardButton, LexV2ImageResponseCardMessage, LexV2Intent, LexV2IntentState, LexV2Interpretation, LexV2ListSlotValue, LexV2Message, LexV2Result, LexV2ResultDialogAction, LexV2ScalarSlotValue, LexV2SentimentResponse, LexV2SentimentScore, LexV2SessionState, LexV2Slot, LexV2SlotValue, LexV2Slots, LexV2Transcription, MSKEvent, MSKHandler, MSKRecord, MSKRecordHeader, MaybeStatementPrincipal, MaybeStatementResource, PolicyDocument, PostAuthenticationTriggerEvent, PostAuthenticationTriggerHandler, PostConfirmationConfirmForgotPassword, PostConfirmationConfirmSignUpTriggerEvent, PostConfirmationTriggerEvent, PostConfirmationTriggerHandler, PreAuthenticationTriggerEvent, PreAuthenticationTriggerHandler, PreSignUpAdminCreateUserTriggerEvent, PreSignUpEmailTriggerEvent, PreSignUpExternalProviderTriggerEvent, PreSignUpTriggerEvent, PreSignUpTriggerHandler, PreTokenGenerationAuthenticateDeviceTriggerEvent, PreTokenGenerationAuthenticateDeviceV2TriggerEvent, PreTokenGenerationAuthenticationTriggerEvent, PreTokenGenerationAuthenticationV2TriggerEvent, PreTokenGenerationClientCredentialsV3TriggerEvent, PreTokenGenerationHostedAuthTriggerEvent, PreTokenGenerationHostedAuthV2TriggerEvent, PreTokenGenerationNewPasswordChallengeTriggerEvent, PreTokenGenerationNewPasswordChallengeV2TriggerEvent, PreTokenGenerationRefreshTokensTriggerEvent, PreTokenGenerationRefreshTokensV2TriggerEvent, PreTokenGenerationTriggerEvent, PreTokenGenerationTriggerHandler, PreTokenGenerationV2TriggerEvent, PreTokenGenerationV2TriggerHandler, PreTokenGenerationV3TriggerEvent, PreTokenGenerationV3TriggerHandler, PrincipalValue, ProxyCallback, ProxyHandler, ProxyResult, S3ArtifactLocation, S3ArtifactStore, S3BatchCallback, S3BatchEvent, S3BatchEventJob, S3BatchEventTask, S3BatchHandler, S3BatchResult, S3BatchResultResult, S3BatchResultResultCode, S3CreateEvent, S3Event, S3EventRecord, S3EventRecordGlacierEventData, S3EventRecordGlacierRestoreEventData, S3Handler, S3NotificationEvent, S3NotificationEventBridgeHandler, S3ObjectACLUpdatedNotificationEvent, S3ObjectACLUpdatedNotificationEventDetail, S3ObjectAccessTierChangedNotificationEvent, S3ObjectAccessTierChangedNotificationEventDetail, S3ObjectCreatedNotificationEvent, S3ObjectCreatedNotificationEventDetail, S3ObjectDeletedNotificationEvent, S3ObjectDeletedNotificationEventDeleteObjectDetail, S3ObjectDeletedNotificationEventDetail, S3ObjectDeletedNotificationEventLifecycleExpirationDetail, S3ObjectRestoreCompletedNotificationEvent, S3ObjectRestoreCompletedNotificationEventDetail, S3ObjectRestoreExpiredNotificationEvent, S3ObjectRestoreExpiredNotificationEventDetail, S3ObjectRestoreInitiatedNotificationEvent, S3ObjectRestoreInitiatedNotificationEventDetail, S3ObjectStorageClassChangedNotificationEvent, S3ObjectStorageClassChangedNotificationEventDetail, S3ObjectTagsAddedNotificationEvent, S3ObjectTagsAddedNotificationEventDetail, S3ObjectTagsDeletedNotificationEvent, S3ObjectTagsDeletedNotificationEventDetail, SESEvent, SESEventRecord, SESHandler, SESMail, SESMailCommonHeaders, SESMailHeader, SESMessage, SESReceipt, SESReceiptBounceAction, SESReceiptLambdaAction, SESReceiptS3Action, SESReceiptSnsAction, SESReceiptStatus, SESReceiptStopAction, SESReceiptWorkMailAction, SNSEvent, SNSEventRecord, SNSHandler, SNSMessage, SNSMessageAttribute, SNSMessageAttributes, SQSBatchItemFailure, SQSBatchResponse, SQSEvent, SQSHandler, SQSMessageAttribute, SQSMessageAttributeDataType, SQSMessageAttributes, SQSRecord, SQSRecordAttributes, ScheduledEvent, ScheduledHandler, SecretsManagerRotationEvent, SecretsManagerRotationEventStep, SecretsManagerRotationHandler, SelfManagedKafkaEvent, SelfManagedKafkaHandler, SelfManagedKafkaRecord, SelfManagedKafkaRecordHeader, StartedCustomerAudio, Statement, StatementAction, StatementEffect, StatementPrincipal, StatementResource, StoppedCustomerAudio, StreamRecord, StreamifyHandler, TransferFamilyAuthorizerEvent, TransferFamilyAuthorizerHandler, TransferFamilyAuthorizerResult, UserMigrationAuthenticationTriggerEvent, UserMigrationForgotPasswordTriggerEvent, UserMigrationTriggerEvent, UserMigrationTriggerHandler, UserStatus, VerifyAuthChallengeResponseTriggerEvent, VerifyAuthChallengeResponseTriggerHandler };
|
|
3675
|
+
}
|
|
3676
|
+
//#endregion
|
|
3677
|
+
//#region src/Adapters/aws-lambda/index.d.ts
|
|
3678
|
+
/**
|
|
3679
|
+
* Converts a Vercube App instance into an AWS Lambda handler function for API Gateway integration.
|
|
3680
|
+
*
|
|
3681
|
+
* This function creates a serverless handler that bridges between AWS API Gateway events and
|
|
3682
|
+
* the Vercube application framework. It handles the conversion of AWS Lambda events to standard
|
|
3683
|
+
* web Request objects, processes them through the Vercube app, and converts the responses back
|
|
3684
|
+
* to the format expected by AWS API Gateway.
|
|
3685
|
+
*
|
|
3686
|
+
* The handler supports both API Gateway v1 (APIGatewayProxyEvent) and v2 (APIGatewayProxyEventV2)
|
|
3687
|
+
* event formats, automatically detecting and handling the appropriate format. It processes:
|
|
3688
|
+
* - HTTP method, URL, headers, and body from the Lambda event
|
|
3689
|
+
* - Converts them to a standard web Request object
|
|
3690
|
+
* - Passes the request through the Vercube application
|
|
3691
|
+
* - Converts the Response back to AWS API Gateway format
|
|
3692
|
+
*
|
|
3693
|
+
* The returned handler function can be directly used as an AWS Lambda function handler,
|
|
3694
|
+
* providing seamless integration between AWS Lambda and Vercube applications.
|
|
3695
|
+
*
|
|
3696
|
+
* @param app - The Vercube App instance that will handle the requests
|
|
3697
|
+
* @returns An async function that accepts AWS API Gateway events and returns API Gateway responses
|
|
3698
|
+
*
|
|
3699
|
+
* @see {@link convertEventToRequest} For details on event to request conversion
|
|
3700
|
+
* @see {@link convertResponseToAWSResponse} For details on response header conversion
|
|
3701
|
+
* @see {@link convertBodyToAWSResponse} For details on response body conversion
|
|
3702
|
+
*/
|
|
3703
|
+
export declare function toServerlessHandler(app: App): ServerlessHandler<APIGatewayProxyEvent | APIGatewayProxyEventV2, APIGatewayProxyResult | APIGatewayProxyResultV2, Context>;
|
|
3704
|
+
//#endregion
|