-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
57 lines (47 loc) · 1.19 KB
/
index.d.ts
File metadata and controls
57 lines (47 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Type definitions for aws-lambda-router
// Project: github.com/spring-media/aws-lambda-router
export function handler(routeConfig: RouteConfig): any;
export interface ProxyIntegrationRoute {
path: string;
method: string;
action: (request: any, context: any) => any;
}
export interface ProxyIntegrationConfig {
cors: boolean;
routes: ProxyIntegrationRoute[];
debug?: boolean;
errorMapping?: any;
defaultHeaders?: string;
}
export interface SnsRoute {
subject: RegExp;
action: (sns: any, context: any) => any;
}
export interface SnsConfig {
routes: SnsRoute[];
debug?: boolean;
}
export interface SqsRoute {
source: string | RegExp;
action: (messages: any[], context: any) => any;
}
export interface SqsConfig {
routes: SqsRoute[];
debug?: boolean;
}
export interface S3Route {
bucketName?: string | RegExp;
eventName?: string | RegExp;
objectKeyPrefix?: string;
action: (s3Record: any, context: any) => any;
}
export interface S3Config {
routes: S3Route[];
debug?: boolean;
}
export interface RouteConfig {
proxyIntegration?: ProxyIntegrationConfig;
sns?: SnsConfig;
sqs?: SqsConfig;
s3?: S3Config;
}