@liuhange/dsh-data-asset-shared 1.0.0 → 2.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.
@@ -1,3 +1,140 @@
1
1
  import type { BusinessRulesConfig } from './types.js';
2
+ export declare const defaultQualityScoringConfig: {
3
+ weights: {
4
+ completeness: number;
5
+ accuracy: number;
6
+ consistency: number;
7
+ timeliness: number;
8
+ };
9
+ thresholds: {
10
+ completeness: number;
11
+ accuracy: number;
12
+ consistency: number;
13
+ timeliness: number;
14
+ };
15
+ completeness: {
16
+ missingMarkers: string[];
17
+ };
18
+ accuracy: {
19
+ formatRules: {
20
+ fieldName: string;
21
+ pattern: string;
22
+ weight: number;
23
+ }[];
24
+ domainRules: {
25
+ fieldName: string;
26
+ min: number;
27
+ max: number;
28
+ weight: number;
29
+ }[];
30
+ };
31
+ consistency: {
32
+ crossFieldRules: {
33
+ name: string;
34
+ fields: string[];
35
+ constraint: string;
36
+ }[];
37
+ };
38
+ timeliness: {
39
+ timestampField: string;
40
+ freshnessThresholdHours: number;
41
+ };
42
+ };
43
+ export declare const defaultLineageConfig: {
44
+ enabled: boolean;
45
+ storagePath: string;
46
+ hashAlgorithm: string;
47
+ };
48
+ export declare const defaultAdvancedMaskingConfig: {
49
+ defaultAlgorithm: string;
50
+ fieldAlgorithms: {};
51
+ fpe: {
52
+ key: string;
53
+ radix: number;
54
+ };
55
+ kAnonymity: {
56
+ kValue: number;
57
+ quasiIdentifiers: string[];
58
+ };
59
+ differentialPrivacy: {
60
+ epsilon: number;
61
+ totalBudget: number;
62
+ sensitivity: number;
63
+ };
64
+ hash: {
65
+ algorithm: string;
66
+ salt: string;
67
+ };
68
+ };
69
+ export declare const defaultVisualizationConfig: {
70
+ charts: {
71
+ bar: {
72
+ enabled: boolean;
73
+ title: string;
74
+ };
75
+ comparison: {
76
+ enabled: boolean;
77
+ title: string;
78
+ };
79
+ pie: {
80
+ enabled: boolean;
81
+ title: string;
82
+ };
83
+ radar: {
84
+ enabled: boolean;
85
+ title: string;
86
+ };
87
+ flowchart: {
88
+ enabled: boolean;
89
+ title: string;
90
+ };
91
+ };
92
+ layout: {
93
+ columns: number;
94
+ responsive: boolean;
95
+ };
96
+ colorScheme: {
97
+ primary: string;
98
+ secondary: string;
99
+ success: string;
100
+ warning: string;
101
+ danger: string;
102
+ background: string;
103
+ text: string;
104
+ };
105
+ interactions: {
106
+ expandCollapse: boolean;
107
+ chartSwitch: boolean;
108
+ tooltip: boolean;
109
+ };
110
+ templateVersion: string;
111
+ };
112
+ export declare const defaultSensitivityClassificationConfig: {
113
+ fieldNameRules: {
114
+ name: string;
115
+ pattern: string;
116
+ level: string;
117
+ }[];
118
+ fieldValueRules: {
119
+ name: string;
120
+ pattern: string;
121
+ level: string;
122
+ }[];
123
+ levelMapping: {
124
+ Public: string;
125
+ Internal: string;
126
+ Confidential: string;
127
+ Secret: string;
128
+ };
129
+ defaultLevel: string;
130
+ };
131
+ export declare const defaultIncrementalSchedulingConfig: {
132
+ incrementalMode: boolean;
133
+ cronExpression: string;
134
+ hashAlgorithm: string;
135
+ watchDirectory: string;
136
+ stateFilePath: string;
137
+ lockTimeout: number;
138
+ };
2
139
  export declare const defaultBusinessRules: BusinessRulesConfig;
3
140
  //# sourceMappingURL=defaultBusinessRules.d.ts.map
@@ -1,5 +1,6 @@
1
1
  export * from './types.js';
2
2
  export { defaultBusinessRules } from './defaultBusinessRules.js';
3
+ export { defaultQualityScoringConfig, defaultLineageConfig, defaultAdvancedMaskingConfig, defaultVisualizationConfig, defaultSensitivityClassificationConfig, defaultIncrementalSchedulingConfig, } from './defaultBusinessRules.js';
3
4
  export { BusinessRulesLoader } from './businessRulesLoader.js';
4
5
  export { FileFormatAdapter } from './fileFormatAdapter.js';
5
6
  export type { FileReadResult } from './fileFormatAdapter.js';
@@ -76,6 +76,12 @@ export interface BusinessRulesConfig {
76
76
  cleaningRules: CleaningRules;
77
77
  compliance: ComplianceConfig;
78
78
  packaging: PackagingRules;
79
+ qualityScoring?: QualityScoringConfig;
80
+ lineage?: LineageConfig;
81
+ advancedMasking?: AdvancedMaskingConfig;
82
+ visualization?: VisualizationConfig;
83
+ sensitivityClassification?: SensitivityClassificationConfig;
84
+ incrementalScheduling?: IncrementalSchedulingConfig;
79
85
  }
80
86
  export interface SensitiveField {
81
87
  type: SensitiveFieldType;
@@ -132,4 +138,141 @@ export interface BusinessRulesLoadResult {
132
138
  config: BusinessRulesConfig;
133
139
  status: ConfigStatus;
134
140
  }
141
+ export interface QualityScoringWeights {
142
+ completeness: number;
143
+ accuracy: number;
144
+ consistency: number;
145
+ timeliness: number;
146
+ }
147
+ export interface QualityScoringThresholds {
148
+ completeness: number;
149
+ accuracy: number;
150
+ consistency: number;
151
+ timeliness: number;
152
+ }
153
+ export interface CompletenessConfig {
154
+ missingMarkers: string[];
155
+ }
156
+ export interface FormatRule {
157
+ fieldName: string;
158
+ pattern: string;
159
+ weight: number;
160
+ }
161
+ export interface DomainRule {
162
+ fieldName: string;
163
+ min?: number;
164
+ max?: number;
165
+ allowedValues?: unknown[];
166
+ weight: number;
167
+ }
168
+ export interface AccuracyConfig {
169
+ formatRules: FormatRule[];
170
+ domainRules: DomainRule[];
171
+ }
172
+ export interface CrossFieldRule {
173
+ name: string;
174
+ fields: string[];
175
+ constraint: string;
176
+ value?: unknown;
177
+ }
178
+ export interface ConsistencyConfig {
179
+ crossFieldRules: CrossFieldRule[];
180
+ }
181
+ export interface TimelinessConfig {
182
+ timestampField: string;
183
+ freshnessThresholdHours: number;
184
+ }
185
+ export interface QualityScoringConfig {
186
+ weights: QualityScoringWeights;
187
+ thresholds: QualityScoringThresholds;
188
+ completeness: CompletenessConfig;
189
+ accuracy: AccuracyConfig;
190
+ consistency: ConsistencyConfig;
191
+ timeliness: TimelinessConfig;
192
+ }
193
+ export interface LineageConfig {
194
+ enabled: boolean;
195
+ storagePath: string;
196
+ hashAlgorithm: string;
197
+ }
198
+ export interface FpeConfig {
199
+ key: string;
200
+ radix: number;
201
+ }
202
+ export interface KAnonymityConfig {
203
+ kValue: number;
204
+ quasiIdentifiers: string[];
205
+ }
206
+ export interface DifferentialPrivacyConfig {
207
+ epsilon: number;
208
+ totalBudget: number;
209
+ sensitivity: number;
210
+ }
211
+ export interface HashMaskingConfig {
212
+ algorithm: string;
213
+ salt: string;
214
+ }
215
+ export interface AdvancedMaskingConfig {
216
+ defaultAlgorithm: string;
217
+ fieldAlgorithms: Record<string, {
218
+ algorithm: string;
219
+ }>;
220
+ fpe: FpeConfig;
221
+ kAnonymity: KAnonymityConfig;
222
+ differentialPrivacy: DifferentialPrivacyConfig;
223
+ hash: HashMaskingConfig;
224
+ }
225
+ export interface ChartConfig {
226
+ enabled: boolean;
227
+ title: string;
228
+ }
229
+ export interface VisualizationLayoutConfig {
230
+ columns: number;
231
+ responsive: boolean;
232
+ }
233
+ export interface ColorSchemeConfig {
234
+ primary: string;
235
+ secondary: string;
236
+ success: string;
237
+ warning: string;
238
+ danger: string;
239
+ background: string;
240
+ text: string;
241
+ }
242
+ export interface InteractionsConfig {
243
+ expandCollapse: boolean;
244
+ chartSwitch: boolean;
245
+ tooltip: boolean;
246
+ }
247
+ export interface VisualizationConfig {
248
+ charts: Record<string, ChartConfig>;
249
+ layout: VisualizationLayoutConfig;
250
+ colorScheme: ColorSchemeConfig;
251
+ interactions: InteractionsConfig;
252
+ templateVersion: string;
253
+ }
254
+ export interface FieldNameRule {
255
+ name: string;
256
+ pattern: string;
257
+ level: string;
258
+ }
259
+ export interface FieldValueRule {
260
+ name: string;
261
+ pattern: string;
262
+ level: string;
263
+ }
264
+ export interface SensitivityClassificationConfig {
265
+ fieldNameRules: FieldNameRule[];
266
+ fieldValueRules: FieldValueRule[];
267
+ levelMapping: Record<string, string>;
268
+ defaultLevel: string;
269
+ }
270
+ export interface IncrementalSchedulingConfig {
271
+ incrementalMode: boolean;
272
+ cronExpression: string;
273
+ hashAlgorithm: string;
274
+ watchDirectory: string;
275
+ stateFilePath: string;
276
+ lockTimeout: number;
277
+ }
135
278
  //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "@liuhange/dsh-data-asset-shared",
3
- "description": "Shared infrastructure for data assetization plugins: business rules loader, file format adapter, report generator, path validator, audit logger",
4
- "version": "1.0.0",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
- "directory": "packages/data-asset/data-asset-shared"
12
- },
13
- "type": "module",
14
- "main": "lib/index.js",
15
- "types": "lib/types/index.d.ts",
16
- "exports": {
17
- ".": {
18
- "types": "./lib/types/index.d.ts",
19
- "default": "./lib/index.js"
20
- },
21
- "./invariant": {
22
- "types": "./lib/types/invariant.d.ts",
23
- "default": "./lib/invariant.js"
24
- },
25
- "./src/*": "./src/*",
26
- "./package.json": "./package.json"
27
- },
28
- "files": [
29
- "lib/index.js",
30
- "lib/invariant.js",
31
- "lib/types/**/*.d.ts"
32
- ],
33
- "license": "MIT",
34
- "dependencies": {
35
- "csv-parse": "^5.5.0"
36
- },
37
- "peerDependencies": {
38
- "@deepseek-ai/cordis": "^0.1.0",
39
- "@deepseek-ai/dsh-tools": "^0.1.0",
40
- "@deepseek-ai/schemastery": "^0.1.0"
41
- }
1
+ {
2
+ "name": "@liuhange/dsh-data-asset-shared",
3
+ "description": "Shared infrastructure for data assetization plugins: business rules loader, file format adapter, report generator, path validator, audit logger",
4
+ "version": "2.0.0",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/data-asset/data-asset-shared"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./src/*": "./src/*",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "files": [
29
+ "lib/index.js",
30
+ "lib/invariant.js",
31
+ "lib/types/**/*.d.ts"
32
+ ],
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "csv-parse": "^5.5.0"
36
+ },
37
+ "peerDependencies": {
38
+ "@deepseek-ai/cordis": "^0.1.0",
39
+ "@deepseek-ai/dsh-tools": "^0.1.0",
40
+ "@deepseek-ai/schemastery": "^0.1.0"
41
+ }
42
42
  }