-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c68778b
commit d0aad6a
Showing
5 changed files
with
23 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,41 @@ | ||
import { RequestListener } from "http" | ||
import { Handler } from "aws-lambda" | ||
import Logger from "./logger" | ||
import { RequestListener } from "http"; | ||
import { Handler } from "aws-lambda"; | ||
import Logger from "./logger"; | ||
|
||
interface EventSource { | ||
getRequest?: any; // TODO: | ||
getResponse?: any; // TODO: | ||
} | ||
interface ProxyParams { | ||
app: RequestListener, | ||
binaryMimeTypes?: string[], | ||
binarySettings?: BinarySettings | ||
app: RequestListener; | ||
binaryMimeTypes?: string[]; | ||
binarySettings?: BinarySettings; | ||
} | ||
|
||
interface BinarySettings { | ||
isBinary?: Function | boolean, | ||
contentTypes?: string[] | ||
isBinary?: Function | boolean; | ||
contentTypes?: string[]; | ||
} | ||
interface ConfigureParams { | ||
app: RequestListener, | ||
binaryMimeTypes?: string[], | ||
binarySettings?: BinarySettings | ||
app: RequestListener; | ||
binaryMimeTypes?: string[]; | ||
binarySettings?: BinarySettings; | ||
eventSource?: EventSource; // TODO: | ||
} | ||
|
||
interface BinarySettings { | ||
isBinary?: Function | boolean, | ||
contentTypes?: string[] | ||
isBinary?: Function | boolean; | ||
contentTypes?: string[]; | ||
} | ||
|
||
interface ConfigureResult { | ||
handler: Handler, | ||
log: Logger, | ||
proxy: (proxyParams: ProxyParams) => Promise<Object> | ||
handler: Handler; | ||
log: Logger; | ||
proxy: (proxyParams: ProxyParams) => Promise<Object>; | ||
} | ||
|
||
declare function configure(configureParams: ConfigureParams): ConfigureResult | ||
declare function configure(configureParams: ConfigureParams): ConfigureResult; | ||
|
||
// declare function proxy(proxyParams: ProxyParams): Promise<any> | ||
|
||
export default configure | ||
export default configure; |
Empty file.
Empty file.
Empty file.
Empty file.