@_linked/core 2.12.0 → 2.13.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/CHANGELOG.md +6 -0
- package/lib/esm/queries/IRPipeline.d.ts +7 -1
- package/lib/esm/queries/IRPipeline.js +20 -6
- package/lib/esm/queries/IRPipeline.js.map +1 -1
- package/lib/esm/queries/queryDispatch.js +12 -2
- package/lib/esm/queries/queryDispatch.js.map +1 -1
- package/package.json +10 -13
- package/lib/cjs/collections/CoreSet.d.ts +0 -47
- package/lib/cjs/collections/CoreSet.js +0 -136
- package/lib/cjs/collections/CoreSet.js.map +0 -1
- package/lib/cjs/collections/ShapeSet.d.ts +0 -6
- package/lib/cjs/collections/ShapeSet.js +0 -20
- package/lib/cjs/collections/ShapeSet.js.map +0 -1
- package/lib/cjs/expressions/Expr.d.ts +0 -29
- package/lib/cjs/expressions/Expr.js +0 -80
- package/lib/cjs/expressions/Expr.js.map +0 -1
- package/lib/cjs/expressions/ExpressionMethods.d.ts +0 -85
- package/lib/cjs/expressions/ExpressionMethods.js +0 -3
- package/lib/cjs/expressions/ExpressionMethods.js.map +0 -1
- package/lib/cjs/expressions/ExpressionNode.d.ts +0 -144
- package/lib/cjs/expressions/ExpressionNode.js +0 -432
- package/lib/cjs/expressions/ExpressionNode.js.map +0 -1
- package/lib/cjs/index.d.ts +0 -29
- package/lib/cjs/index.js +0 -65
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/ICoreIterable.d.ts +0 -14
- package/lib/cjs/interfaces/ICoreIterable.js +0 -3
- package/lib/cjs/interfaces/ICoreIterable.js.map +0 -1
- package/lib/cjs/interfaces/IDataset.d.ts +0 -26
- package/lib/cjs/interfaces/IDataset.js +0 -3
- package/lib/cjs/interfaces/IDataset.js.map +0 -1
- package/lib/cjs/interfaces/IFileStore.d.ts +0 -16
- package/lib/cjs/interfaces/IFileStore.js +0 -3
- package/lib/cjs/interfaces/IFileStore.js.map +0 -1
- package/lib/cjs/ontologies/linked-core.d.ts +0 -15
- package/lib/cjs/ontologies/linked-core.js +0 -38
- package/lib/cjs/ontologies/linked-core.js.map +0 -1
- package/lib/cjs/ontologies/npm.d.ts +0 -6
- package/lib/cjs/ontologies/npm.js +0 -15
- package/lib/cjs/ontologies/npm.js.map +0 -1
- package/lib/cjs/ontologies/owl.d.ts +0 -14
- package/lib/cjs/ontologies/owl.js +0 -21
- package/lib/cjs/ontologies/owl.js.map +0 -1
- package/lib/cjs/ontologies/rdf.d.ts +0 -13
- package/lib/cjs/ontologies/rdf.js +0 -27
- package/lib/cjs/ontologies/rdf.js.map +0 -1
- package/lib/cjs/ontologies/rdfs.d.ts +0 -16
- package/lib/cjs/ontologies/rdfs.js +0 -33
- package/lib/cjs/ontologies/rdfs.js.map +0 -1
- package/lib/cjs/ontologies/shacl.d.ts +0 -103
- package/lib/cjs/ontologies/shacl.js +0 -152
- package/lib/cjs/ontologies/shacl.js.map +0 -1
- package/lib/cjs/ontologies/xsd.d.ts +0 -19
- package/lib/cjs/ontologies/xsd.js +0 -41
- package/lib/cjs/ontologies/xsd.js.map +0 -1
- package/lib/cjs/package.d.ts +0 -4
- package/lib/cjs/package.js +0 -6
- package/lib/cjs/package.js.map +0 -1
- package/lib/cjs/package.json +0 -9
- package/lib/cjs/paths/PropertyPathExpr.d.ts +0 -38
- package/lib/cjs/paths/PropertyPathExpr.js +0 -221
- package/lib/cjs/paths/PropertyPathExpr.js.map +0 -1
- package/lib/cjs/paths/normalizePropertyPath.d.ts +0 -23
- package/lib/cjs/paths/normalizePropertyPath.js +0 -75
- package/lib/cjs/paths/normalizePropertyPath.js.map +0 -1
- package/lib/cjs/paths/pathExprToSparql.d.ts +0 -14
- package/lib/cjs/paths/pathExprToSparql.js +0 -136
- package/lib/cjs/paths/pathExprToSparql.js.map +0 -1
- package/lib/cjs/queries/ContextRef.d.ts +0 -32
- package/lib/cjs/queries/ContextRef.js +0 -69
- package/lib/cjs/queries/ContextRef.js.map +0 -1
- package/lib/cjs/queries/CreateBuilder.d.ts +0 -59
- package/lib/cjs/queries/CreateBuilder.js +0 -138
- package/lib/cjs/queries/CreateBuilder.js.map +0 -1
- package/lib/cjs/queries/CreateQuery.d.ts +0 -20
- package/lib/cjs/queries/CreateQuery.js +0 -3
- package/lib/cjs/queries/CreateQuery.js.map +0 -1
- package/lib/cjs/queries/DeleteBuilder.d.ts +0 -56
- package/lib/cjs/queries/DeleteBuilder.js +0 -172
- package/lib/cjs/queries/DeleteBuilder.js.map +0 -1
- package/lib/cjs/queries/DeleteQuery.d.ts +0 -37
- package/lib/cjs/queries/DeleteQuery.js +0 -3
- package/lib/cjs/queries/DeleteQuery.js.map +0 -1
- package/lib/cjs/queries/DslJsonExpression.d.ts +0 -68
- package/lib/cjs/queries/DslJsonExpression.js +0 -427
- package/lib/cjs/queries/DslJsonExpression.js.map +0 -1
- package/lib/cjs/queries/FieldSet.d.ts +0 -310
- package/lib/cjs/queries/FieldSet.js +0 -802
- package/lib/cjs/queries/FieldSet.js.map +0 -1
- package/lib/cjs/queries/IRAliasScope.d.ts +0 -20
- package/lib/cjs/queries/IRAliasScope.js +0 -52
- package/lib/cjs/queries/IRAliasScope.js.map +0 -1
- package/lib/cjs/queries/IRCanonicalize.d.ts +0 -19
- package/lib/cjs/queries/IRCanonicalize.js +0 -19
- package/lib/cjs/queries/IRCanonicalize.js.map +0 -1
- package/lib/cjs/queries/IRDesugar.d.ts +0 -123
- package/lib/cjs/queries/IRDesugar.js +0 -261
- package/lib/cjs/queries/IRDesugar.js.map +0 -1
- package/lib/cjs/queries/IRLower.d.ts +0 -25
- package/lib/cjs/queries/IRLower.js +0 -398
- package/lib/cjs/queries/IRLower.js.map +0 -1
- package/lib/cjs/queries/IRMutation.d.ts +0 -53
- package/lib/cjs/queries/IRMutation.js +0 -130
- package/lib/cjs/queries/IRMutation.js.map +0 -1
- package/lib/cjs/queries/IRPipeline.d.ts +0 -8
- package/lib/cjs/queries/IRPipeline.js +0 -25
- package/lib/cjs/queries/IRPipeline.js.map +0 -1
- package/lib/cjs/queries/IRProjection.d.ts +0 -39
- package/lib/cjs/queries/IRProjection.js +0 -105
- package/lib/cjs/queries/IRProjection.js.map +0 -1
- package/lib/cjs/queries/IntermediateRepresentation.d.ts +0 -282
- package/lib/cjs/queries/IntermediateRepresentation.js +0 -3
- package/lib/cjs/queries/IntermediateRepresentation.js.map +0 -1
- package/lib/cjs/queries/MutationQuery.d.ts +0 -50
- package/lib/cjs/queries/MutationQuery.js +0 -334
- package/lib/cjs/queries/MutationQuery.js.map +0 -1
- package/lib/cjs/queries/MutationSerialization.d.ts +0 -102
- package/lib/cjs/queries/MutationSerialization.js +0 -207
- package/lib/cjs/queries/MutationSerialization.js.map +0 -1
- package/lib/cjs/queries/MutationThenable.d.ts +0 -18
- package/lib/cjs/queries/MutationThenable.js +0 -32
- package/lib/cjs/queries/MutationThenable.js.map +0 -1
- package/lib/cjs/queries/PropertyPath.d.ts +0 -38
- package/lib/cjs/queries/PropertyPath.js +0 -82
- package/lib/cjs/queries/PropertyPath.js.map +0 -1
- package/lib/cjs/queries/ProxiedPathBuilder.d.ts +0 -14
- package/lib/cjs/queries/ProxiedPathBuilder.js +0 -29
- package/lib/cjs/queries/ProxiedPathBuilder.js.map +0 -1
- package/lib/cjs/queries/QueryBuilder.d.ts +0 -193
- package/lib/cjs/queries/QueryBuilder.js +0 -519
- package/lib/cjs/queries/QueryBuilder.js.map +0 -1
- package/lib/cjs/queries/QueryBuilderSerialization.d.ts +0 -31
- package/lib/cjs/queries/QueryBuilderSerialization.js +0 -68
- package/lib/cjs/queries/QueryBuilderSerialization.js.map +0 -1
- package/lib/cjs/queries/QueryContext.d.ts +0 -50
- package/lib/cjs/queries/QueryContext.js +0 -147
- package/lib/cjs/queries/QueryContext.js.map +0 -1
- package/lib/cjs/queries/QueryFactory.d.ts +0 -80
- package/lib/cjs/queries/QueryFactory.js +0 -21
- package/lib/cjs/queries/QueryFactory.js.map +0 -1
- package/lib/cjs/queries/SelectQuery.d.ts +0 -302
- package/lib/cjs/queries/SelectQuery.js +0 -761
- package/lib/cjs/queries/SelectQuery.js.map +0 -1
- package/lib/cjs/queries/UpdateBuilder.d.ts +0 -69
- package/lib/cjs/queries/UpdateBuilder.js +0 -199
- package/lib/cjs/queries/UpdateBuilder.js.map +0 -1
- package/lib/cjs/queries/UpdateQuery.d.ts +0 -18
- package/lib/cjs/queries/UpdateQuery.js +0 -3
- package/lib/cjs/queries/UpdateQuery.js.map +0 -1
- package/lib/cjs/queries/fromJSON.d.ts +0 -16
- package/lib/cjs/queries/fromJSON.js +0 -41
- package/lib/cjs/queries/fromJSON.js.map +0 -1
- package/lib/cjs/queries/lower.d.ts +0 -28
- package/lib/cjs/queries/lower.js +0 -114
- package/lib/cjs/queries/lower.js.map +0 -1
- package/lib/cjs/queries/lowerMutationJSON.d.ts +0 -25
- package/lib/cjs/queries/lowerMutationJSON.js +0 -173
- package/lib/cjs/queries/lowerMutationJSON.js.map +0 -1
- package/lib/cjs/queries/mutationLowerSpec.d.ts +0 -32
- package/lib/cjs/queries/mutationLowerSpec.js +0 -8
- package/lib/cjs/queries/mutationLowerSpec.js.map +0 -1
- package/lib/cjs/queries/queryDispatch.d.ts +0 -33
- package/lib/cjs/queries/queryDispatch.js +0 -33
- package/lib/cjs/queries/queryDispatch.js.map +0 -1
- package/lib/cjs/queries/resolveShape.d.ts +0 -10
- package/lib/cjs/queries/resolveShape.js +0 -23
- package/lib/cjs/queries/resolveShape.js.map +0 -1
- package/lib/cjs/queries/wireVersion.d.ts +0 -7
- package/lib/cjs/queries/wireVersion.js +0 -25
- package/lib/cjs/queries/wireVersion.js.map +0 -1
- package/lib/cjs/shapes/List.d.ts +0 -35
- package/lib/cjs/shapes/List.js +0 -72
- package/lib/cjs/shapes/List.js.map +0 -1
- package/lib/cjs/shapes/PathNode.d.ts +0 -20
- package/lib/cjs/shapes/PathNode.js +0 -68
- package/lib/cjs/shapes/PathNode.js.map +0 -1
- package/lib/cjs/shapes/SHACL.d.ts +0 -300
- package/lib/cjs/shapes/SHACL.js +0 -612
- package/lib/cjs/shapes/SHACL.js.map +0 -1
- package/lib/cjs/shapes/Shape.d.ts +0 -74
- package/lib/cjs/shapes/Shape.js +0 -124
- package/lib/cjs/shapes/Shape.js.map +0 -1
- package/lib/cjs/shapes/serializePathToNodeData.d.ts +0 -24
- package/lib/cjs/shapes/serializePathToNodeData.js +0 -67
- package/lib/cjs/shapes/serializePathToNodeData.js.map +0 -1
- package/lib/cjs/shapes/syncShapes.d.ts +0 -38
- package/lib/cjs/shapes/syncShapes.js +0 -214
- package/lib/cjs/shapes/syncShapes.js.map +0 -1
- package/lib/cjs/sparql/SparqlAlgebra.d.ts +0 -190
- package/lib/cjs/sparql/SparqlAlgebra.js +0 -4
- package/lib/cjs/sparql/SparqlAlgebra.js.map +0 -1
- package/lib/cjs/sparql/SparqlDataset.d.ts +0 -60
- package/lib/cjs/sparql/SparqlDataset.js +0 -117
- package/lib/cjs/sparql/SparqlDataset.js.map +0 -1
- package/lib/cjs/sparql/algebraToString.d.ts +0 -13
- package/lib/cjs/sparql/algebraToString.js +0 -385
- package/lib/cjs/sparql/algebraToString.js.map +0 -1
- package/lib/cjs/sparql/index.d.ts +0 -9
- package/lib/cjs/sparql/index.js +0 -41
- package/lib/cjs/sparql/index.js.map +0 -1
- package/lib/cjs/sparql/irToAlgebra.d.ts +0 -79
- package/lib/cjs/sparql/irToAlgebra.js +0 -2042
- package/lib/cjs/sparql/irToAlgebra.js.map +0 -1
- package/lib/cjs/sparql/resultMapping.d.ts +0 -36
- package/lib/cjs/sparql/resultMapping.js +0 -563
- package/lib/cjs/sparql/resultMapping.js.map +0 -1
- package/lib/cjs/sparql/sparqlUtils.d.ts +0 -53
- package/lib/cjs/sparql/sparqlUtils.js +0 -154
- package/lib/cjs/sparql/sparqlUtils.js.map +0 -1
- package/lib/cjs/utils/LinkedErrorLogging.d.ts +0 -13
- package/lib/cjs/utils/LinkedErrorLogging.js +0 -22
- package/lib/cjs/utils/LinkedErrorLogging.js.map +0 -1
- package/lib/cjs/utils/LinkedFileStorage.d.ts +0 -23
- package/lib/cjs/utils/LinkedFileStorage.js +0 -62
- package/lib/cjs/utils/LinkedFileStorage.js.map +0 -1
- package/lib/cjs/utils/LinkedStorage.d.ts +0 -40
- package/lib/cjs/utils/LinkedStorage.js +0 -148
- package/lib/cjs/utils/LinkedStorage.js.map +0 -1
- package/lib/cjs/utils/NameSpace.d.ts +0 -2
- package/lib/cjs/utils/NameSpace.js +0 -8
- package/lib/cjs/utils/NameSpace.js.map +0 -1
- package/lib/cjs/utils/NodeReference.d.ts +0 -30
- package/lib/cjs/utils/NodeReference.js +0 -54
- package/lib/cjs/utils/NodeReference.js.map +0 -1
- package/lib/cjs/utils/Package.d.ts +0 -153
- package/lib/cjs/utils/Package.js +0 -419
- package/lib/cjs/utils/Package.js.map +0 -1
- package/lib/cjs/utils/Prefix.d.ts +0 -22
- package/lib/cjs/utils/Prefix.js +0 -104
- package/lib/cjs/utils/Prefix.js.map +0 -1
- package/lib/cjs/utils/ShapeClass.d.ts +0 -30
- package/lib/cjs/utils/ShapeClass.js +0 -180
- package/lib/cjs/utils/ShapeClass.js.map +0 -1
- package/lib/cjs/utils/URI.d.ts +0 -18
- package/lib/cjs/utils/URI.js +0 -42
- package/lib/cjs/utils/URI.js.map +0 -1
- package/lib/cjs/utils/cached.d.ts +0 -14
- package/lib/cjs/utils/cached.js +0 -71
- package/lib/cjs/utils/cached.js.map +0 -1
- package/lib/cjs/utils/loadStores.d.ts +0 -34
- package/lib/cjs/utils/loadStores.js +0 -105
- package/lib/cjs/utils/loadStores.js.map +0 -1
- package/lib/cjs/utils/parseDatasetsConfig.d.ts +0 -49
- package/lib/cjs/utils/parseDatasetsConfig.js +0 -110
- package/lib/cjs/utils/parseDatasetsConfig.js.map +0 -1
- package/lib/esm/package.json +0 -9
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { type NodeReferenceValue } from '../utils/NodeReference.js';
|
|
2
|
-
import { Shape } from './Shape.js';
|
|
3
|
-
import type { PathExpr } from '../paths/PropertyPathExpr.js';
|
|
4
|
-
import { type PropertyPathDecoratorInput } from '../paths/normalizePropertyPath.js';
|
|
5
|
-
/**
|
|
6
|
-
* Default identity root for shape & package IRIs. Public/first-party packages
|
|
7
|
-
* publish under `linked.cm` (arch-02 §Domains). Packages may override per-package
|
|
8
|
-
* via `linkedPackage(name, { baseUri })` — CN injects a workspace-scoped root
|
|
9
|
-
* (`{workspaceSlug}.id.create.now`) for private packages; first-party packages
|
|
10
|
-
* keep this default.
|
|
11
|
-
*/
|
|
12
|
-
export declare const LINKED_DATA_ROOT: string;
|
|
13
|
-
/**
|
|
14
|
-
* Derive the public package slug — the npm package **basename** with the
|
|
15
|
-
* `@scope/` dropped, kebab-cased (arch-02 §Slug rules: `^[a-z0-9]+(?:-[a-z0-9]+)*$`).
|
|
16
|
-
* The package name is the single source of truth; there is no separate slug.
|
|
17
|
-
* `@_linked/core` → `core`, `@linked.cm/blog` → `blog`, `mypkg` → `mypkg`.
|
|
18
|
-
*
|
|
19
|
-
* Both first-party (`@_linked`) and community (`@linked.cm`) packages publish into
|
|
20
|
-
* the one `linked.cm/{shape,pkg}` space, so the basename must be globally unique —
|
|
21
|
-
* enforced by the registry, which reserves the (handful of) first-party names.
|
|
22
|
-
*/
|
|
23
|
-
export declare function packageNameToSlug(packageName: string): string;
|
|
24
|
-
/** Record a package's publish root. Called by `linkedPackage()`. */
|
|
25
|
-
export declare function setPackagePublishConfig(packageName: string, config?: {
|
|
26
|
-
baseUri?: string;
|
|
27
|
-
}): void;
|
|
28
|
-
/** Public/first-party package IRI — arch-02: `{baseUri}pkg/{slug}`. */
|
|
29
|
-
export declare function getPackageUri(packageName: string): string;
|
|
30
|
-
type NodeKindConfig = NodeReferenceValue | NodeReferenceValue[];
|
|
31
|
-
export type PropertyPathInput = PropertyPathDecoratorInput;
|
|
32
|
-
export type PropertyPathInputList = PropertyPathDecoratorInput;
|
|
33
|
-
/** Result object returned by PropertyShape.getResult() and NodeShape.properties. */
|
|
34
|
-
export interface PropertyShapeResult {
|
|
35
|
-
id: string;
|
|
36
|
-
label: string;
|
|
37
|
-
path: PathExpr;
|
|
38
|
-
nodeKind?: NodeReferenceValue;
|
|
39
|
-
datatype?: NodeReferenceValue;
|
|
40
|
-
minCount?: number;
|
|
41
|
-
maxCount?: number;
|
|
42
|
-
name?: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
order?: number;
|
|
45
|
-
group?: string;
|
|
46
|
-
class?: NodeReferenceValue;
|
|
47
|
-
in?: (NodeReferenceValue | string | number | boolean)[];
|
|
48
|
-
equals?: NodeReferenceValue;
|
|
49
|
-
disjoint?: NodeReferenceValue;
|
|
50
|
-
lessThan?: NodeReferenceValue;
|
|
51
|
-
lessThanOrEquals?: NodeReferenceValue;
|
|
52
|
-
hasValue?: NodeReferenceValue | string | number | boolean;
|
|
53
|
-
defaultValue?: unknown;
|
|
54
|
-
sortBy?: PathExpr;
|
|
55
|
-
valueShape?: NodeReferenceValue;
|
|
56
|
-
}
|
|
57
|
-
export interface NodeShapeConfig {
|
|
58
|
-
/**
|
|
59
|
-
* Set to true to close the shape. This means any target node of this shape
|
|
60
|
-
* that has properties outside the defined properties of this shape is invalid.
|
|
61
|
-
*/
|
|
62
|
-
closed?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Optional list of properties that are also permitted in addition to those explicitly listed by this shape.
|
|
65
|
-
*/
|
|
66
|
-
ignoredProperties?: NodeReferenceValue[];
|
|
67
|
-
}
|
|
68
|
-
export interface LiteralPropertyShapeConfig extends PropertyShapeConfig {
|
|
69
|
-
nodeKind?: NodeReferenceValue;
|
|
70
|
-
/**
|
|
71
|
-
* Values of the configured property must be less than the values of this 'lessThan' property.
|
|
72
|
-
* Value is always a property IRI (pair constraint).
|
|
73
|
-
*/
|
|
74
|
-
lessThan?: NodeReferenceValue;
|
|
75
|
-
/**
|
|
76
|
-
* Values of the configured property must be less than or equal the values of this 'lessThanOrEquals' property.
|
|
77
|
-
* Value is always a property IRI (pair constraint).
|
|
78
|
-
*/
|
|
79
|
-
lessThanOrEquals?: NodeReferenceValue;
|
|
80
|
-
/**
|
|
81
|
-
* All values of this property must be higher than this number
|
|
82
|
-
*/
|
|
83
|
-
minExclusive?: number | string;
|
|
84
|
-
/**
|
|
85
|
-
* All values of this property must be higher than or equal this number
|
|
86
|
-
*/
|
|
87
|
-
minInclusive?: number;
|
|
88
|
-
/**
|
|
89
|
-
* All values of this property must be lower than this number
|
|
90
|
-
*/
|
|
91
|
-
maxExclusive?: number;
|
|
92
|
-
/**
|
|
93
|
-
* All values of this property must be lower than or equal this number
|
|
94
|
-
*/
|
|
95
|
-
maxInclusive?: number;
|
|
96
|
-
/**
|
|
97
|
-
* All literal values of this property must at least be this long
|
|
98
|
-
*/
|
|
99
|
-
minLength?: number;
|
|
100
|
-
/**
|
|
101
|
-
* All literal values of this property must at most be this long
|
|
102
|
-
*/
|
|
103
|
-
maxLength?: number;
|
|
104
|
-
/**
|
|
105
|
-
* All literal values of this property must match this regular expression
|
|
106
|
-
*/
|
|
107
|
-
pattern?: RegExp;
|
|
108
|
-
/**
|
|
109
|
-
* All literal values of this property must have one of these languages as their language tag
|
|
110
|
-
*/
|
|
111
|
-
languageIn?: string[];
|
|
112
|
-
/**
|
|
113
|
-
* No pair of values may use the same language tag.
|
|
114
|
-
*/
|
|
115
|
-
uniqueLang?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Each literal value of this property must use this datatype
|
|
118
|
-
*/
|
|
119
|
-
datatype?: NodeReferenceValue;
|
|
120
|
-
/**
|
|
121
|
-
* Each value of the property must occur in this set.
|
|
122
|
-
* Use {id: '...'} for IRI nodes, or plain strings/numbers/booleans for literal values.
|
|
123
|
-
*/
|
|
124
|
-
in?: (NodeReferenceValue | string | number | boolean)[];
|
|
125
|
-
}
|
|
126
|
-
export interface ObjectPropertyShapeConfig extends PropertyShapeConfig {
|
|
127
|
-
nodeKind?: NodeReferenceValue;
|
|
128
|
-
/**
|
|
129
|
-
* Each value of this property must have this class as its rdf:type
|
|
130
|
-
*/
|
|
131
|
-
class?: NodeReferenceValue;
|
|
132
|
-
/**
|
|
133
|
-
* The shape that values of this property path need to confirm to.
|
|
134
|
-
* You need to provide a class that extends Shape.
|
|
135
|
-
*/
|
|
136
|
-
shape?: typeof Shape | [string, string];
|
|
137
|
-
/**
|
|
138
|
-
* Marks this property as *containment* (composition): the value(s) are owned by the subject
|
|
139
|
-
* and the delete/update cascade removes the owned subtree.
|
|
140
|
-
*/
|
|
141
|
-
contains?: boolean;
|
|
142
|
-
}
|
|
143
|
-
export interface PropertyShapeConfig {
|
|
144
|
-
/**
|
|
145
|
-
* The property path of this property shape.
|
|
146
|
-
*/
|
|
147
|
-
path: PropertyPathInputList;
|
|
148
|
-
/**
|
|
149
|
-
* Indicates that this property must exist.
|
|
150
|
-
* Shorthand for minCount=1
|
|
151
|
-
*/
|
|
152
|
-
required?: boolean;
|
|
153
|
-
/**
|
|
154
|
-
* Each value must be of this node type.
|
|
155
|
-
*/
|
|
156
|
-
nodeKind?: NodeKindConfig;
|
|
157
|
-
/**
|
|
158
|
-
* Minimum number of values required
|
|
159
|
-
*/
|
|
160
|
-
minCount?: number;
|
|
161
|
-
/**
|
|
162
|
-
* Maximum number of values allowed
|
|
163
|
-
*/
|
|
164
|
-
maxCount?: number;
|
|
165
|
-
/**
|
|
166
|
-
* Values of the configured property must equal the values of this 'equals' property.
|
|
167
|
-
* Value is always a property IRI (pair constraint).
|
|
168
|
-
*/
|
|
169
|
-
equals?: NodeReferenceValue;
|
|
170
|
-
/**
|
|
171
|
-
* Values of the configured property must differ from the values of this 'disjoint' property.
|
|
172
|
-
* Value is always a property IRI (pair constraint).
|
|
173
|
-
*/
|
|
174
|
-
disjoint?: NodeReferenceValue;
|
|
175
|
-
/**
|
|
176
|
-
* At least one value of this property must equal the given value.
|
|
177
|
-
* Use {id: '...'} for IRI nodes, or a plain string for literal values.
|
|
178
|
-
*/
|
|
179
|
-
hasValue?: NodeReferenceValue | string | number | boolean;
|
|
180
|
-
name?: string;
|
|
181
|
-
description?: string;
|
|
182
|
-
order?: number;
|
|
183
|
-
group?: string;
|
|
184
|
-
/**
|
|
185
|
-
* should correlate to the given datatype or class
|
|
186
|
-
*/
|
|
187
|
-
defaultValue?: unknown;
|
|
188
|
-
/**
|
|
189
|
-
* Each value of the property must occur in this set.
|
|
190
|
-
* Use {id: '...'} for IRI nodes, or plain strings for literal values.
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* in: ['ACTIVE', 'PENDING', 'CLOSED']
|
|
194
|
-
* in: [{id: 'http://example.org/StatusA'}, {id: 'http://example.org/StatusB'}]
|
|
195
|
-
*/
|
|
196
|
-
in?: (NodeReferenceValue | string | number | boolean)[];
|
|
197
|
-
/**
|
|
198
|
-
* Values of the configured property path are sorted by the values of this property path.
|
|
199
|
-
*/
|
|
200
|
-
sortBy?: PropertyPathInputList;
|
|
201
|
-
}
|
|
202
|
-
export interface ParameterConfig {
|
|
203
|
-
optional?: number;
|
|
204
|
-
}
|
|
205
|
-
export declare class NodeShape extends Shape {
|
|
206
|
-
static targetClass: NodeReferenceValue;
|
|
207
|
-
/** One-time keys for missing/invalid `propertyShapes` on superclass static `shape`. */
|
|
208
|
-
private static readonly _warnedMissingPropertyShapesKeys;
|
|
209
|
-
/**
|
|
210
|
-
* Returns `propertyShapes` when it is a real array; otherwise `[]` and logs once per
|
|
211
|
-
* `(ownerClassName, shapeId)` — common when a superclass `static shape` is a plain object
|
|
212
|
-
* or came from another `@_linked/core` copy without field initializers.
|
|
213
|
-
*
|
|
214
|
-
* Label for logs / dedupe keys when walking the shape class chain.
|
|
215
|
-
* Prefer `class.name` (almost always set for `class X {}`); if missing, use the static
|
|
216
|
-
* shape's `id` so diagnostics stay useful without vague "(anonymous)".
|
|
217
|
-
*/
|
|
218
|
-
private static shapeOwnerLabel;
|
|
219
|
-
private static listPropertyShapesSafe;
|
|
220
|
-
private _label?;
|
|
221
|
-
description?: string;
|
|
222
|
-
targetClass?: NodeReferenceValue;
|
|
223
|
-
extends?: NodeReferenceValue;
|
|
224
|
-
/**
|
|
225
|
-
* Composition marker: instances of this shape are *dependent* — they have no
|
|
226
|
-
* independent existence and may be cascade-deleted when reached through a `contains` property.
|
|
227
|
-
*/
|
|
228
|
-
dependent?: boolean;
|
|
229
|
-
/** sh:closed — target nodes with undeclared properties are invalid. */
|
|
230
|
-
closed?: boolean;
|
|
231
|
-
/** sh:ignoredProperties — extra properties permitted when the shape is closed. */
|
|
232
|
-
ignoredProperties?: NodeReferenceValue[];
|
|
233
|
-
private propertyShapes;
|
|
234
|
-
constructor(node?: string | NodeReferenceValue);
|
|
235
|
-
nodeRef?: NodeReferenceValue;
|
|
236
|
-
get label(): string;
|
|
237
|
-
set label(value: string);
|
|
238
|
-
get properties(): PropertyShapeResult[];
|
|
239
|
-
addPropertyShape(propertyShape: PropertyShape): void;
|
|
240
|
-
getPropertyShapes(includeSuperClasses?: boolean): PropertyShape[];
|
|
241
|
-
getUniquePropertyShapes(): PropertyShape[];
|
|
242
|
-
getPropertyShape(label: string, checkSubShapes?: boolean): PropertyShape;
|
|
243
|
-
validateNode(_node?: unknown): boolean;
|
|
244
|
-
equals(other: NodeShape): boolean;
|
|
245
|
-
}
|
|
246
|
-
export declare class PropertyShape extends Shape {
|
|
247
|
-
static targetClass: NodeReferenceValue;
|
|
248
|
-
private _label?;
|
|
249
|
-
path: PathExpr;
|
|
250
|
-
nodeKind?: NodeReferenceValue;
|
|
251
|
-
datatype?: NodeReferenceValue;
|
|
252
|
-
minCount?: number;
|
|
253
|
-
maxCount?: number;
|
|
254
|
-
name?: string;
|
|
255
|
-
description?: string;
|
|
256
|
-
order?: number;
|
|
257
|
-
group?: string;
|
|
258
|
-
class?: NodeReferenceValue;
|
|
259
|
-
in?: (NodeReferenceValue | string | number | boolean)[];
|
|
260
|
-
equalsConstraint?: NodeReferenceValue;
|
|
261
|
-
disjoint?: NodeReferenceValue;
|
|
262
|
-
lessThan?: NodeReferenceValue;
|
|
263
|
-
lessThanOrEquals?: NodeReferenceValue;
|
|
264
|
-
/** Value-range constraints (SHACL sh:minInclusive / sh:maxInclusive / sh:minExclusive / sh:maxExclusive). */
|
|
265
|
-
minInclusive?: number;
|
|
266
|
-
maxInclusive?: number;
|
|
267
|
-
minExclusive?: number | string;
|
|
268
|
-
maxExclusive?: number;
|
|
269
|
-
/** String-length constraints (SHACL sh:minLength / sh:maxLength). */
|
|
270
|
-
minLength?: number;
|
|
271
|
-
maxLength?: number;
|
|
272
|
-
/** Regex constraint (SHACL sh:pattern); serialized as its source string. */
|
|
273
|
-
pattern?: RegExp;
|
|
274
|
-
hasValueConstraint?: NodeReferenceValue | string | number | boolean;
|
|
275
|
-
defaultValue?: unknown;
|
|
276
|
-
sortBy?: PathExpr;
|
|
277
|
-
valueShape?: NodeReferenceValue;
|
|
278
|
-
/**
|
|
279
|
-
* Composition marker: the value(s) of this property are *owned* by the subject.
|
|
280
|
-
* The delete/update cascade follows this edge and removes the owned subtree.
|
|
281
|
-
*/
|
|
282
|
-
contains?: boolean;
|
|
283
|
-
parentNodeShape?: NodeShape;
|
|
284
|
-
constructor();
|
|
285
|
-
get label(): string;
|
|
286
|
-
set label(value: string);
|
|
287
|
-
getResult(): PropertyShapeResult;
|
|
288
|
-
clone(): this;
|
|
289
|
-
}
|
|
290
|
-
export declare function registerPropertyShape(shape: NodeShape, propertyShape: PropertyShape): PropertyShape;
|
|
291
|
-
export declare function createPropertyShape<Config extends LiteralPropertyShapeConfig | ObjectPropertyShapeConfig>(config: Config, propertyKey: string, defaultNodeKind?: NodeReferenceValue, shapeClass?: typeof Shape | [string, string]): PropertyShape;
|
|
292
|
-
export declare function onShapeSetup(shapeClass: typeof Shape | [string, string], callback: (shape: NodeShape) => void, propertyName?: string, waitForSuperShapes?: boolean): void;
|
|
293
|
-
export declare const literalProperty: (config: LiteralPropertyShapeConfig) => (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
|
|
294
|
-
export declare const objectProperty: (config: ObjectPropertyShapeConfig) => (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
|
|
295
|
-
export declare const linkedProperty: (config: ObjectPropertyShapeConfig | LiteralPropertyShapeConfig) => (target: any, propertyKey: string, _descriptor: PropertyDescriptor) => void;
|
|
296
|
-
export declare function disallowProperty(target: any, propertyKey: string, _descriptor: PropertyDescriptor): void;
|
|
297
|
-
export declare function getNodeShapeUri(packageName: string, shapeName: string): string;
|
|
298
|
-
export declare function getAndClearCallbacks(nodeShapeId: string): ((shape: NodeShape) => void)[];
|
|
299
|
-
export declare const addNodeShapeCallback: (nodeShapeId: string, callback: (shape: NodeShape) => void) => void;
|
|
300
|
-
export {};
|