-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.d.ts
36 lines (33 loc) · 1.22 KB
/
index.d.ts
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
declare module "morgan-body" {
import * as express from "express";
import * as stream from "stream";
type DateTimeFormatType = "edt" | "clf" | "iso" | "utc";
type FilterFunctionType = (request: express.Request, response: express.Response) => boolean;
type StreamLikeType = stream.Writable | { write: stream.Writable["write"] };
type ThemeType = "defaultTheme" | "dracula" | "usa" | "inverted" | "darkened" | "lightened" | "dimmed";
interface IMorganBodyOptions {
noColors?: boolean;
maxBodyLength?: number;
prettify?: boolean;
logReqDateTime?: boolean;
dateTimeFormat?: DateTimeFormatType;
timezone?: string;
logReqUserAgent?: boolean;
logRequestBody?: boolean;
logReqHeaderList?: string[];
logAllReqHeader?: boolean;
logResponseBody?: boolean;
logRequestId?: boolean;
logResHeaderList?: boolean;
logAllResHeader?: boolean;
logIP?: boolean,
includeNewLine?: boolean;
includeFinalNewLine?: boolean;
skip?: FilterFunctionType | null;
stream?: StreamLikeType | null;
theme?: ThemeType;
filterParameters?: string[];
immediateReqLog?: boolean;
}
export default function morganBody(app: express.Application, options?: IMorganBodyOptions): void;
}