@types/express-requests-logger
Advanced tools
Comparing version 3.0.4 to 4.0.0
@@ -29,8 +29,2 @@ import { NextFunction, Request } from "express-serve-static-core"; | ||
/** | ||
* pass the fields you wish to mask in the query of the requests (sensitive data like passwords, credit cards numbers etc..). | ||
* {@link https://github.com/PayU/express-request-logger#maskquery} | ||
*/ | ||
maskQuery?: string[] | undefined; | ||
/** | ||
* pass the header names you wish to exclude from the audit (senstitive data like authorization headers etc..). * field - exclude all headers | ||
@@ -57,3 +51,3 @@ * {@link https://github.com/PayU/express-request-logger#excludeheaders} | ||
*/ | ||
interface Options extends CommonOptions { | ||
interface Options { | ||
/** | ||
@@ -67,2 +61,13 @@ * The logger to use for logging the request/response. | ||
/** | ||
* Should be a function, that returns boolean value to indicate whether | ||
* to skip the audit for the current request. Usually the logic should | ||
* be around the request/response params. Useful to provide a custom | ||
* logic for cases we would want to skip logging specific request. | ||
* | ||
* The default implementation of the function returns false. | ||
* {@link https://github.com/PayU/express-request-logger#shouldskipauditfunc} | ||
*/ | ||
shouldSkipAuditFunc?: ((req: Express.Request, res: Express.Response) => boolean) | undefined; | ||
/** | ||
* `true` - log once the request arrives (request details), and log after response is sent (both request and response). | ||
@@ -85,5 +90,13 @@ * Useful if there is a concern that the server will crash during the request and there is a need to log the request before it's processed. | ||
*/ | ||
request?: any; | ||
request?: RequestOptions | undefined; | ||
/** | ||
* Specific configuration for responses | ||
* {@link https://github.com/PayU/express-request-logger#response} | ||
*/ | ||
response?: ResponseOptions | undefined; | ||
} | ||
interface RequestOptions extends CommonOptions { | ||
/** | ||
* Additional to mask options, you can add your own functionality to mask request body. | ||
@@ -97,6 +110,6 @@ * This function will execute as a masking function before the package functions. | ||
/** | ||
* Specific configuration for responses | ||
* {@link https://github.com/PayU/express-request-logger#response} | ||
* pass the fields you wish to mask in the query of the requests (sensitive data like passwords, credit cards numbers etc..). | ||
* {@link https://github.com/PayU/express-request-logger#maskquery} | ||
*/ | ||
response?: ResponseOptions | undefined; | ||
maskQuery?: string[] | undefined; | ||
} | ||
@@ -103,0 +116,0 @@ |
{ | ||
"name": "@types/express-requests-logger", | ||
"version": "3.0.4", | ||
"version": "4.0.0", | ||
"description": "TypeScript definitions for express-requests-logger", | ||
@@ -25,4 +25,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-requests-logger", | ||
}, | ||
"typesPublisherContentHash": "123331a553472299c827ee5cf258784d7972d196397695d0f196f1fd49c66d4d", | ||
"typeScriptVersion": "4.5" | ||
"typesPublisherContentHash": "d33a25ec9265bb67d66ea70964469b95ddd21c8c0640a99053d09167eda64fa0", | ||
"typeScriptVersion": "4.7" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 07 Nov 2023 03:09:37 GMT | ||
* Last updated: Fri, 10 May 2024 23:35:44 GMT | ||
* Dependencies: [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core) | ||
@@ -14,0 +14,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8326
120