@liuhange/dsh-data-asset-shared 2.0.3 → 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/lib/businessRulesLoader.js +1 -1
- package/lib/defaultBusinessRules.js +103 -0
- package/lib/index.js +3 -0
- package/lib/policyReferenceResolver.js +64 -0
- package/lib/registrationNavigationEnhancer.js +107 -0
- package/lib/types/defaultBusinessRules.d.ts +3 -1
- package/lib/types/index.d.ts +3 -0
- package/lib/types/policyReferenceResolver.d.ts +13 -0
- package/lib/types/registrationNavigationEnhancer.d.ts +12 -0
- package/lib/types/types.d.ts +88 -0
- package/package.json +3 -2
|
@@ -69,7 +69,7 @@ export class BusinessRulesLoader {
|
|
|
69
69
|
if (typeof version !== 'string') {
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
|
-
return version.startsWith('1.');
|
|
72
|
+
return version.startsWith('1.') || version.startsWith('3.');
|
|
73
73
|
}
|
|
74
74
|
hasRequiredNodes(config) {
|
|
75
75
|
return (config.valueAssessment !== undefined &&
|
|
@@ -120,6 +120,107 @@ export const defaultIncrementalSchedulingConfig = {
|
|
|
120
120
|
stateFilePath: 'state/incremental-state.json',
|
|
121
121
|
lockTimeout: 3600,
|
|
122
122
|
};
|
|
123
|
+
export const defaultRegistrationConfig = {
|
|
124
|
+
ruleVersion: '1.0',
|
|
125
|
+
agencies: [
|
|
126
|
+
{
|
|
127
|
+
id: 'beijing',
|
|
128
|
+
name: '北京国际大数据交易所',
|
|
129
|
+
location: '北京',
|
|
130
|
+
specialties: ['医疗', '健康', '生物'],
|
|
131
|
+
contact: '北京国际大数据交易所官网',
|
|
132
|
+
basis: '医疗数据登记案例集中',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'shanghai',
|
|
136
|
+
name: '上海数据交易所',
|
|
137
|
+
location: '上海',
|
|
138
|
+
specialties: ['金融', '征信', '支付'],
|
|
139
|
+
contact: '上海数据交易所官网',
|
|
140
|
+
basis: '金融数据交易活跃度最高',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 'shenzhen',
|
|
144
|
+
name: '深圳数据交易所',
|
|
145
|
+
location: '深圳',
|
|
146
|
+
specialties: ['交通', '物流', '地理'],
|
|
147
|
+
contact: '深圳数据交易所官网',
|
|
148
|
+
basis: '交通数据登记案例较多',
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
dataTypeMapping: {
|
|
152
|
+
'金融': 'shanghai',
|
|
153
|
+
'征信': 'shanghai',
|
|
154
|
+
'支付': 'shanghai',
|
|
155
|
+
'医疗': 'beijing',
|
|
156
|
+
'健康': 'beijing',
|
|
157
|
+
'生物': 'beijing',
|
|
158
|
+
'交通': 'shenzhen',
|
|
159
|
+
'物流': 'shenzhen',
|
|
160
|
+
'地理': 'shenzhen',
|
|
161
|
+
},
|
|
162
|
+
defaultRecommendation: {
|
|
163
|
+
agency: null,
|
|
164
|
+
basis: '根据数据属性匹配',
|
|
165
|
+
message: '建议咨询专业机构',
|
|
166
|
+
},
|
|
167
|
+
registrationFee: 5000,
|
|
168
|
+
registrationSteps: ['申请', '受理', '审查', '公示', '异议', '存证', '凭证'],
|
|
169
|
+
};
|
|
170
|
+
export const defaultPolicyReferences = [
|
|
171
|
+
{
|
|
172
|
+
stage: 'INVENTORY',
|
|
173
|
+
stageLabel: '盘点',
|
|
174
|
+
documents: [
|
|
175
|
+
{ name: '中华人民共和国数据安全法', docNumber: '主席令第八十四号', coreRequirement: '数据分类分级保护' },
|
|
176
|
+
{ name: '数据产权登记工作指引(试行)', docNumber: '国数综政策〔2026〕35号', coreRequirement: '数据产权三权分置' },
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
stage: 'CLEANING',
|
|
181
|
+
stageLabel: '清洗',
|
|
182
|
+
documents: [
|
|
183
|
+
{ name: '企业数据资源相关会计处理暂行规定', docNumber: '财会〔2023〕11号', coreRequirement: '数据资源入表条件' },
|
|
184
|
+
{ name: '数据资产评估指导意见', docNumber: '中评协〔2023〕17号', coreRequirement: '六维质量评价标准' },
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
stage: 'MASKING',
|
|
189
|
+
stageLabel: '脱敏',
|
|
190
|
+
documents: [
|
|
191
|
+
{ name: '中华人民共和国个人信息保护法', docNumber: '主席令第九十一号', coreRequirement: '匿名化后不再属于个人信息' },
|
|
192
|
+
{ name: '关于完善数据流通安全治理的实施方案', docNumber: '发改数据〔2025〕18号', coreRequirement: '脱敏后可按一般数据流通' },
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
stage: 'PACKAGING',
|
|
197
|
+
stageLabel: '包装',
|
|
198
|
+
documents: [
|
|
199
|
+
{ name: '数据产权登记工作指引(试行)', docNumber: '国数综政策〔2026〕35号', coreRequirement: '登记凭证可用于入表、融资、入股' },
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
stage: 'PRECHECK',
|
|
204
|
+
stageLabel: '登记预检',
|
|
205
|
+
documents: [
|
|
206
|
+
{ name: '数据产权登记工作指引(试行)', docNumber: '国数综政策〔2026〕35号', coreRequirement: '不予登记情形' },
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
stage: 'DOC_GENERATION',
|
|
211
|
+
stageLabel: '材料生成',
|
|
212
|
+
documents: [
|
|
213
|
+
{ name: '数据产权登记工作指引(试行)', docNumber: '国数综政策〔2026〕35号', coreRequirement: '7步登记流程审查重点' },
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
stage: 'AGENCY_MATCHING',
|
|
218
|
+
stageLabel: '机构匹配',
|
|
219
|
+
documents: [
|
|
220
|
+
{ name: '数据产权登记工作指引(试行)', docNumber: '国数综政策〔2026〕35号', coreRequirement: '登记机构名录' },
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
];
|
|
123
224
|
export const defaultBusinessRules = {
|
|
124
225
|
version: '1.0',
|
|
125
226
|
lastUpdated: '2026-08-17',
|
|
@@ -217,5 +318,7 @@ export const defaultBusinessRules = {
|
|
|
217
318
|
defaultDescription: '适用于数据分析、模型训练、行业研究等场景',
|
|
218
319
|
version: 'V1.0',
|
|
219
320
|
},
|
|
321
|
+
registration: defaultRegistrationConfig,
|
|
322
|
+
policyReferences: defaultPolicyReferences,
|
|
220
323
|
};
|
|
221
324
|
//# sourceMappingURL=defaultBusinessRules.js.map
|
package/lib/index.js
CHANGED
|
@@ -6,4 +6,7 @@ export { FileFormatAdapter } from './fileFormatAdapter.js';
|
|
|
6
6
|
export { ReportGenerator } from './reportGenerator.js';
|
|
7
7
|
export { PathValidator } from './pathValidator.js';
|
|
8
8
|
export { AuditLogger } from './auditLogger.js';
|
|
9
|
+
export { PolicyReferenceResolver } from './policyReferenceResolver.js';
|
|
10
|
+
export { RegistrationNavigationEnhancer } from './registrationNavigationEnhancer.js';
|
|
11
|
+
export { defaultRegistrationConfig, defaultPolicyReferences, } from './defaultBusinessRules.js';
|
|
9
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { defaultPolicyReferences } from './defaultBusinessRules.js';
|
|
4
|
+
export class PolicyReferenceResolver {
|
|
5
|
+
static instance = null;
|
|
6
|
+
cache = new Map();
|
|
7
|
+
references = [];
|
|
8
|
+
configPath;
|
|
9
|
+
constructor(configPath) {
|
|
10
|
+
this.configPath = configPath
|
|
11
|
+
? path.resolve(configPath)
|
|
12
|
+
: path.resolve(process.cwd(), 'config', 'policy-references.json');
|
|
13
|
+
this.load();
|
|
14
|
+
}
|
|
15
|
+
static getInstance(configPath) {
|
|
16
|
+
if (!PolicyReferenceResolver.instance) {
|
|
17
|
+
PolicyReferenceResolver.instance = new PolicyReferenceResolver(configPath);
|
|
18
|
+
}
|
|
19
|
+
return PolicyReferenceResolver.instance;
|
|
20
|
+
}
|
|
21
|
+
load() {
|
|
22
|
+
try {
|
|
23
|
+
if (fs.existsSync(this.configPath)) {
|
|
24
|
+
const raw = fs.readFileSync(this.configPath, 'utf-8');
|
|
25
|
+
const parsed = JSON.parse(raw);
|
|
26
|
+
if (parsed.policyReferences && Array.isArray(parsed.policyReferences)) {
|
|
27
|
+
this.references = parsed.policyReferences;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
console.warn('[PolicyReferenceResolver] 配置加载失败,使用默认值');
|
|
34
|
+
}
|
|
35
|
+
this.references = defaultPolicyReferences;
|
|
36
|
+
}
|
|
37
|
+
resolve(stage) {
|
|
38
|
+
if (this.cache.has(stage)) {
|
|
39
|
+
return this.cache.get(stage);
|
|
40
|
+
}
|
|
41
|
+
const ref = this.references.find(r => r.stage === stage);
|
|
42
|
+
let documents;
|
|
43
|
+
if (ref && ref.documents && ref.documents.length > 0) {
|
|
44
|
+
documents = ref.documents;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
console.warn(`[PolicyReferenceResolver] 环节 ${stage} 未配置政策依据,使用占位项`);
|
|
48
|
+
documents = [
|
|
49
|
+
{
|
|
50
|
+
name: '依据文件待补充',
|
|
51
|
+
docNumber: '待配置',
|
|
52
|
+
coreRequirement: '请补充对应政策依据',
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
this.cache.set(stage, documents);
|
|
57
|
+
return documents;
|
|
58
|
+
}
|
|
59
|
+
clearCache() {
|
|
60
|
+
this.cache.clear();
|
|
61
|
+
PolicyReferenceResolver.instance = null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=policyReferenceResolver.js.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { PolicyReferenceResolver } from './policyReferenceResolver.js';
|
|
4
|
+
import { defaultRegistrationConfig } from './defaultBusinessRules.js';
|
|
5
|
+
const PLUGIN_STAGE_MAP = {
|
|
6
|
+
'data-inventory': 'INVENTORY',
|
|
7
|
+
'data-cleaning': 'CLEANING',
|
|
8
|
+
'data-masking': 'MASKING',
|
|
9
|
+
'data-packaging': 'PACKAGING',
|
|
10
|
+
};
|
|
11
|
+
const NAVIGATION_TEXTS = {
|
|
12
|
+
'data-inventory': '本数据集已完成盘点,建议下一步申请数据产权登记。登记机构推荐:{agency}',
|
|
13
|
+
'data-cleaning': '数据质量已达到登记要求(依据《数据资产评估指导意见》六维质量评价标准)。',
|
|
14
|
+
'data-masking': "脱敏后数据已符合登记审查中的'来源合规性'要求(依据《数据产权登记工作指引》第三章)。",
|
|
15
|
+
'data-packaging': "本产品说明书可直接用于登记申请材料中的'数据描述'部分。",
|
|
16
|
+
};
|
|
17
|
+
export class RegistrationNavigationEnhancer {
|
|
18
|
+
config;
|
|
19
|
+
configPath;
|
|
20
|
+
constructor(configPath) {
|
|
21
|
+
this.configPath = configPath
|
|
22
|
+
? path.resolve(configPath)
|
|
23
|
+
: path.resolve(process.cwd(), 'config', 'registration-agencies.json');
|
|
24
|
+
this.config = this.loadConfig();
|
|
25
|
+
}
|
|
26
|
+
loadConfig() {
|
|
27
|
+
try {
|
|
28
|
+
if (fs.existsSync(this.configPath)) {
|
|
29
|
+
const raw = fs.readFileSync(this.configPath, 'utf-8');
|
|
30
|
+
return JSON.parse(raw);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
console.warn('[RegistrationNavigationEnhancer] 配置加载失败,使用默认值');
|
|
35
|
+
}
|
|
36
|
+
return defaultRegistrationConfig;
|
|
37
|
+
}
|
|
38
|
+
matchAgency(dataType) {
|
|
39
|
+
const agencyId = this.config.dataTypeMapping[dataType];
|
|
40
|
+
if (agencyId) {
|
|
41
|
+
const agency = this.config.agencies.find(a => a.id === agencyId);
|
|
42
|
+
if (agency)
|
|
43
|
+
return agency.name;
|
|
44
|
+
}
|
|
45
|
+
return this.config.defaultRecommendation.message;
|
|
46
|
+
}
|
|
47
|
+
enhance(report, pluginName, dataType) {
|
|
48
|
+
const stage = PLUGIN_STAGE_MAP[pluginName];
|
|
49
|
+
if (!stage)
|
|
50
|
+
return report;
|
|
51
|
+
const resolver = PolicyReferenceResolver.getInstance();
|
|
52
|
+
const policyDocs = resolver.resolve(stage);
|
|
53
|
+
let navText = NAVIGATION_TEXTS[pluginName] || '';
|
|
54
|
+
if (pluginName === 'data-inventory') {
|
|
55
|
+
const agencyName = this.matchAgency(dataType);
|
|
56
|
+
navText = navText.replace('{agency}', agencyName);
|
|
57
|
+
}
|
|
58
|
+
const policyText = policyDocs
|
|
59
|
+
.map(d => `- 《${d.name}》(${d.docNumber}):${d.coreRequirement}`)
|
|
60
|
+
.join('\n');
|
|
61
|
+
const enhancedReport = `${report}
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 登记导航
|
|
66
|
+
|
|
67
|
+
${navText}
|
|
68
|
+
|
|
69
|
+
## 政策依据
|
|
70
|
+
|
|
71
|
+
${policyText}
|
|
72
|
+
`;
|
|
73
|
+
return enhancedReport;
|
|
74
|
+
}
|
|
75
|
+
enhanceAll(orchestrationResult, dataType) {
|
|
76
|
+
return {
|
|
77
|
+
...orchestrationResult,
|
|
78
|
+
maskingReport: this.enhance(orchestrationResult.maskingReport, 'data-masking', dataType),
|
|
79
|
+
cleaningReport: this.enhance(orchestrationResult.cleaningReport, 'data-cleaning', dataType),
|
|
80
|
+
inventoryReport: this.enhance(orchestrationResult.inventoryReport, 'data-inventory', dataType),
|
|
81
|
+
packagingManual: this.enhance(orchestrationResult.packagingManual, 'data-packaging', dataType),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
matchAgencyResult(dataType) {
|
|
85
|
+
const agencyId = this.config.dataTypeMapping[dataType];
|
|
86
|
+
if (agencyId) {
|
|
87
|
+
const agency = this.config.agencies.find(a => a.id === agencyId);
|
|
88
|
+
if (agency) {
|
|
89
|
+
return {
|
|
90
|
+
agency: agency.id,
|
|
91
|
+
agencyName: agency.name,
|
|
92
|
+
basis: agency.basis,
|
|
93
|
+
dataType,
|
|
94
|
+
ruleVersion: this.config.ruleVersion,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
agency: null,
|
|
100
|
+
agencyName: this.config.defaultRecommendation.message,
|
|
101
|
+
basis: this.config.defaultRecommendation.basis,
|
|
102
|
+
dataType,
|
|
103
|
+
ruleVersion: this.config.ruleVersion,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=registrationNavigationEnhancer.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BusinessRulesConfig } from './types.js';
|
|
1
|
+
import type { BusinessRulesConfig, RegistrationConfig, PolicyReference } from './types.js';
|
|
2
2
|
export declare const defaultQualityScoringConfig: {
|
|
3
3
|
weights: {
|
|
4
4
|
completeness: number;
|
|
@@ -136,5 +136,7 @@ export declare const defaultIncrementalSchedulingConfig: {
|
|
|
136
136
|
stateFilePath: string;
|
|
137
137
|
lockTimeout: number;
|
|
138
138
|
};
|
|
139
|
+
export declare const defaultRegistrationConfig: RegistrationConfig;
|
|
140
|
+
export declare const defaultPolicyReferences: PolicyReference[];
|
|
139
141
|
export declare const defaultBusinessRules: BusinessRulesConfig;
|
|
140
142
|
//# sourceMappingURL=defaultBusinessRules.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -9,4 +9,7 @@ export type { MaskingReportParams, CleaningReportParams, InventoryReportParams,
|
|
|
9
9
|
export { PathValidator } from './pathValidator.js';
|
|
10
10
|
export { AuditLogger } from './auditLogger.js';
|
|
11
11
|
export type { AuditLogParams } from './auditLogger.js';
|
|
12
|
+
export { PolicyReferenceResolver } from './policyReferenceResolver.js';
|
|
13
|
+
export { RegistrationNavigationEnhancer } from './registrationNavigationEnhancer.js';
|
|
14
|
+
export { defaultRegistrationConfig, defaultPolicyReferences, } from './defaultBusinessRules.js';
|
|
12
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PolicyStage, PolicyDocument } from './types.js';
|
|
2
|
+
export declare class PolicyReferenceResolver {
|
|
3
|
+
private static instance;
|
|
4
|
+
private cache;
|
|
5
|
+
private references;
|
|
6
|
+
private configPath;
|
|
7
|
+
private constructor();
|
|
8
|
+
static getInstance(configPath?: string): PolicyReferenceResolver;
|
|
9
|
+
private load;
|
|
10
|
+
resolve(stage: PolicyStage): PolicyDocument[];
|
|
11
|
+
clearCache(): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=policyReferenceResolver.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { OrchestrationResult, AgencyMatchResult } from './types.js';
|
|
2
|
+
export declare class RegistrationNavigationEnhancer {
|
|
3
|
+
private config;
|
|
4
|
+
private configPath;
|
|
5
|
+
constructor(configPath?: string);
|
|
6
|
+
private loadConfig;
|
|
7
|
+
private matchAgency;
|
|
8
|
+
enhance(report: string, pluginName: string, dataType: string): string;
|
|
9
|
+
enhanceAll(orchestrationResult: OrchestrationResult, dataType: string): OrchestrationResult;
|
|
10
|
+
matchAgencyResult(dataType: string): AgencyMatchResult;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=registrationNavigationEnhancer.d.ts.map
|
package/lib/types/types.d.ts
CHANGED
|
@@ -82,6 +82,8 @@ export interface BusinessRulesConfig {
|
|
|
82
82
|
visualization?: VisualizationConfig;
|
|
83
83
|
sensitivityClassification?: SensitivityClassificationConfig;
|
|
84
84
|
incrementalScheduling?: IncrementalSchedulingConfig;
|
|
85
|
+
registration?: RegistrationConfig;
|
|
86
|
+
policyReferences?: PolicyReference[];
|
|
85
87
|
}
|
|
86
88
|
export interface SensitiveField {
|
|
87
89
|
type: SensitiveFieldType;
|
|
@@ -275,4 +277,90 @@ export interface IncrementalSchedulingConfig {
|
|
|
275
277
|
stateFilePath: string;
|
|
276
278
|
lockTimeout: number;
|
|
277
279
|
}
|
|
280
|
+
export type PolicyStage = 'INVENTORY' | 'CLEANING' | 'MASKING' | 'PACKAGING' | 'PRECHECK' | 'DOC_GENERATION' | 'AGENCY_MATCHING';
|
|
281
|
+
export interface PolicyDocument {
|
|
282
|
+
name: string;
|
|
283
|
+
docNumber: string;
|
|
284
|
+
coreRequirement: string;
|
|
285
|
+
}
|
|
286
|
+
export interface PolicyReference {
|
|
287
|
+
stage: PolicyStage;
|
|
288
|
+
stageLabel: string;
|
|
289
|
+
documents: PolicyDocument[];
|
|
290
|
+
}
|
|
291
|
+
export interface AgencyConfig {
|
|
292
|
+
id: string;
|
|
293
|
+
name: string;
|
|
294
|
+
location: string;
|
|
295
|
+
specialties: string[];
|
|
296
|
+
contact: string;
|
|
297
|
+
basis: string;
|
|
298
|
+
}
|
|
299
|
+
export interface RegistrationConfig {
|
|
300
|
+
ruleVersion: string;
|
|
301
|
+
agencies: AgencyConfig[];
|
|
302
|
+
dataTypeMapping: Record<string, string>;
|
|
303
|
+
defaultRecommendation: {
|
|
304
|
+
agency: string | null;
|
|
305
|
+
basis: string;
|
|
306
|
+
message: string;
|
|
307
|
+
};
|
|
308
|
+
registrationFee: number;
|
|
309
|
+
registrationSteps: string[];
|
|
310
|
+
}
|
|
311
|
+
export interface NavigationField {
|
|
312
|
+
registrationNavigation: string;
|
|
313
|
+
policyReferences: PolicyDocument[];
|
|
314
|
+
}
|
|
315
|
+
export type CheckName = 'NATIONAL_SECURITY' | 'SOURCE_COMPLIANCE' | 'OWNERSHIP_DISPUTE' | 'MATERIAL_AUTHENTICITY';
|
|
316
|
+
export type CheckResult = 'PASS' | 'FAIL' | 'PENDING' | 'UNDETERMINED';
|
|
317
|
+
export type PrecheckConclusion = 'CAN_REGISTER' | 'CANNOT_REGISTER' | 'PENDING_CONFIRMATION';
|
|
318
|
+
export interface PrecheckCheckItem {
|
|
319
|
+
name: CheckName;
|
|
320
|
+
label: string;
|
|
321
|
+
result: CheckResult;
|
|
322
|
+
detail: string;
|
|
323
|
+
}
|
|
324
|
+
export interface PrecheckReport {
|
|
325
|
+
conclusion: PrecheckConclusion;
|
|
326
|
+
checks: PrecheckCheckItem[];
|
|
327
|
+
failedItems: string[];
|
|
328
|
+
policyReferences: PolicyDocument[];
|
|
329
|
+
timestamp: string;
|
|
330
|
+
}
|
|
331
|
+
export type RegistrationDocName = 'DATA_DESCRIPTION' | 'SOURCE_LEGALITY_STATEMENT' | 'OWNERSHIP_EXPLANATION';
|
|
332
|
+
export type DocStatus = 'GENERATED' | 'FAILED' | 'PENDING_FIELDS';
|
|
333
|
+
export interface RegistrationDoc {
|
|
334
|
+
name: RegistrationDocName;
|
|
335
|
+
label: string;
|
|
336
|
+
content: string;
|
|
337
|
+
status: DocStatus;
|
|
338
|
+
missingFields?: string[];
|
|
339
|
+
}
|
|
340
|
+
export interface RegistrationDocPackage {
|
|
341
|
+
docs: RegistrationDoc[];
|
|
342
|
+
packagePath: string;
|
|
343
|
+
policyReferences: PolicyDocument[];
|
|
344
|
+
timestamp: string;
|
|
345
|
+
}
|
|
346
|
+
export interface AgencyMatchResult {
|
|
347
|
+
agency: string | null;
|
|
348
|
+
agencyName: string;
|
|
349
|
+
basis: string;
|
|
350
|
+
dataType: string;
|
|
351
|
+
ruleVersion: string;
|
|
352
|
+
}
|
|
353
|
+
export type StepStatus = 'COMPLETED' | 'CURRENT' | 'PENDING';
|
|
354
|
+
export interface RegistrationStep {
|
|
355
|
+
name: string;
|
|
356
|
+
status: StepStatus;
|
|
357
|
+
description: string;
|
|
358
|
+
}
|
|
359
|
+
export interface RegistrationProgress {
|
|
360
|
+
steps: RegistrationStep[];
|
|
361
|
+
currentStep: number;
|
|
362
|
+
registrationId: string;
|
|
363
|
+
agency: string;
|
|
364
|
+
timestamp: string;
|
|
365
|
+
}
|
|
278
366
|
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liuhange/dsh-data-asset-shared",
|
|
3
3
|
"description": "Shared infrastructure for data assetization plugins: business rules loader, file format adapter, report generator, path validator, audit logger",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,5 +41,6 @@
|
|
|
41
41
|
"@deepseek-ai/cordis": "^4.0.0",
|
|
42
42
|
"@deepseek-ai/dsh-tools": "0.0.1-rc.1",
|
|
43
43
|
"@deepseek-ai/schemastery": "^3.18.0"
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
"dsh": { "bundle": { "patch": true } }
|
|
45
46
|
}
|