@kanonak-protocol/types 4.14.0 → 4.15.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.
|
@@ -9,5 +9,10 @@ export declare enum ValidationSeverity {
|
|
|
9
9
|
/**
|
|
10
10
|
* Critical issue that must be fixed
|
|
11
11
|
*/
|
|
12
|
-
Error = 1
|
|
12
|
+
Error = 1,
|
|
13
|
+
/**
|
|
14
|
+
* Informational notice — resolution succeeds, but something is worth
|
|
15
|
+
* confirming (e.g. a local entity shadowing a reserved built-in name).
|
|
16
|
+
*/
|
|
17
|
+
Info = 2
|
|
13
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var g=(f=>(f[f.Warning=0]="Warning",f[f.Error=1]="Error",f[f.Info=2]="Info",f))(g||{});export{g as ValidationSeverity};
|
|
@@ -14,6 +14,16 @@ export interface PropertyKindRangeConsistencyRule extends IRepositoryValidationR
|
|
|
14
14
|
readonly ruleName: string;
|
|
15
15
|
validateAsync(document: KanonakDocument, repository: IKanonakDocumentRepository): Promise<Array<OntologyValidationError>>;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* INFO: a package defines a local entity whose name is a reserved built-in term
|
|
19
|
+
* homed in a different package (e.g. core-owl/Class shadows the built-in
|
|
20
|
+
* rdfs.Class). Usually intentional, but surfaced so a bare reference silently
|
|
21
|
+
* resolving to the local definition can't hide a mistake.
|
|
22
|
+
*/
|
|
23
|
+
export interface ReservedNameShadowRule extends IRepositoryValidationRule {
|
|
24
|
+
readonly ruleName: string;
|
|
25
|
+
validateAsync(document: KanonakDocument, repository: IKanonakDocumentRepository): Promise<Array<OntologyValidationError>>;
|
|
26
|
+
}
|
|
17
27
|
/**
|
|
18
28
|
* Validates that references to entities or properties are unambiguous. When multiple imports define the same entity/property name, namespace aliases MUST be used to disambiguate (e.g., 'people.name' vs 'heroes.name'). When only one source defines an entity, aliases are optional. Design Philosophy: - Aliases are document-scoped only (not transitive) - Aliases are required ONLY when ambiguity exists - Aliases are optional when references are unambiguous
|
|
19
29
|
*/
|
|
@@ -99,9 +99,17 @@ export interface OntologyValidationResult {
|
|
|
99
99
|
*/
|
|
100
100
|
warnings: Array<OntologyValidationError>;
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* List of informational notices (never affect `isValid`)
|
|
103
|
+
*/
|
|
104
|
+
infos: Array<OntologyValidationError>;
|
|
105
|
+
/**
|
|
106
|
+
* Total count of issues (errors + warnings + infos)
|
|
103
107
|
*/
|
|
104
108
|
readonly totalIssues: number;
|
|
109
|
+
/**
|
|
110
|
+
* All diagnostics across every severity, errors first.
|
|
111
|
+
*/
|
|
112
|
+
readonly allDiagnostics: Array<OntologyValidationError>;
|
|
105
113
|
}
|
|
106
114
|
/**
|
|
107
115
|
* Context for validation operations, carrying metadata needed for type inference and validation
|