1 | import { Handler } from "../handler";
|
2 | import {
|
3 | APIGatewayEventRequestContextIAMAuthorizer,
|
4 | APIGatewayEventRequestContextV2WithAuthorizer,
|
5 | APIGatewayProxyCallbackV2,
|
6 | APIGatewayProxyEventV2,
|
7 | APIGatewayProxyEventV2WithRequestContext,
|
8 | APIGatewayProxyResultV2,
|
9 | } from "./api-gateway-proxy";
|
10 |
|
11 | /**
|
12 | * Default Lambda Function URL event with no Authorizer
|
13 | */
|
14 | export type LambdaFunctionURLEvent = APIGatewayProxyEventV2;
|
15 |
|
16 | /**
|
17 | * Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
18 | * @see - https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads
|
19 | */
|
20 | export type LambdaFunctionURLResult<T = never> = APIGatewayProxyResultV2<T>;
|
21 |
|
22 | /**
|
23 | * Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
24 | * @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
|
25 | */
|
26 | export type LambdaFunctionURLCallback = APIGatewayProxyCallbackV2;
|
27 |
|
28 | /**
|
29 | * Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
30 | * @see - https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads
|
31 | */
|
32 | export type LambdaFunctionURLHandler<T = never> = Handler<LambdaFunctionURLEvent, LambdaFunctionURLResult<T>>;
|
33 |
|
34 | export type LambdaFunctionURLEventWithIAMAuthorizer = APIGatewayProxyEventV2WithRequestContext<
|
35 | APIGatewayEventRequestContextV2WithAuthorizer<APIGatewayEventRequestContextIAMAuthorizer>
|
36 | >;
|
37 |
|
38 | /**
|
39 | * Works with Lambda Function URL format which is currently the same as HTTP API integration Payload Format version 2.0
|
40 | * @see - https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html#urls-payloads
|
41 | */
|
42 | export type LambdaFunctionURLHandlerWithIAMAuthorizer<T = never> = Handler<
|
43 | LambdaFunctionURLEventWithIAMAuthorizer,
|
44 | LambdaFunctionURLResult<T>
|
45 | >;
|