@quba/sensitive-data-protection 0.0.12 → 0.2.0

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.
Files changed (80) hide show
  1. package/README.md +59 -6
  2. package/dist/index.cjs +2908 -560
  3. package/dist/index.d.cts +3092 -764
  4. package/dist/index.d.mts +3092 -764
  5. package/dist/index.mjs +2593 -526
  6. package/docs/Action.md +33 -0
  7. package/docs/AnonymizeFileResponseBody.md +43 -0
  8. package/docs/AnonymizeRequestBody.md +4 -4
  9. package/docs/AnonymizeResponseBody.md +3 -1
  10. package/docs/{AnonymizeResponseBodySpansInner.md → Applied.md} +7 -4
  11. package/docs/At.md +37 -0
  12. package/docs/AttributeSegment.md +37 -0
  13. package/docs/{ValidationErrorLocInner.md → CellKind.md} +5 -4
  14. package/docs/CellNoteSegment.md +35 -0
  15. package/docs/CellSegment.md +43 -0
  16. package/docs/CommentKind.md +33 -0
  17. package/docs/CommentSegment.md +39 -0
  18. package/docs/ComponentSegment.md +39 -0
  19. package/docs/DetectRule.md +3 -1
  20. package/docs/ElementSegment.md +39 -0
  21. package/docs/EncryptRule.md +3 -1
  22. package/docs/{DetectRuleEntitiesInner.md → EndnoteSegment.md} +7 -6
  23. package/docs/{EntitiesAnyOfInner.md → EntityBody.md} +5 -4
  24. package/docs/ErrorCode.md +33 -0
  25. package/docs/ErrorInfo.md +39 -0
  26. package/docs/FieldError.md +51 -0
  27. package/docs/FieldErrorCode.md +33 -0
  28. package/docs/{HTTPValidationError.md → FieldErrorPathInner.md} +5 -6
  29. package/docs/FieldSegment.md +39 -0
  30. package/docs/FileAttributeResult.md +47 -0
  31. package/docs/FileEmbeddedResult.md +43 -0
  32. package/docs/FileModelResult.md +49 -0
  33. package/docs/{AnonymizeResponseBodyResultsInner.md → FileRegexResult.md} +11 -8
  34. package/docs/FileResult.md +51 -0
  35. package/docs/FootnoteSegment.md +37 -0
  36. package/docs/FrameSegment.md +37 -0
  37. package/docs/HMACRule.md +43 -0
  38. package/docs/HeaderFooterSegment.md +37 -0
  39. package/docs/IndexSegment.md +37 -0
  40. package/docs/ItemSegment.md +37 -0
  41. package/docs/KeySegment.md +37 -0
  42. package/docs/Kind.md +33 -0
  43. package/docs/LineSegment.md +39 -0
  44. package/docs/MaskRule.md +3 -1
  45. package/docs/ModelEntity.md +1 -1
  46. package/docs/ModelError.md +35 -0
  47. package/docs/ModelResult.md +3 -1
  48. package/docs/ModelStatus.md +45 -0
  49. package/docs/{Entities.md → ModelType.md} +5 -4
  50. package/docs/ParagraphKind.md +33 -0
  51. package/docs/ParagraphSegment.md +39 -0
  52. package/docs/PartSegment.md +39 -0
  53. package/docs/PathSegment.md +79 -0
  54. package/docs/PoliciesApi.md +10 -1
  55. package/docs/PolicyDocumentRulesInner.md +7 -1
  56. package/docs/{ValidationError.md → PropertySegment.md} +7 -12
  57. package/docs/PseudonymizeRule.md +41 -0
  58. package/docs/RangeKind.md +33 -0
  59. package/docs/RangeSegment.md +39 -0
  60. package/docs/RedactRule.md +3 -1
  61. package/docs/Refusal.md +36 -0
  62. package/docs/RegexResult.md +2 -0
  63. package/docs/RegionSegment.md +43 -0
  64. package/docs/ReplaceRule.md +3 -1
  65. package/docs/{AnonymizeRequestBodyRulesInner.md → RuleBody.md} +12 -5
  66. package/docs/SHA256Rule.md +3 -1
  67. package/docs/SHA512Rule.md +3 -1
  68. package/docs/ScanRequestBody.md +2 -0
  69. package/docs/ScanResponseBody.md +2 -0
  70. package/docs/SegmentSegment.md +39 -0
  71. package/docs/SensitiveDataProtectionApi.md +172 -4
  72. package/docs/ShapeKind.md +33 -0
  73. package/docs/ShapeSegment.md +41 -0
  74. package/docs/SheetSegment.md +39 -0
  75. package/docs/SlideSegment.md +41 -0
  76. package/docs/SpeakerNotesSegment.md +41 -0
  77. package/docs/TableSegment.md +37 -0
  78. package/docs/TagSegment.md +41 -0
  79. package/docs/TextSegment.md +39 -0
  80. package/package.json +1 -1
@@ -0,0 +1,37 @@
1
+
2
+ # KeySegment
3
+
4
+ A JSON object\'s key: a step towards a value, as in a JSON Pointer.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `name` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { KeySegment } from '@quba/sensitive-data-protection'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "type": null,
21
+ "name": null,
22
+ } satisfies KeySegment
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as KeySegment
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
package/docs/Kind.md ADDED
@@ -0,0 +1,33 @@
1
+
2
+ # Kind
3
+
4
+ What the text is in an Office file, named after its ECMA-376 element or property.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { Kind } from '@quba/sensitive-data-protection'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies Kind
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as Kind
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+
@@ -0,0 +1,39 @@
1
+
2
+ # LineSegment
3
+
4
+ Where a value starts in a text file, from 1, as an editor shows it; in an image, the line read (in reading order) and the character in it.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `line` | number
12
+ `column` | number
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { LineSegment } from '@quba/sensitive-data-protection'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "type": null,
22
+ "line": null,
23
+ "column": null,
24
+ } satisfies LineSegment
25
+
26
+ console.log(example)
27
+
28
+ // Convert the instance to a JSON string
29
+ const exampleJSON: string = JSON.stringify(example)
30
+ console.log(exampleJSON)
31
+
32
+ // Parse the JSON string back to an object
33
+ const exampleParsed = JSON.parse(exampleJSON) as LineSegment
34
+ console.log(exampleParsed)
35
+ ```
36
+
37
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
+
39
+
package/docs/MaskRule.md CHANGED
@@ -8,7 +8,8 @@ Mask part of each matched value with a repeated character. By default the whole
8
8
  Name | Type
9
9
  ------------ | -------------
10
10
  `type` | string
11
- `entities` | [Array<DetectRuleEntitiesInner>](DetectRuleEntitiesInner.md)
11
+ `entities` | [Array<EntityBody>](EntityBody.md)
12
+ `action` | [Action](Action.md)
12
13
  `masking_char` | string
13
14
  `chars_to_mask` | number
14
15
  `from_end` | boolean
@@ -22,6 +23,7 @@ import type { MaskRule } from '@quba/sensitive-data-protection'
22
23
  const example = {
23
24
  "type": null,
24
25
  "entities": null,
26
+ "action": null,
25
27
  "masking_char": null,
26
28
  "chars_to_mask": null,
27
29
  "from_end": null,
@@ -1,7 +1,7 @@
1
1
 
2
2
  # ModelEntity
3
3
 
4
- An AI-model entity type to target, e.g. \'PERSON\', \'EMAIL\', \'LOCATION\'.
4
+ An AI-model entity type to target, e.g. \'person\', \'email\', \'phone_number\'.
5
5
 
6
6
  ## Properties
7
7
 
@@ -0,0 +1,35 @@
1
+
2
+ # ModelError
3
+
4
+ Every error response\'s body.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `error` | [ErrorInfo](ErrorInfo.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { ModelError } from '@quba/sensitive-data-protection'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "error": null,
20
+ } satisfies ModelError
21
+
22
+ console.log(example)
23
+
24
+ // Convert the instance to a JSON string
25
+ const exampleJSON: string = JSON.stringify(example)
26
+ console.log(exampleJSON)
27
+
28
+ // Parse the JSON string back to an object
29
+ const exampleParsed = JSON.parse(exampleJSON) as ModelError
30
+ console.log(exampleParsed)
31
+ ```
32
+
33
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
34
+
35
+
@@ -1,7 +1,7 @@
1
1
 
2
2
  # ModelResult
3
3
 
4
- Record of an AI model detection and its anonymization. Created when an AI model identifies an entity (e.g. PERSON, EMAIL) and a rule anonymizes the matched text.
4
+ Record of an AI model detection and its anonymization. Created when an AI model identifies an entity (e.g. person, email) and a rule anonymizes the matched text.
5
5
 
6
6
  ## Properties
7
7
 
@@ -13,6 +13,7 @@ Name | Type
13
13
  `input` | [TextRange](TextRange.md)
14
14
  `output` | [TextRange](TextRange.md)
15
15
  `score` | number
16
+ `action` | [Action](Action.md)
16
17
 
17
18
  ## Example
18
19
 
@@ -27,6 +28,7 @@ const example = {
27
28
  "input": null,
28
29
  "output": null,
29
30
  "score": null,
31
+ "action": null,
30
32
  } satisfies ModelResult
31
33
 
32
34
  console.log(example)
@@ -0,0 +1,45 @@
1
+
2
+ # ModelStatus
3
+
4
+ One model the server offers.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `id` | string
11
+ `type` | [ModelType](ModelType.md)
12
+ `_default` | boolean
13
+ `ready` | boolean
14
+ `description` | string
15
+ `error` | string
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { ModelStatus } from '@quba/sensitive-data-protection'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "id": null,
25
+ "type": null,
26
+ "_default": null,
27
+ "ready": null,
28
+ "description": null,
29
+ "error": null,
30
+ } satisfies ModelStatus
31
+
32
+ console.log(example)
33
+
34
+ // Convert the instance to a JSON string
35
+ const exampleJSON: string = JSON.stringify(example)
36
+ console.log(exampleJSON)
37
+
38
+ // Parse the JSON string back to an object
39
+ const exampleParsed = JSON.parse(exampleJSON) as ModelStatus
40
+ console.log(exampleParsed)
41
+ ```
42
+
43
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
44
+
45
+
@@ -1,6 +1,7 @@
1
1
 
2
- # Entities
2
+ # ModelType
3
3
 
4
+ What a model reads.
4
5
 
5
6
  ## Properties
6
7
 
@@ -10,11 +11,11 @@ Name | Type
10
11
  ## Example
11
12
 
12
13
  ```typescript
13
- import type { Entities } from '@quba/sensitive-data-protection'
14
+ import type { ModelType } from '@quba/sensitive-data-protection'
14
15
 
15
16
  // TODO: Update the object below with actual values
16
17
  const example = {
17
- } satisfies Entities
18
+ } satisfies ModelType
18
19
 
19
20
  console.log(example)
20
21
 
@@ -23,7 +24,7 @@ const exampleJSON: string = JSON.stringify(example)
23
24
  console.log(exampleJSON)
24
25
 
25
26
  // Parse the JSON string back to an object
26
- const exampleParsed = JSON.parse(exampleJSON) as Entities
27
+ const exampleParsed = JSON.parse(exampleJSON) as ModelType
27
28
  console.log(exampleParsed)
28
29
  ```
29
30
 
@@ -0,0 +1,33 @@
1
+
2
+ # ParagraphKind
3
+
4
+ What a paragraph\'s text is when it is not its own text.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { ParagraphKind } from '@quba/sensitive-data-protection'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies ParagraphKind
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as ParagraphKind
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+
@@ -0,0 +1,39 @@
1
+
2
+ # ParagraphSegment
3
+
4
+ A paragraph (`w:p`, `a:p`), numbered from 1 in what holds it (the part, a shape, a cell, a comment, a footnote). No `kind` for its own text.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `number` | number
12
+ `kind` | [ParagraphKind](ParagraphKind.md)
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { ParagraphSegment } from '@quba/sensitive-data-protection'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "type": null,
22
+ "number": null,
23
+ "kind": null,
24
+ } satisfies ParagraphSegment
25
+
26
+ console.log(example)
27
+
28
+ // Convert the instance to a JSON string
29
+ const exampleJSON: string = JSON.stringify(example)
30
+ console.log(exampleJSON)
31
+
32
+ // Parse the JSON string back to an object
33
+ const exampleParsed = JSON.parse(exampleJSON) as ParagraphSegment
34
+ console.log(exampleParsed)
35
+ ```
36
+
37
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
+
39
+
@@ -0,0 +1,39 @@
1
+
2
+ # PartSegment
3
+
4
+ Any other file in an Office zip, e.g. `word/document.xml`, `docProps/core.xml`. `kind` until finer segments (paragraphs, properties) say where its text is.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `part` | string
12
+ `kind` | [Kind](Kind.md)
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { PartSegment } from '@quba/sensitive-data-protection'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "type": null,
22
+ "part": null,
23
+ "kind": null,
24
+ } satisfies PartSegment
25
+
26
+ console.log(example)
27
+
28
+ // Convert the instance to a JSON string
29
+ const exampleJSON: string = JSON.stringify(example)
30
+ console.log(exampleJSON)
31
+
32
+ // Parse the JSON string back to an object
33
+ const exampleParsed = JSON.parse(exampleJSON) as PartSegment
34
+ console.log(exampleParsed)
35
+ ```
36
+
37
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
+
39
+
@@ -0,0 +1,79 @@
1
+
2
+ # PathSegment
3
+
4
+ One step of where a result is, outermost first: a container (a worksheet, a slide, another file in an Office zip), the shapes it is in, where the text is, then `text`: the characters found there, before and after. `kind`, on the segment before `text` only, says what the text is there. Paths grow: later versions add segment types inside these (paragraphs, tables, comments, properties), so the same text may get a longer path. Read `text` and `kind` from the end and find segments by `type`; do not compare whole paths.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `name` | string
12
+ `part` | string
13
+ `number` | number
14
+ `kind` | [RangeKind](RangeKind.md)
15
+ `slide` | number
16
+ `id` | string
17
+ `row` | number
18
+ `column` | number
19
+ `ref` | string
20
+ `line` | number
21
+ `x` | number
22
+ `y` | number
23
+ `w` | number
24
+ `h` | number
25
+ `group` | string
26
+ `element` | string
27
+ `keyword` | string
28
+ `index` | number
29
+ `repetition` | number
30
+ `subcomponent` | number
31
+ `input` | [TextRange](TextRange.md)
32
+ `output` | [TextRange](TextRange.md)
33
+
34
+ ## Example
35
+
36
+ ```typescript
37
+ import type { PathSegment } from '@quba/sensitive-data-protection'
38
+
39
+ // TODO: Update the object below with actual values
40
+ const example = {
41
+ "type": null,
42
+ "name": null,
43
+ "part": null,
44
+ "number": null,
45
+ "kind": null,
46
+ "slide": null,
47
+ "id": null,
48
+ "row": null,
49
+ "column": null,
50
+ "ref": null,
51
+ "line": null,
52
+ "x": null,
53
+ "y": null,
54
+ "w": null,
55
+ "h": null,
56
+ "group": null,
57
+ "element": null,
58
+ "keyword": null,
59
+ "index": null,
60
+ "repetition": null,
61
+ "subcomponent": null,
62
+ "input": null,
63
+ "output": null,
64
+ } satisfies PathSegment
65
+
66
+ console.log(example)
67
+
68
+ // Convert the instance to a JSON string
69
+ const exampleJSON: string = JSON.stringify(example)
70
+ console.log(exampleJSON)
71
+
72
+ // Parse the JSON string back to an object
73
+ const exampleParsed = JSON.parse(exampleJSON) as PathSegment
74
+ console.log(exampleParsed)
75
+ ```
76
+
77
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
78
+
79
+
@@ -77,6 +77,8 @@ example().catch(console.error);
77
77
  | Status code | Description | Response headers |
78
78
  |-------------|-------------|------------------|
79
79
  | **201** | The created policy. | - |
80
+ | **401** | Missing or invalid API key. | - |
81
+ | **403** | The caller may not do this. API keys hold no role, so they cannot change policies. | - |
80
82
  | **409** | A policy with that name already exists. | - |
81
83
  | **422** | The document failed validation. | - |
82
84
 
@@ -141,14 +143,17 @@ example().catch(console.error);
141
143
  ### HTTP request headers
142
144
 
143
145
  - **Content-Type**: Not defined
144
- - **Accept**: Not defined
146
+ - **Accept**: `application/json`
145
147
 
146
148
 
147
149
  ### HTTP response details
148
150
  | Status code | Description | Response headers |
149
151
  |-------------|-------------|------------------|
150
152
  | **204** | Deleted. | - |
153
+ | **401** | Missing or invalid API key. | - |
154
+ | **403** | The caller may not do this. API keys hold no role, so they cannot change policies. | - |
151
155
  | **404** | No such policy in this organization. | - |
156
+ | **409** | Members or API keys are held to the policy. | - |
152
157
 
153
158
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
154
159
 
@@ -218,6 +223,7 @@ example().catch(console.error);
218
223
  | Status code | Description | Response headers |
219
224
  |-------------|-------------|------------------|
220
225
  | **200** | The policy and its latest document. | - |
226
+ | **401** | Missing or invalid API key. | - |
221
227
  | **404** | No such policy in this organization. | - |
222
228
 
223
229
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -280,6 +286,7 @@ This endpoint does not need any parameter.
280
286
  | Status code | Description | Response headers |
281
287
  |-------------|-------------|------------------|
282
288
  | **200** | The calling organization\'s policies. | - |
289
+ | **401** | Missing or invalid API key. | - |
283
290
 
284
291
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
285
292
 
@@ -352,6 +359,8 @@ example().catch(console.error);
352
359
  | Status code | Description | Response headers |
353
360
  |-------------|-------------|------------------|
354
361
  | **200** | The updated policy. | - |
362
+ | **401** | Missing or invalid API key. | - |
363
+ | **403** | The caller may not do this. API keys hold no role, so they cannot change policies. | - |
355
364
  | **404** | No such policy in this organization. | - |
356
365
  | **409** | A policy with that name already exists. | - |
357
366
  | **422** | The document failed validation. | - |
@@ -7,12 +7,15 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `type` | string
10
- `entities` | [Array<DetectRuleEntitiesInner>](DetectRuleEntitiesInner.md)
10
+ `entities` | [Array<EntityBody>](EntityBody.md)
11
+ `action` | [Action](Action.md)
11
12
  `replacement` | string
12
13
  `masking_char` | string
13
14
  `chars_to_mask` | number
14
15
  `from_end` | boolean
15
16
  `key` | string
17
+ `tag` | string
18
+ `length` | number
16
19
 
17
20
  ## Example
18
21
 
@@ -23,11 +26,14 @@ import type { PolicyDocumentRulesInner } from '@quba/sensitive-data-protection'
23
26
  const example = {
24
27
  "type": null,
25
28
  "entities": null,
29
+ "action": null,
26
30
  "replacement": null,
27
31
  "masking_char": null,
28
32
  "chars_to_mask": null,
29
33
  "from_end": null,
30
34
  "key": null,
35
+ "tag": null,
36
+ "length": null,
31
37
  } satisfies PolicyDocumentRulesInner
32
38
 
33
39
  console.log(example)
@@ -1,30 +1,25 @@
1
1
 
2
- # ValidationError
2
+ # PropertySegment
3
3
 
4
+ A document property: a core one by its element (`creator`, `title`, `lastModifiedBy`), an extended one likewise (`Company`, `Manager`), a custom one by its name.
4
5
 
5
6
  ## Properties
6
7
 
7
8
  Name | Type
8
9
  ------------ | -------------
9
- `loc` | [Array<ValidationErrorLocInner>](ValidationErrorLocInner.md)
10
- `msg` | string
11
10
  `type` | string
12
- `input` | any
13
- `ctx` | object
11
+ `name` | string
14
12
 
15
13
  ## Example
16
14
 
17
15
  ```typescript
18
- import type { ValidationError } from '@quba/sensitive-data-protection'
16
+ import type { PropertySegment } from '@quba/sensitive-data-protection'
19
17
 
20
18
  // TODO: Update the object below with actual values
21
19
  const example = {
22
- "loc": null,
23
- "msg": null,
24
20
  "type": null,
25
- "input": null,
26
- "ctx": null,
27
- } satisfies ValidationError
21
+ "name": null,
22
+ } satisfies PropertySegment
28
23
 
29
24
  console.log(example)
30
25
 
@@ -33,7 +28,7 @@ const exampleJSON: string = JSON.stringify(example)
33
28
  console.log(exampleJSON)
34
29
 
35
30
  // Parse the JSON string back to an object
36
- const exampleParsed = JSON.parse(exampleJSON) as ValidationError
31
+ const exampleParsed = JSON.parse(exampleJSON) as PropertySegment
37
32
  console.log(exampleParsed)
38
33
  ```
39
34
 
@@ -0,0 +1,41 @@
1
+
2
+ # PseudonymizeRule
3
+
4
+ Replace each matched value with its label and a number, e.g. \'[PERSON_1]\'. The same value gets the same tag throughout one request (or one file), a different value the next number. Each result pairs the tag with the value it stands for: the mapping to restore the values in a reply. It is not kept. Pseudonymize rules in one request number together: two rules tagging \'person\' never both give \'[PERSON_1]\'.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `entities` | [Array<EntityBody>](EntityBody.md)
12
+ `action` | [Action](Action.md)
13
+ `tag` | string
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { PseudonymizeRule } from '@quba/sensitive-data-protection'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "type": null,
23
+ "entities": null,
24
+ "action": null,
25
+ "tag": null,
26
+ } satisfies PseudonymizeRule
27
+
28
+ console.log(example)
29
+
30
+ // Convert the instance to a JSON string
31
+ const exampleJSON: string = JSON.stringify(example)
32
+ console.log(exampleJSON)
33
+
34
+ // Parse the JSON string back to an object
35
+ const exampleParsed = JSON.parse(exampleJSON) as PseudonymizeRule
36
+ console.log(exampleParsed)
37
+ ```
38
+
39
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
40
+
41
+
@@ -0,0 +1,33 @@
1
+
2
+ # RangeKind
3
+
4
+ A data validation\'s prompt, error message or list of values.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { RangeKind } from '@quba/sensitive-data-protection'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies RangeKind
19
+
20
+ console.log(example)
21
+
22
+ // Convert the instance to a JSON string
23
+ const exampleJSON: string = JSON.stringify(example)
24
+ console.log(exampleJSON)
25
+
26
+ // Parse the JSON string back to an object
27
+ const exampleParsed = JSON.parse(exampleJSON) as RangeKind
28
+ console.log(exampleParsed)
29
+ ```
30
+
31
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
32
+
33
+