1 | import { Callback, Handler } from "../handler";
|
2 |
|
3 | export type ALBHandler = Handler<ALBEvent, ALBResult>;
|
4 | export type ALBCallback = Callback<ALBResult>;
|
5 |
|
6 |
|
7 | export interface ALBEventRequestContext {
|
8 | elb: {
|
9 | targetGroupArn: string;
|
10 | };
|
11 | }
|
12 |
|
13 | export interface ALBEventQueryStringParameters {
|
14 | [name: string]: string | undefined;
|
15 | }
|
16 |
|
17 | export interface ALBEventHeaders {
|
18 | [name: string]: string | undefined;
|
19 | }
|
20 |
|
21 | export interface ALBEventMultiValueHeaders {
|
22 | [name: string]: string[] | undefined;
|
23 | }
|
24 |
|
25 | export interface ALBEventMultiValueQueryStringParameters {
|
26 | [name: string]: string[] | undefined;
|
27 | }
|
28 |
|
29 | export interface ALBEvent {
|
30 | requestContext: ALBEventRequestContext;
|
31 | httpMethod: string;
|
32 | path: string;
|
33 | queryStringParameters?: ALBEventQueryStringParameters | undefined;
|
34 | headers?: ALBEventHeaders | undefined;
|
35 | multiValueQueryStringParameters?: ALBEventMultiValueQueryStringParameters | undefined;
|
36 | multiValueHeaders?: ALBEventMultiValueHeaders | undefined;
|
37 | body: string | null;
|
38 | isBase64Encoded: boolean;
|
39 | }
|
40 |
|
41 | export interface ALBResult {
|
42 | statusCode: number;
|
43 | statusDescription?: string | undefined;
|
44 | headers?: { [header: string]: boolean | number | string } | undefined;
|
45 | multiValueHeaders?: { [header: string]: Array<boolean | number | string> } | undefined;
|
46 | body?: string | undefined;
|
47 | isBase64Encoded?: boolean | undefined;
|
48 | }
|