1
- import { RequestListener } from "http"
2
- import { Handler } from "aws-lambda"
3
- import Logger from "./logger"
1
+ import { RequestListener } from "http" ;
2
+ import { Handler } from "aws-lambda" ;
3
+ import Logger from "./logger" ;
4
4
5
+ interface EventSource {
6
+ getRequest ?: any ; // TODO:
7
+ getResponse ?: any ; // TODO:
8
+ }
5
9
interface ProxyParams {
6
- app : RequestListener ,
7
- binaryMimeTypes ?: string [ ] ,
8
- binarySettings ?: BinarySettings
10
+ app : RequestListener ;
11
+ binaryMimeTypes ?: string [ ] ;
12
+ binarySettings ?: BinarySettings ;
9
13
}
10
14
11
15
interface BinarySettings {
12
- isBinary ?: Function | boolean ,
13
- contentTypes ?: string [ ]
16
+ isBinary ?: Function | boolean ;
17
+ contentTypes ?: string [ ] ;
14
18
}
15
19
interface ConfigureParams {
16
- app : RequestListener ,
17
- binaryMimeTypes ?: string [ ] ,
18
- binarySettings ?: BinarySettings
20
+ app : RequestListener ;
21
+ binaryMimeTypes ?: string [ ] ;
22
+ binarySettings ?: BinarySettings ;
23
+ eventSource ?: EventSource ; // TODO:
19
24
}
20
25
21
26
interface BinarySettings {
22
- isBinary ?: Function | boolean ,
23
- contentTypes ?: string [ ]
27
+ isBinary ?: Function | boolean ;
28
+ contentTypes ?: string [ ] ;
24
29
}
25
30
26
31
interface ConfigureResult {
27
- handler : Handler ,
28
- log : Logger ,
29
- proxy : ( proxyParams : ProxyParams ) => Promise < Object >
32
+ handler : Handler ;
33
+ log : Logger ;
34
+ proxy : ( proxyParams : ProxyParams ) => Promise < Object > ;
30
35
}
31
36
32
- declare function configure ( configureParams : ConfigureParams ) : ConfigureResult
37
+ declare function configure ( configureParams : ConfigureParams ) : ConfigureResult ;
33
38
34
39
// declare function proxy(proxyParams: ProxyParams): Promise<any>
35
40
36
- export default configure
41
+ export default configure ;
0 commit comments