@quba/sensitive-data-protection 0.1.0 → 0.2.2

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 (78) hide show
  1. package/README.md +58 -6
  2. package/dist/index.cjs +2884 -569
  3. package/dist/index.d.cts +3059 -765
  4. package/dist/index.d.mts +3059 -765
  5. package/dist/index.mjs +2574 -535
  6. package/docs/Action.md +33 -0
  7. package/docs/AnonymizeFileResponseBody.md +43 -0
  8. package/docs/AnonymizeRequestBody.md +4 -2
  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/ModelError.md +2 -3
  46. package/docs/ModelResult.md +2 -0
  47. package/docs/ModelStatus.md +45 -0
  48. package/docs/{Entities.md → ModelType.md} +5 -4
  49. package/docs/ParagraphKind.md +33 -0
  50. package/docs/ParagraphSegment.md +39 -0
  51. package/docs/PartSegment.md +39 -0
  52. package/docs/PathSegment.md +79 -0
  53. package/docs/PolicyDocumentRulesInner.md +7 -1
  54. package/docs/{ValidationError.md → PropertySegment.md} +7 -12
  55. package/docs/PseudonymizeRule.md +41 -0
  56. package/docs/RangeKind.md +33 -0
  57. package/docs/RangeSegment.md +39 -0
  58. package/docs/RedactRule.md +3 -1
  59. package/docs/Refusal.md +36 -0
  60. package/docs/RegexResult.md +2 -0
  61. package/docs/RegionSegment.md +43 -0
  62. package/docs/ReplaceRule.md +3 -1
  63. package/docs/{AnonymizeRequestBodyRulesInner.md → RuleBody.md} +12 -5
  64. package/docs/SHA256Rule.md +3 -1
  65. package/docs/SHA512Rule.md +3 -1
  66. package/docs/ScanRequestBody.md +2 -0
  67. package/docs/ScanResponseBody.md +2 -0
  68. package/docs/SegmentSegment.md +39 -0
  69. package/docs/SensitiveDataProtectionApi.md +160 -3
  70. package/docs/ShapeKind.md +33 -0
  71. package/docs/ShapeSegment.md +41 -0
  72. package/docs/SheetSegment.md +39 -0
  73. package/docs/SlideSegment.md +41 -0
  74. package/docs/SpeakerNotesSegment.md +41 -0
  75. package/docs/TableSegment.md +37 -0
  76. package/docs/TagSegment.md +41 -0
  77. package/docs/TextSegment.md +39 -0
  78. package/package.json +1 -1
package/docs/Action.md ADDED
@@ -0,0 +1,33 @@
1
+
2
+ # Action
3
+
4
+ What the browser extension does with a match, before the text is sent. `warn`: highlighted; the user may send it as it is. `enforce`: replaced with the rule\'s transformation before sending; sending is blocked when it can\'t be.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { Action } from '@quba/sensitive-data-protection'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies Action
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 Action
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,43 @@
1
+
2
+ # AnonymizeFileResponseBody
3
+
4
+ Response from the document endpoint: the anonymized file and what changed in it.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `usage` | [Usage](Usage.md)
11
+ `models` | Array<string>
12
+ `format` | string
13
+ `results` | [Array<FileResult>](FileResult.md)
14
+ `file` | string
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { AnonymizeFileResponseBody } from '@quba/sensitive-data-protection'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "usage": null,
24
+ "models": null,
25
+ "format": null,
26
+ "results": null,
27
+ "file": null,
28
+ } satisfies AnonymizeFileResponseBody
29
+
30
+ console.log(example)
31
+
32
+ // Convert the instance to a JSON string
33
+ const exampleJSON: string = JSON.stringify(example)
34
+ console.log(exampleJSON)
35
+
36
+ // Parse the JSON string back to an object
37
+ const exampleParsed = JSON.parse(exampleJSON) as AnonymizeFileResponseBody
38
+ console.log(exampleParsed)
39
+ ```
40
+
41
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
42
+
43
+
@@ -1,15 +1,16 @@
1
1
 
2
2
  # AnonymizeRequestBody
3
3
 
4
- Request body for the anonymize endpoint. Carries the text to anonymize and the list of de-identification rules to apply. See ``AnonymizationCommand`` for field-level details.
4
+ Request body for the anonymize endpoint. Carries the text to anonymize and the list of de-identification rules to apply.
5
5
 
6
6
  ## Properties
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
10
  `text` | string
11
- `rules` | [Array<AnonymizeRequestBodyRulesInner>](AnonymizeRequestBodyRulesInner.md)
11
+ `rules` | [Array<RuleBody>](RuleBody.md)
12
12
  `confidence_threshold` | number
13
+ `models` | Array<string>
13
14
 
14
15
  ## Example
15
16
 
@@ -21,6 +22,7 @@ const example = {
21
22
  "text": null,
22
23
  "rules": null,
23
24
  "confidence_threshold": null,
25
+ "models": null,
24
26
  } satisfies AnonymizeRequestBody
25
27
 
26
28
  console.log(example)
@@ -8,8 +8,9 @@ Response from the anonymize endpoint: the anonymized text and a record of every
8
8
  Name | Type
9
9
  ------------ | -------------
10
10
  `text` | string
11
- `results` | [Array<AnonymizeResponseBodyResultsInner>](AnonymizeResponseBodyResultsInner.md)
11
+ `results` | [Array<Applied>](Applied.md)
12
12
  `usage` | [Usage](Usage.md)
13
+ `models` | Array<string>
13
14
 
14
15
  ## Example
15
16
 
@@ -21,6 +22,7 @@ const example = {
21
22
  "text": null,
22
23
  "results": null,
23
24
  "usage": null,
25
+ "models": null,
24
26
  } satisfies AnonymizeResponseBody
25
27
 
26
28
  console.log(example)
@@ -1,6 +1,7 @@
1
1
 
2
- # AnonymizeResponseBodySpansInner
2
+ # Applied
3
3
 
4
+ One rewrite, from a model detection or a regex match.
4
5
 
5
6
  ## Properties
6
7
 
@@ -12,11 +13,12 @@ Name | Type
12
13
  `input` | [TextRange](TextRange.md)
13
14
  `output` | [TextRange](TextRange.md)
14
15
  `score` | number
16
+ `action` | [Action](Action.md)
15
17
 
16
18
  ## Example
17
19
 
18
20
  ```typescript
19
- import type { AnonymizeResponseBodySpansInner } from '@quba/sensitive-data-protection'
21
+ import type { Applied } from '@quba/sensitive-data-protection'
20
22
 
21
23
  // TODO: Update the object below with actual values
22
24
  const example = {
@@ -26,7 +28,8 @@ const example = {
26
28
  "input": null,
27
29
  "output": null,
28
30
  "score": null,
29
- } satisfies AnonymizeResponseBodySpansInner
31
+ "action": null,
32
+ } satisfies Applied
30
33
 
31
34
  console.log(example)
32
35
 
@@ -35,7 +38,7 @@ const exampleJSON: string = JSON.stringify(example)
35
38
  console.log(exampleJSON)
36
39
 
37
40
  // Parse the JSON string back to an object
38
- const exampleParsed = JSON.parse(exampleJSON) as AnonymizeResponseBodySpansInner
41
+ const exampleParsed = JSON.parse(exampleJSON) as Applied
39
42
  console.log(exampleParsed)
40
43
  ```
41
44
 
package/docs/At.md ADDED
@@ -0,0 +1,37 @@
1
+
2
+ # At
3
+
4
+ How far reading has got: the last unit of a batch.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `path` | [Array<PathSegment>](PathSegment.md)
11
+ `text` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { At } from '@quba/sensitive-data-protection'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "path": null,
21
+ "text": null,
22
+ } satisfies At
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 At
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
+
@@ -0,0 +1,37 @@
1
+
2
+ # AttributeSegment
3
+
4
+ An XML or HTML attribute of the element before it.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `name` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { AttributeSegment } 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 AttributeSegment
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 AttributeSegment
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
+
@@ -1,6 +1,7 @@
1
1
 
2
- # ValidationErrorLocInner
2
+ # CellKind
3
3
 
4
+ What a cell\'s text is when it is not its value.
4
5
 
5
6
  ## Properties
6
7
 
@@ -10,11 +11,11 @@ Name | Type
10
11
  ## Example
11
12
 
12
13
  ```typescript
13
- import type { ValidationErrorLocInner } from '@quba/sensitive-data-protection'
14
+ import type { CellKind } from '@quba/sensitive-data-protection'
14
15
 
15
16
  // TODO: Update the object below with actual values
16
17
  const example = {
17
- } satisfies ValidationErrorLocInner
18
+ } satisfies CellKind
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 ValidationErrorLocInner
27
+ const exampleParsed = JSON.parse(exampleJSON) as CellKind
27
28
  console.log(exampleParsed)
28
29
  ```
29
30
 
@@ -0,0 +1,35 @@
1
+
2
+ # CellNoteSegment
3
+
4
+ A workbook note on a cell (Excel\'s \"Note\", a legacy comment); it follows its cell.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { CellNoteSegment } from '@quba/sensitive-data-protection'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "type": null,
20
+ } satisfies CellNoteSegment
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 CellNoteSegment
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
+
@@ -0,0 +1,43 @@
1
+
2
+ # CellSegment
3
+
4
+ A cell, from 1, in the data\'s order (a CSV\'s header line is row 1); `ref` in A1. No `kind` for its value.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `row` | number
12
+ `column` | number
13
+ `ref` | string
14
+ `kind` | [CellKind](CellKind.md)
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { CellSegment } from '@quba/sensitive-data-protection'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "type": null,
24
+ "row": null,
25
+ "column": null,
26
+ "ref": null,
27
+ "kind": null,
28
+ } satisfies CellSegment
29
+
30
+ console.log(example)
31
+
32
+ // Convert the instance to a JSON string
33
+ const exampleJSON: string = JSON.stringify(example)
34
+ console.log(exampleJSON)
35
+
36
+ // Parse the JSON string back to an object
37
+ const exampleParsed = JSON.parse(exampleJSON) as CellSegment
38
+ console.log(exampleParsed)
39
+ ```
40
+
41
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
42
+
43
+
@@ -0,0 +1,33 @@
1
+
2
+ # CommentKind
3
+
4
+ Its author\'s name or initials.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { CommentKind } from '@quba/sensitive-data-protection'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies CommentKind
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 CommentKind
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
+ # CommentSegment
3
+
4
+ A comment (Word `w:comment`, PowerPoint `p:cm`, Excel threaded comment), by its id in the file. In a workbook it follows its cell.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `id` | string
12
+ `kind` | [CommentKind](CommentKind.md)
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { CommentSegment } from '@quba/sensitive-data-protection'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "type": null,
22
+ "id": null,
23
+ "kind": null,
24
+ } satisfies CommentSegment
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 CommentSegment
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
+ # ComponentSegment
3
+
4
+ An HL7 v2 component of the field before it: `1` in `PID-5.1`.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `number` | number
12
+ `subcomponent` | number
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { ComponentSegment } 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
+ "subcomponent": null,
24
+ } satisfies ComponentSegment
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 ComponentSegment
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
+
@@ -8,7 +8,8 @@ Report each matched value without changing it. The match is recorded in the res
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
 
13
14
  ## Example
14
15
 
@@ -19,6 +20,7 @@ import type { DetectRule } from '@quba/sensitive-data-protection'
19
20
  const example = {
20
21
  "type": null,
21
22
  "entities": null,
23
+ "action": null,
22
24
  } satisfies DetectRule
23
25
 
24
26
  console.log(example)
@@ -0,0 +1,39 @@
1
+
2
+ # ElementSegment
3
+
4
+ An XML or HTML element, by its local name (no namespace prefix): a step towards a value, as in a path of element names.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `type` | string
11
+ `name` | string
12
+ `index` | number
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { ElementSegment } from '@quba/sensitive-data-protection'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "type": null,
22
+ "name": null,
23
+ "index": null,
24
+ } satisfies ElementSegment
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 ElementSegment
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
+
@@ -8,7 +8,8 @@ Replace each matched value with a Fernet-encrypted token. If no key is supplied
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
  `key` | string
13
14
 
14
15
  ## Example
@@ -20,6 +21,7 @@ import type { EncryptRule } from '@quba/sensitive-data-protection'
20
21
  const example = {
21
22
  "type": null,
22
23
  "entities": null,
24
+ "action": null,
23
25
  "key": null,
24
26
  } satisfies EncryptRule
25
27
 
@@ -1,24 +1,25 @@
1
1
 
2
- # DetectRuleEntitiesInner
2
+ # EndnoteSegment
3
3
 
4
+ An endnote (`w:endnote`), by its id.
4
5
 
5
6
  ## Properties
6
7
 
7
8
  Name | Type
8
9
  ------------ | -------------
9
10
  `type` | string
10
- `value` | string
11
+ `id` | string
11
12
 
12
13
  ## Example
13
14
 
14
15
  ```typescript
15
- import type { DetectRuleEntitiesInner } from '@quba/sensitive-data-protection'
16
+ import type { EndnoteSegment } from '@quba/sensitive-data-protection'
16
17
 
17
18
  // TODO: Update the object below with actual values
18
19
  const example = {
19
20
  "type": null,
20
- "value": null,
21
- } satisfies DetectRuleEntitiesInner
21
+ "id": null,
22
+ } satisfies EndnoteSegment
22
23
 
23
24
  console.log(example)
24
25
 
@@ -27,7 +28,7 @@ const exampleJSON: string = JSON.stringify(example)
27
28
  console.log(exampleJSON)
28
29
 
29
30
  // Parse the JSON string back to an object
30
- const exampleParsed = JSON.parse(exampleJSON) as DetectRuleEntitiesInner
31
+ const exampleParsed = JSON.parse(exampleJSON) as EndnoteSegment
31
32
  console.log(exampleParsed)
32
33
  ```
33
34
 
@@ -1,6 +1,7 @@
1
1
 
2
- # EntitiesAnyOfInner
2
+ # EntityBody
3
3
 
4
+ An entity to target, chosen by its `type`.
4
5
 
5
6
  ## Properties
6
7
 
@@ -12,13 +13,13 @@ Name | Type
12
13
  ## Example
13
14
 
14
15
  ```typescript
15
- import type { EntitiesAnyOfInner } from '@quba/sensitive-data-protection'
16
+ import type { EntityBody } from '@quba/sensitive-data-protection'
16
17
 
17
18
  // TODO: Update the object below with actual values
18
19
  const example = {
19
20
  "type": null,
20
21
  "value": null,
21
- } satisfies EntitiesAnyOfInner
22
+ } satisfies EntityBody
22
23
 
23
24
  console.log(example)
24
25
 
@@ -27,7 +28,7 @@ const exampleJSON: string = JSON.stringify(example)
27
28
  console.log(exampleJSON)
28
29
 
29
30
  // Parse the JSON string back to an object
30
- const exampleParsed = JSON.parse(exampleJSON) as EntitiesAnyOfInner
31
+ const exampleParsed = JSON.parse(exampleJSON) as EntityBody
31
32
  console.log(exampleParsed)
32
33
  ```
33
34
 
@@ -0,0 +1,33 @@
1
+
2
+ # ErrorCode
3
+
4
+ What went wrong, for callers to branch on. `invalid_json` (400): the body is not JSON. `invalid_request` (422): some fields are invalid, `details` says which. `unauthorized` (401), `not_found` (404), `method_not_allowed` (405). `internal` (500): the request failed; retrying may help. `unavailable` (503): the model is not loaded. `forbidden` (403): the caller\'s assigned policy sets the rules or threshold. `policy_unreadable` (409): that policy cannot be read.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { ErrorCode } from '@quba/sensitive-data-protection'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ } satisfies ErrorCode
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 ErrorCode
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
+ # ErrorInfo
3
+
4
+ The error itself.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `code` | [ErrorCode](ErrorCode.md)
11
+ `message` | string
12
+ `details` | [Array<FieldError>](FieldError.md)
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { ErrorInfo } from '@quba/sensitive-data-protection'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "code": null,
22
+ "message": null,
23
+ "details": null,
24
+ } satisfies ErrorInfo
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 ErrorInfo
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
+