@quba/sensitive-data-protection 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +181 -108
- package/dist/index.d.cts +236 -112
- package/dist/index.d.mts +236 -112
- package/dist/index.mjs +176 -109
- package/docs/AllowRule.md +39 -0
- package/docs/DetectRule.md +2 -0
- package/docs/EncryptRule.md +2 -0
- package/docs/EntityBody.md +2 -0
- package/docs/FieldErrorCode.md +1 -1
- package/docs/FileModelResult.md +2 -0
- package/docs/FileRegexResult.md +2 -0
- package/docs/FileResult.md +2 -0
- package/docs/HMACRule.md +2 -0
- package/docs/MaskRule.md +2 -0
- package/docs/ModelEntity.md +2 -0
- package/docs/PolicyDocumentRulesInner.md +2 -0
- package/docs/PseudonymizeRule.md +2 -0
- package/docs/RedactRule.md +2 -0
- package/docs/ReplaceRule.md +2 -0
- package/docs/RuleBody.md +2 -0
- package/docs/SHA256Rule.md +2 -0
- package/docs/SHA512Rule.md +2 -0
- package/package.json +1 -1
package/docs/FileResult.md
CHANGED
|
@@ -15,6 +15,7 @@ Name | Type
|
|
|
15
15
|
`input` | string
|
|
16
16
|
`output` | string
|
|
17
17
|
`path` | Array<Array<PathSegment>>
|
|
18
|
+
`action` | [Action](Action.md)
|
|
18
19
|
`content_type` | string
|
|
19
20
|
|
|
20
21
|
## Example
|
|
@@ -32,6 +33,7 @@ const example = {
|
|
|
32
33
|
"input": null,
|
|
33
34
|
"output": null,
|
|
34
35
|
"path": null,
|
|
36
|
+
"action": null,
|
|
35
37
|
"content_type": null,
|
|
36
38
|
} satisfies FileResult
|
|
37
39
|
|
package/docs/HMACRule.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
`key` | string
|
|
14
15
|
`length` | number
|
|
15
16
|
|
|
@@ -23,6 +24,7 @@ const example = {
|
|
|
23
24
|
"type": null,
|
|
24
25
|
"entities": null,
|
|
25
26
|
"action": null,
|
|
27
|
+
"when": null,
|
|
26
28
|
"key": null,
|
|
27
29
|
"length": null,
|
|
28
30
|
} satisfies HMACRule
|
package/docs/MaskRule.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
`masking_char` | string
|
|
14
15
|
`chars_to_mask` | number
|
|
15
16
|
`from_end` | boolean
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"type": null,
|
|
25
26
|
"entities": null,
|
|
26
27
|
"action": null,
|
|
28
|
+
"when": null,
|
|
27
29
|
"masking_char": null,
|
|
28
30
|
"chars_to_mask": null,
|
|
29
31
|
"from_end": null,
|
package/docs/ModelEntity.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`type` | string
|
|
11
11
|
`value` | string
|
|
12
|
+
`threshold` | number
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -19,6 +20,7 @@ import type { ModelEntity } from '@quba/sensitive-data-protection'
|
|
|
19
20
|
const example = {
|
|
20
21
|
"type": null,
|
|
21
22
|
"value": null,
|
|
23
|
+
"threshold": null,
|
|
22
24
|
} satisfies ModelEntity
|
|
23
25
|
|
|
24
26
|
console.log(example)
|
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`type` | string
|
|
10
10
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
11
11
|
`action` | [Action](Action.md)
|
|
12
|
+
`when` | string
|
|
12
13
|
`replacement` | string
|
|
13
14
|
`masking_char` | string
|
|
14
15
|
`chars_to_mask` | number
|
|
@@ -27,6 +28,7 @@ const example = {
|
|
|
27
28
|
"type": null,
|
|
28
29
|
"entities": null,
|
|
29
30
|
"action": null,
|
|
31
|
+
"when": null,
|
|
30
32
|
"replacement": null,
|
|
31
33
|
"masking_char": null,
|
|
32
34
|
"chars_to_mask": null,
|
package/docs/PseudonymizeRule.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
`tag` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"type": null,
|
|
23
24
|
"entities": null,
|
|
24
25
|
"action": null,
|
|
26
|
+
"when": null,
|
|
25
27
|
"tag": null,
|
|
26
28
|
} satisfies PseudonymizeRule
|
|
27
29
|
|
package/docs/RedactRule.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -21,6 +22,7 @@ const example = {
|
|
|
21
22
|
"type": null,
|
|
22
23
|
"entities": null,
|
|
23
24
|
"action": null,
|
|
25
|
+
"when": null,
|
|
24
26
|
} satisfies RedactRule
|
|
25
27
|
|
|
26
28
|
console.log(example)
|
package/docs/ReplaceRule.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
`replacement` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"type": null,
|
|
23
24
|
"entities": null,
|
|
24
25
|
"action": null,
|
|
26
|
+
"when": null,
|
|
25
27
|
"replacement": null,
|
|
26
28
|
} satisfies ReplaceRule
|
|
27
29
|
|
package/docs/RuleBody.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
`replacement` | string
|
|
14
15
|
`key` | string
|
|
15
16
|
`masking_char` | string
|
|
@@ -28,6 +29,7 @@ const example = {
|
|
|
28
29
|
"type": null,
|
|
29
30
|
"entities": null,
|
|
30
31
|
"action": null,
|
|
32
|
+
"when": null,
|
|
31
33
|
"replacement": null,
|
|
32
34
|
"key": null,
|
|
33
35
|
"masking_char": null,
|
package/docs/SHA256Rule.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -21,6 +22,7 @@ const example = {
|
|
|
21
22
|
"type": null,
|
|
22
23
|
"entities": null,
|
|
23
24
|
"action": null,
|
|
25
|
+
"when": null,
|
|
24
26
|
} satisfies SHA256Rule
|
|
25
27
|
|
|
26
28
|
console.log(example)
|
package/docs/SHA512Rule.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`type` | string
|
|
11
11
|
`entities` | [Array<EntityBody>](EntityBody.md)
|
|
12
12
|
`action` | [Action](Action.md)
|
|
13
|
+
`when` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -21,6 +22,7 @@ const example = {
|
|
|
21
22
|
"type": null,
|
|
22
23
|
"entities": null,
|
|
23
24
|
"action": null,
|
|
25
|
+
"when": null,
|
|
24
26
|
} satisfies SHA512Rule
|
|
25
27
|
|
|
26
28
|
console.log(example)
|