-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Icenium/CHAT-1208-mask-authorization
[CHAT-1208] Mask authorization
- Loading branch information
Showing
5 changed files
with
373 additions
and
359 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,54 +1,54 @@ | ||
declare module PersonalDataFilter { | ||
interface IPersonalDataFilter { | ||
filter(data: any): any; | ||
} | ||
|
||
|
||
interface IPersonalDataFilterConfig { | ||
/** | ||
* Regular expressions which will be added to the default ones. | ||
*/ | ||
additionalRegularExpressions?: string[]; | ||
|
||
/** | ||
* Regular expression which will be used instead of the default one. | ||
*/ | ||
regularExpression?: RegExp; | ||
|
||
/** | ||
* String which will be used to replace the personal data. | ||
*/ | ||
personalDataMask?: string; | ||
|
||
/** | ||
* Personal data properties which will be added to the default ones. | ||
*/ | ||
additionalPersonalDataProperties?: string[]; | ||
|
||
/** | ||
* Personal data properties which will be used instead of the default ones. | ||
*/ | ||
personalDataProperties?: string[]; | ||
|
||
/** | ||
* Defines if the filter should use the default match replacer to replace each regular | ||
* expression match. | ||
*/ | ||
useDefaultMatchReplacer?: boolean; | ||
|
||
/** | ||
* Sets the match replacer which will be used to replace each regular | ||
* expression match. | ||
*/ | ||
matchReplacer: MatchReplacer; | ||
} | ||
|
||
/** | ||
* Function which will be used to replace each regular expression match. | ||
*/ | ||
type MatchReplacer = (match: string) => string | ||
interface IPersonalDataFilter { | ||
filter(data: any): any; | ||
} | ||
|
||
|
||
interface IPersonalDataFilterConfig { | ||
/** | ||
* Regular expressions which will be added to the default ones. | ||
*/ | ||
additionalRegularExpressions?: string[]; | ||
|
||
/** | ||
* Regular expression which will be used instead of the default one. | ||
*/ | ||
regularExpression?: RegExp; | ||
|
||
/** | ||
* String which will be used to replace the personal data. | ||
*/ | ||
personalDataMask?: string; | ||
|
||
/** | ||
* Personal data properties which will be added to the default ones. | ||
*/ | ||
additionalPersonalDataProperties?: string[]; | ||
|
||
/** | ||
* Personal data properties which will be used instead of the default ones. | ||
*/ | ||
personalDataProperties?: string[]; | ||
|
||
/** | ||
* Defines if the filter should use the default match replacer to replace each regular | ||
* expression match. | ||
*/ | ||
useDefaultMatchReplacer?: boolean; | ||
|
||
/** | ||
* Sets the match replacer which will be used to replace each regular | ||
* expression match. | ||
*/ | ||
matchReplacer: MatchReplacer; | ||
} | ||
|
||
/** | ||
* Function which will be used to replace each regular expression match. | ||
*/ | ||
type MatchReplacer = (match: string) => string | ||
} | ||
|
||
declare module "node-personal-data-filter" { | ||
export const newFilter: (cfg?: PersonalDataFilter.IPersonalDataFilterConfig) => PersonalDataFilter.IPersonalDataFilter; | ||
export const newFilter: (cfg?: PersonalDataFilter.IPersonalDataFilterConfig) => PersonalDataFilter.IPersonalDataFilter; | ||
} |
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
Oops, something went wrong.