@form-engine-ts/privacy 2.9.5 → 3.0.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.
package/README.md CHANGED
@@ -6,6 +6,9 @@ injectable, and findings are advisory so applications can choose confirm, block,
6
6
 
7
7
  Overlapping or contained findings with the same field and type are merged into one source range.
8
8
 
9
+ `SensitiveDataFinding` also supports optional `fieldTitle`, `typeLabel`, and `maskedText` values so a renderer can show a
10
+ localized, privacy-safe confirmation summary without exposing the original match.
11
+
9
12
  ```ts
10
13
  import { createStandardPrivacyDetector } from "@form-engine-ts/privacy";
11
14
 
package/dist/index.d.cts CHANGED
@@ -2,10 +2,13 @@ import { FormSchema } from '@form-engine-ts/core';
2
2
 
3
3
  interface SensitiveDataFinding {
4
4
  readonly fieldId: string;
5
+ readonly fieldTitle?: string;
5
6
  readonly type: "email" | "phone" | "url" | "postal_code" | string;
7
+ readonly typeLabel?: string;
6
8
  readonly start?: number;
7
9
  readonly end?: number;
8
10
  readonly matchedText?: string;
11
+ readonly maskedText?: string;
9
12
  }
10
13
  interface SensitiveDataDetectorRule {
11
14
  readonly type: string;
package/dist/index.d.ts CHANGED
@@ -2,10 +2,13 @@ import { FormSchema } from '@form-engine-ts/core';
2
2
 
3
3
  interface SensitiveDataFinding {
4
4
  readonly fieldId: string;
5
+ readonly fieldTitle?: string;
5
6
  readonly type: "email" | "phone" | "url" | "postal_code" | string;
7
+ readonly typeLabel?: string;
6
8
  readonly start?: number;
7
9
  readonly end?: number;
8
10
  readonly matchedText?: string;
11
+ readonly maskedText?: string;
9
12
  }
10
13
  interface SensitiveDataDetectorRule {
11
14
  readonly type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@form-engine-ts/privacy",
3
- "version": "2.9.5",
3
+ "version": "3.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,7 +38,7 @@
38
38
  "typescript"
39
39
  ],
40
40
  "dependencies": {
41
- "@form-engine-ts/core": "2.9.5"
41
+ "@form-engine-ts/core": "3.0.0"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsup src/index.ts --format esm,cjs --dts --clean --external @form-engine-ts/core",