@rdfx/builder 0.0.43 → 0.0.45

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/dist/builder.d.ts CHANGED
@@ -1,15 +1,14 @@
1
1
  import type { NamespaceBuilder } from "@rdfjs/namespace";
2
2
  import type { BlankNode, NamedNode } from "@rdfjs/types";
3
- import type { IriLike } from "./IriLike.js";
4
3
  export declare function builder<DefaultNamespaceT extends NamespaceBuilder = NamespaceBuilder>(options?: {
5
4
  defaultNamespace?: DefaultNamespaceT;
6
5
  }): {
7
6
  sh: {
8
7
  namespace: NamespaceBuilder<keyof typeof import("@tpluscode/rdf-ns-builders").sh>;
9
- NodeShape: ($identifier: BlankNode | NamedNode<string> | (keyof DefaultNamespaceT & string) | Exclude<keyof DefaultNamespaceT & string, string | (() => import("./shapes.js").sh_NodeShape.Identifier)> | undefined, parameters?: (Omit<{
8
+ NodeShape: ($identifier: BlankNode | NamedNode<string> | (keyof DefaultNamespaceT & string) | undefined, parameters?: (Omit<{
10
9
  readonly $defaultNamespace?: DefaultNamespaceT | undefined;
11
10
  readonly $identifier?: BlankNode | NamedNode<string> | (() => import("./shapes.js").sh_NodeShape.Identifier) | (keyof DefaultNamespaceT & string) | undefined;
12
- readonly and?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
11
+ readonly and?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
13
12
  readonly class_?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
14
13
  readonly closed?: boolean | import("purify-ts").Maybe<boolean>;
15
14
  readonly comment?: string | import("purify-ts").Maybe<string>;
@@ -23,7 +22,7 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
23
22
  readonly ignore?: boolean;
24
23
  readonly ignoredProperties?: import("purify-ts").Maybe<readonly NamedNode<string>[]> | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
25
24
  readonly in_?: readonly (NamedNode | import("@rdfjs/types").Literal)[] | import("purify-ts").Maybe<readonly (NamedNode | import("@rdfjs/types").Literal)[]>;
26
- readonly isDefinedBy?: (NamedNode | import("./shapes.js").owl_Ontology) | import("purify-ts").Maybe<NamedNode | import("./shapes.js").owl_Ontology>;
25
+ readonly isDefinedBy?: NamedNode<string> | import("./shapes.js").owl_Ontology | import("purify-ts").Maybe<NamedNode<string> | import("./shapes.js").owl_Ontology> | (keyof DefaultNamespaceT & string) | undefined;
27
26
  readonly label?: string | import("purify-ts").Maybe<string>;
28
27
  readonly languageIn?: readonly string[] | import("purify-ts").Maybe<readonly string[]>;
29
28
  readonly maxExclusive?: bigint | boolean | number | string | Date | import("@rdfjs/types").Literal | import("purify-ts").Maybe<import("@rdfjs/types").Literal>;
@@ -34,12 +33,12 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
34
33
  readonly minInclusive?: bigint | boolean | number | string | Date | import("@rdfjs/types").Literal | import("purify-ts").Maybe<import("@rdfjs/types").Literal>;
35
34
  readonly minLength?: bigint | import("purify-ts").Maybe<bigint>;
36
35
  readonly mutable?: boolean | import("purify-ts").Maybe<boolean>;
37
- readonly node?: (NamedNode | import("./shapes.js").sh_NodeShape) | import("purify-ts").Maybe<NamedNode | import("./shapes.js").sh_NodeShape>;
36
+ readonly node?: NamedNode<string> | import("./shapes.js").sh_NodeShape | import("purify-ts").Maybe<NamedNode<string> | import("./shapes.js").sh_NodeShape> | (keyof DefaultNamespaceT & string) | undefined;
38
37
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | import("purify-ts").Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
39
- readonly not?: (NamedNode | import("./shapes.js").sh_NodeShape) | readonly (NamedNode | import("./shapes.js").sh_NodeShape)[];
40
- readonly or?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
38
+ readonly not?: NamedNode<string> | import("./shapes.js").sh_NodeShape | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").sh_NodeShape | (keyof DefaultNamespaceT & string))[] | undefined;
39
+ readonly or?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
41
40
  readonly pattern?: string | import("purify-ts").Maybe<string>;
42
- readonly properties?: (NamedNode | import("./shapes.js").sh_PropertyShape) | readonly (NamedNode | import("./shapes.js").sh_PropertyShape)[];
41
+ readonly properties?: NamedNode<string> | import("./shapes.js").sh_PropertyShape | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").sh_PropertyShape | (keyof DefaultNamespaceT & string))[] | undefined;
43
42
  readonly rdfType?: NamedNode<string> | import("purify-ts").Maybe<NamedNode<string>> | (keyof DefaultNamespaceT & string) | undefined;
44
43
  readonly severity?: import("./shapes.js").sh_Severity["value"] | import("./shapes.js").sh_Severity | import("purify-ts").Maybe<import("./shapes.js").sh_Severity>;
45
44
  readonly shaclmateName?: string | import("purify-ts").Maybe<string>;
@@ -51,15 +50,15 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
51
50
  readonly toRdfTypes?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
52
51
  readonly tsImports?: string | readonly string[];
53
52
  readonly type?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
54
- readonly xone?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
55
- }, "$identifier" | "shaclmateName" | "in_" | "nodeKind" | "properties" | "type" | "xone"> & {
53
+ readonly xone?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
54
+ }, "$identifier" | "shaclmateName" | "in_" | "nodeKind" | "properties"> & {
56
55
  readonly in_?: import("./shapes.js").skos_ConceptScheme | readonly (string | number | bigint | boolean | import("@rdfjs/types").Literal | Date | NamedNode<string>)[];
57
56
  readonly implicitClassTarget?: true;
58
57
  readonly nodeKind?: ((NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNode">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#Literal">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#IRI">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral">)) | ("BlankNode" | "Literal" | "BlankNodeOrIRI" | "BlankNodeOrLiteral" | "IRI" | "IRIOrLiteral");
59
58
  readonly properties?: Record<string, Omit<Omit<{
60
59
  readonly $defaultNamespace?: DefaultNamespaceT | undefined;
61
60
  readonly $identifier?: BlankNode | NamedNode<string> | (() => import("./shapes.js").sh_PropertyShape.Identifier) | (keyof DefaultNamespaceT & string) | undefined;
62
- readonly and?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
61
+ readonly and?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
63
62
  readonly class_?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
64
63
  readonly comment?: string | import("purify-ts").Maybe<string>;
65
64
  readonly datatype?: NamedNode<string> | import("purify-ts").Maybe<NamedNode<string>> | (keyof DefaultNamespaceT & string) | undefined;
@@ -70,11 +69,11 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
70
69
  readonly display?: boolean;
71
70
  readonly equals?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
72
71
  readonly flags?: string | import("purify-ts").Maybe<string>;
73
- readonly groups?: (NamedNode | import("./shapes.js").sh_PropertyGroup) | readonly (NamedNode | import("./shapes.js").sh_PropertyGroup)[];
72
+ readonly groups?: NamedNode<string> | import("./shapes.js").sh_PropertyGroup | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").sh_PropertyGroup | (keyof DefaultNamespaceT & string))[] | undefined;
74
73
  readonly hasValues?: (NamedNode | import("@rdfjs/types").Literal) | readonly (NamedNode | import("@rdfjs/types").Literal)[];
75
74
  readonly ignore?: boolean;
76
75
  readonly in_?: readonly (NamedNode | import("@rdfjs/types").Literal)[] | import("purify-ts").Maybe<readonly (NamedNode | import("@rdfjs/types").Literal)[]>;
77
- readonly isDefinedBy?: (NamedNode | import("./shapes.js").owl_Ontology) | import("purify-ts").Maybe<NamedNode | import("./shapes.js").owl_Ontology>;
76
+ readonly isDefinedBy?: NamedNode<string> | import("./shapes.js").owl_Ontology | import("purify-ts").Maybe<NamedNode<string> | import("./shapes.js").owl_Ontology> | (keyof DefaultNamespaceT & string) | undefined;
78
77
  readonly label?: string | import("purify-ts").Maybe<string>;
79
78
  readonly languageIn?: readonly string[] | import("purify-ts").Maybe<readonly string[]>;
80
79
  readonly lessThan?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
@@ -90,10 +89,10 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
90
89
  readonly minLength?: bigint | import("purify-ts").Maybe<bigint>;
91
90
  readonly mutable?: boolean | import("purify-ts").Maybe<boolean>;
92
91
  readonly name?: string | import("purify-ts").Maybe<string>;
93
- readonly node?: (NamedNode | import("./shapes.js").sh_NodeShape) | import("purify-ts").Maybe<NamedNode | import("./shapes.js").sh_NodeShape>;
92
+ readonly node?: NamedNode<string> | import("./shapes.js").sh_NodeShape | import("purify-ts").Maybe<NamedNode<string> | import("./shapes.js").sh_NodeShape> | (keyof DefaultNamespaceT & string) | undefined;
94
93
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | import("purify-ts").Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
95
- readonly not?: (NamedNode | import("./shapes.js").sh_NodeShape) | readonly (NamedNode | import("./shapes.js").sh_NodeShape)[];
96
- readonly or?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
94
+ readonly not?: NamedNode<string> | import("./shapes.js").sh_NodeShape | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").sh_NodeShape | (keyof DefaultNamespaceT & string))[] | undefined;
95
+ readonly or?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
97
96
  readonly order?: number | import("purify-ts").Maybe<number>;
98
97
  readonly path: import("./shapes.js").$PropertyPath;
99
98
  readonly pattern?: string | import("purify-ts").Maybe<string>;
@@ -109,26 +108,22 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
109
108
  readonly targetObjectsOf?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
110
109
  readonly targetSubjectsOf?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
111
110
  readonly uniqueLang?: boolean | import("purify-ts").Maybe<boolean>;
112
- readonly xone?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
113
- }, "$identifier" | "path" | "in_" | "node" | "nodeKind" | "xone" | "maxCount" | "minCount"> & {
111
+ readonly xone?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
112
+ }, "$identifier" | "path" | "in_" | "nodeKind" | "maxCount" | "minCount"> & {
114
113
  readonly cardinality?: "optional" | "required" | "set";
115
114
  readonly in_?: import("./shapes.js").skos_ConceptScheme | readonly (string | number | bigint | boolean | import("@rdfjs/types").Literal | Date | NamedNode<string>)[];
116
- readonly node?: NamedNode<string> | (keyof DefaultNamespaceT & string) | undefined;
117
115
  readonly nodeKind?: ((NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNode">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#Literal">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#IRI">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral">)) | ("BlankNode" | "Literal" | "BlankNodeOrIRI" | "BlankNodeOrLiteral" | "IRI" | "IRIOrLiteral");
118
116
  readonly path?: import("@rdfx/resource").PropertyPath | (keyof DefaultNamespaceT & string) | undefined;
119
- readonly xone?: readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
120
117
  }, "$identifier" | "path"> & {
121
- readonly $identifier?: BlankNode | NamedNode<string> | (keyof DefaultNamespaceT & string) | Exclude<keyof DefaultNamespaceT & string, string | (() => import("./shapes.js").sh_PropertyShape.Identifier)> | undefined;
118
+ readonly $identifier?: BlankNode | NamedNode<string> | (keyof DefaultNamespaceT & string) | undefined;
122
119
  readonly path?: import("@rdfx/resource").PropertyPath | (keyof DefaultNamespaceT & string) | undefined;
123
120
  }> | readonly (import("./shapes.js").sh_PropertyShape | (keyof DefaultNamespaceT & string) | NamedNode<string>)[] | undefined;
124
- readonly type?: IriLike<DefaultNamespaceT> | readonly IriLike<DefaultNamespaceT>[] | undefined;
125
121
  readonly shaclmateName?: string;
126
- readonly xone?: readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
127
122
  }) | undefined) => import("./shapes.js").sh_NodeShape;
128
- PropertyShape: ($identifier: BlankNode | NamedNode<string> | (keyof DefaultNamespaceT & string) | Exclude<keyof DefaultNamespaceT & string, string | (() => import("./shapes.js").sh_PropertyShape.Identifier)> | undefined, parameters?: (Omit<{
123
+ PropertyShape: ($identifier: BlankNode | NamedNode<string> | (keyof DefaultNamespaceT & string) | undefined, parameters?: (Omit<{
129
124
  readonly $defaultNamespace?: DefaultNamespaceT | undefined;
130
125
  readonly $identifier?: BlankNode | NamedNode<string> | (() => import("./shapes.js").sh_PropertyShape.Identifier) | (keyof DefaultNamespaceT & string) | undefined;
131
- readonly and?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
126
+ readonly and?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
132
127
  readonly class_?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
133
128
  readonly comment?: string | import("purify-ts").Maybe<string>;
134
129
  readonly datatype?: NamedNode<string> | import("purify-ts").Maybe<NamedNode<string>> | (keyof DefaultNamespaceT & string) | undefined;
@@ -139,11 +134,11 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
139
134
  readonly display?: boolean;
140
135
  readonly equals?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
141
136
  readonly flags?: string | import("purify-ts").Maybe<string>;
142
- readonly groups?: (NamedNode | import("./shapes.js").sh_PropertyGroup) | readonly (NamedNode | import("./shapes.js").sh_PropertyGroup)[];
137
+ readonly groups?: NamedNode<string> | import("./shapes.js").sh_PropertyGroup | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").sh_PropertyGroup | (keyof DefaultNamespaceT & string))[] | undefined;
143
138
  readonly hasValues?: (NamedNode | import("@rdfjs/types").Literal) | readonly (NamedNode | import("@rdfjs/types").Literal)[];
144
139
  readonly ignore?: boolean;
145
140
  readonly in_?: readonly (NamedNode | import("@rdfjs/types").Literal)[] | import("purify-ts").Maybe<readonly (NamedNode | import("@rdfjs/types").Literal)[]>;
146
- readonly isDefinedBy?: (NamedNode | import("./shapes.js").owl_Ontology) | import("purify-ts").Maybe<NamedNode | import("./shapes.js").owl_Ontology>;
141
+ readonly isDefinedBy?: NamedNode<string> | import("./shapes.js").owl_Ontology | import("purify-ts").Maybe<NamedNode<string> | import("./shapes.js").owl_Ontology> | (keyof DefaultNamespaceT & string) | undefined;
147
142
  readonly label?: string | import("purify-ts").Maybe<string>;
148
143
  readonly languageIn?: readonly string[] | import("purify-ts").Maybe<readonly string[]>;
149
144
  readonly lessThan?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
@@ -159,10 +154,10 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
159
154
  readonly minLength?: bigint | import("purify-ts").Maybe<bigint>;
160
155
  readonly mutable?: boolean | import("purify-ts").Maybe<boolean>;
161
156
  readonly name?: string | import("purify-ts").Maybe<string>;
162
- readonly node?: (NamedNode | import("./shapes.js").sh_NodeShape) | import("purify-ts").Maybe<NamedNode | import("./shapes.js").sh_NodeShape>;
157
+ readonly node?: NamedNode<string> | import("./shapes.js").sh_NodeShape | import("purify-ts").Maybe<NamedNode<string> | import("./shapes.js").sh_NodeShape> | (keyof DefaultNamespaceT & string) | undefined;
163
158
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | import("purify-ts").Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
164
- readonly not?: (NamedNode | import("./shapes.js").sh_NodeShape) | readonly (NamedNode | import("./shapes.js").sh_NodeShape)[];
165
- readonly or?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
159
+ readonly not?: NamedNode<string> | import("./shapes.js").sh_NodeShape | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").sh_NodeShape | (keyof DefaultNamespaceT & string))[] | undefined;
160
+ readonly or?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
166
161
  readonly order?: number | import("purify-ts").Maybe<number>;
167
162
  readonly path: import("./shapes.js").$PropertyPath;
168
163
  readonly pattern?: string | import("purify-ts").Maybe<string>;
@@ -178,14 +173,12 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
178
173
  readonly targetObjectsOf?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
179
174
  readonly targetSubjectsOf?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
180
175
  readonly uniqueLang?: boolean | import("purify-ts").Maybe<boolean>;
181
- readonly xone?: readonly (NamedNode | import("./shapes.js").sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | import("./shapes.js").sh_Shape)[]>;
182
- }, "$identifier" | "path" | "in_" | "node" | "nodeKind" | "xone" | "maxCount" | "minCount"> & {
176
+ readonly xone?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
177
+ }, "$identifier" | "path" | "in_" | "nodeKind" | "maxCount" | "minCount"> & {
183
178
  readonly cardinality?: "optional" | "required" | "set";
184
179
  readonly in_?: import("./shapes.js").skos_ConceptScheme | readonly (string | number | bigint | boolean | import("@rdfjs/types").Literal | Date | NamedNode<string>)[];
185
- readonly node?: NamedNode<string> | (keyof DefaultNamespaceT & string) | undefined;
186
180
  readonly nodeKind?: ((NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNode">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#Literal">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#IRI">) | (NamedNode<string> & NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral">)) | ("BlankNode" | "Literal" | "BlankNodeOrIRI" | "BlankNodeOrLiteral" | "IRI" | "IRIOrLiteral");
187
181
  readonly path?: import("@rdfx/resource").PropertyPath | (keyof DefaultNamespaceT & string) | undefined;
188
- readonly xone?: readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
189
182
  }) | undefined) => ReturnType<typeof import("./shapes.js").sh_PropertyShape.createUnsafe>;
190
183
  };
191
184
  skos: {
@@ -199,12 +192,12 @@ export declare function builder<DefaultNamespaceT extends NamespaceBuilder = Nam
199
192
  readonly $defaultNamespace?: DefaultNamespaceT | undefined;
200
193
  readonly $identifier: NamedNode<string> | (() => import("./shapes.js").skos_ConceptScheme.Identifier) | (keyof DefaultNamespaceT & string);
201
194
  readonly altLabel?: string | import("@rdfjs/types").Literal | readonly (string | import("@rdfjs/types").Literal)[];
202
- readonly concepts?: (NamedNode | import("./shapes.js").skos_Concept) | readonly (NamedNode | import("./shapes.js").skos_Concept)[];
195
+ readonly concepts?: NamedNode<string> | import("./shapes.js").skos_Concept | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").skos_Concept | (keyof DefaultNamespaceT & string))[] | undefined;
203
196
  readonly definition?: string | import("@rdfjs/types").Literal | readonly (string | import("@rdfjs/types").Literal)[];
204
197
  readonly hiddenLabel?: string | import("@rdfjs/types").Literal | readonly (string | import("@rdfjs/types").Literal)[];
205
198
  readonly notation?: bigint | boolean | number | string | Date | import("@rdfjs/types").Literal | readonly (bigint | boolean | number | string | Date | import("@rdfjs/types").Literal)[];
206
199
  readonly prefLabel?: string | import("@rdfjs/types").Literal | readonly (string | import("@rdfjs/types").Literal)[];
207
- readonly topConcepts?: (NamedNode | import("./shapes.js").skos_Concept) | readonly (NamedNode | import("./shapes.js").skos_Concept)[];
200
+ readonly topConcepts?: NamedNode<string> | import("./shapes.js").skos_Concept | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").skos_Concept | (keyof DefaultNamespaceT & string))[] | undefined;
208
201
  readonly type?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
209
202
  }, "$identifier" | "concepts" | "topConcepts" | "termType"> & {
210
203
  readonly concepts?: ConceptsRecordT | undefined;
package/dist/sh.d.ts CHANGED
@@ -3,21 +3,20 @@ import type { BlankNode, Literal, NamedNode } from "@rdfjs/types";
3
3
  import type { PropertyPath } from "@rdfx/resource";
4
4
  import { sh as _namespace } from "@tpluscode/rdf-ns-builders";
5
5
  import type { BuilderBuilderParameters } from "./BuilderBuilderParameters.js";
6
- import type { IriLike } from "./IriLike.js";
7
- import { sh_NodeShape, sh_PropertyShape, type sh_Shape, type skos_ConceptScheme } from "./shapes.js";
6
+ import { sh_NodeShape, sh_PropertyShape, type skos_ConceptScheme } from "./shapes.js";
8
7
  type ConvertibleInArray = readonly (bigint | boolean | Date | Literal | NamedNode | number | string)[];
9
8
  type NodeKindIri = (typeof _namespace)["BlankNode"] | (typeof _namespace)["BlankNodeOrIRI"] | (typeof _namespace)["BlankNodeOrLiteral"] | (typeof _namespace)["IRI"] | (typeof _namespace)["IRIOrLiteral"] | (typeof _namespace)["Literal"];
10
9
  type NodeKindString = "BlankNode" | "BlankNodeOrIRI" | "BlankNodeOrLiteral" | "IRI" | "IRIOrLiteral" | "Literal";
11
10
  export declare function sh<DefaultNamespaceT extends NamespaceBuilder>({ defaultNamespace, toIdentifier, toIri, toIriArray, }: BuilderBuilderParameters<DefaultNamespaceT>): {
12
11
  namespace: NamespaceBuilder<keyof typeof _namespace>;
13
- NodeShape: ($identifier: Exclude<NonNullable<Parameters<typeof sh_NodeShape.createUnsafe<DefaultNamespaceT>>[0]>["$identifier"], string | (() => sh_NodeShape.Identifier)> | (keyof DefaultNamespaceT & string), parameters?: Omit<NonNullable<Parameters<typeof sh_NodeShape.createUnsafe<DefaultNamespaceT>>[0]>, "$identifier" | "in_" | "nodeKind" | "properties" | "shaclmateName" | "type" | "xone"> & {
12
+ NodeShape: ($identifier: BlankNode | (keyof DefaultNamespaceT & string) | NamedNode | undefined, parameters?: Omit<NonNullable<Parameters<typeof sh_NodeShape.createUnsafe<DefaultNamespaceT>>[0]>, "$identifier" | "in_" | "nodeKind" | "properties" | "shaclmateName"> & {
14
13
  readonly in_?: skos_ConceptScheme | ConvertibleInArray;
15
14
  readonly implicitClassTarget?: true;
16
15
  readonly nodeKind?: NodeKindIri | NodeKindString;
17
16
  readonly properties?: Record<string, Omit<Omit<{
18
17
  readonly $defaultNamespace?: DefaultNamespaceT | undefined;
19
18
  readonly $identifier?: BlankNode | NamedNode<string> | (() => sh_PropertyShape.Identifier) | (keyof DefaultNamespaceT & string) | undefined;
20
- readonly and?: readonly (NamedNode | sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | sh_Shape)[]>;
19
+ readonly and?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
21
20
  readonly class_?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
22
21
  readonly comment?: string | import("purify-ts").Maybe<string>;
23
22
  readonly datatype?: NamedNode<string> | import("purify-ts").Maybe<NamedNode<string>> | (keyof DefaultNamespaceT & string) | undefined;
@@ -28,11 +27,11 @@ export declare function sh<DefaultNamespaceT extends NamespaceBuilder>({ default
28
27
  readonly display?: boolean;
29
28
  readonly equals?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
30
29
  readonly flags?: string | import("purify-ts").Maybe<string>;
31
- readonly groups?: (NamedNode | import("./shapes.js").sh_PropertyGroup) | readonly (NamedNode | import("./shapes.js").sh_PropertyGroup)[];
30
+ readonly groups?: NamedNode<string> | import("./shapes.js").sh_PropertyGroup | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | import("./shapes.js").sh_PropertyGroup | (keyof DefaultNamespaceT & string))[] | undefined;
32
31
  readonly hasValues?: (NamedNode | Literal) | readonly (NamedNode | Literal)[];
33
32
  readonly ignore?: boolean;
34
33
  readonly in_?: readonly (NamedNode | Literal)[] | import("purify-ts").Maybe<readonly (NamedNode | Literal)[]>;
35
- readonly isDefinedBy?: (NamedNode | import("./shapes.js").owl_Ontology) | import("purify-ts").Maybe<NamedNode | import("./shapes.js").owl_Ontology>;
34
+ readonly isDefinedBy?: NamedNode<string> | import("./shapes.js").owl_Ontology | import("purify-ts").Maybe<NamedNode<string> | import("./shapes.js").owl_Ontology> | (keyof DefaultNamespaceT & string) | undefined;
36
35
  readonly label?: string | import("purify-ts").Maybe<string>;
37
36
  readonly languageIn?: readonly string[] | import("purify-ts").Maybe<readonly string[]>;
38
37
  readonly lessThan?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
@@ -48,10 +47,10 @@ export declare function sh<DefaultNamespaceT extends NamespaceBuilder>({ default
48
47
  readonly minLength?: bigint | import("purify-ts").Maybe<bigint>;
49
48
  readonly mutable?: boolean | import("purify-ts").Maybe<boolean>;
50
49
  readonly name?: string | import("purify-ts").Maybe<string>;
51
- readonly node?: (NamedNode | sh_NodeShape) | import("purify-ts").Maybe<NamedNode | sh_NodeShape>;
50
+ readonly node?: NamedNode<string> | sh_NodeShape | import("purify-ts").Maybe<NamedNode<string> | sh_NodeShape> | (keyof DefaultNamespaceT & string) | undefined;
52
51
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | import("purify-ts").Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
53
- readonly not?: (NamedNode | sh_NodeShape) | readonly (NamedNode | sh_NodeShape)[];
54
- readonly or?: readonly (NamedNode | sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | sh_Shape)[]>;
52
+ readonly not?: NamedNode<string> | sh_NodeShape | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | sh_NodeShape | (keyof DefaultNamespaceT & string))[] | undefined;
53
+ readonly or?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
55
54
  readonly order?: number | import("purify-ts").Maybe<number>;
56
55
  readonly path: import("./shapes.js").$PropertyPath;
57
56
  readonly pattern?: string | import("purify-ts").Maybe<string>;
@@ -67,36 +66,28 @@ export declare function sh<DefaultNamespaceT extends NamespaceBuilder>({ default
67
66
  readonly targetObjectsOf?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
68
67
  readonly targetSubjectsOf?: NamedNode<string> | (keyof DefaultNamespaceT & string) | readonly (NamedNode<string> | (keyof DefaultNamespaceT & string))[] | undefined;
69
68
  readonly uniqueLang?: boolean | import("purify-ts").Maybe<boolean>;
70
- readonly xone?: readonly (NamedNode | sh_Shape)[] | import("purify-ts").Maybe<readonly (NamedNode | sh_Shape)[]>;
71
- }, "$identifier" | "path" | "in_" | "node" | "nodeKind" | "xone" | "maxCount" | "minCount"> & {
69
+ readonly xone?: import("purify-ts").Maybe<readonly (NamedNode<string> | import("./shapes.js").sh_Shape)[]> | readonly (NamedNode<string> | import("./shapes.js").sh_Shape | (keyof DefaultNamespaceT & string))[] | undefined;
70
+ }, "$identifier" | "path" | "in_" | "nodeKind" | "maxCount" | "minCount"> & {
72
71
  readonly cardinality?: "optional" | "required" | "set";
73
72
  readonly in_?: skos_ConceptScheme | ConvertibleInArray;
74
- readonly node?: NamedNode | (keyof DefaultNamespaceT & string);
75
73
  readonly nodeKind?: NodeKindIri | NodeKindString;
76
74
  readonly path?: (keyof DefaultNamespaceT & string) | PropertyPath;
77
- readonly xone?: readonly (NamedNode | (keyof DefaultNamespaceT & string) | sh_Shape)[];
78
75
  }, "$identifier" | "path"> & {
79
- readonly $identifier?: Parameters<($identifier: Exclude<NonNullable<Parameters<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>[0]>["$identifier"], string | (() => sh_PropertyShape.Identifier)> | (keyof DefaultNamespaceT & string), parameters?: Omit<NonNullable<Parameters<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>[0]>, "$identifier" | "in_" | "maxCount" | "minCount" | "node" | "nodeKind" | "path" | "xone"> & {
76
+ readonly $identifier?: Parameters<($identifier: BlankNode | (keyof DefaultNamespaceT & string) | NamedNode | undefined, parameters?: Omit<NonNullable<Parameters<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>[0]>, "$identifier" | "in_" | "maxCount" | "minCount" | "nodeKind" | "path"> & {
80
77
  readonly cardinality?: "optional" | "required" | "set";
81
78
  readonly in_?: skos_ConceptScheme | ConvertibleInArray;
82
- readonly node?: NamedNode | (keyof DefaultNamespaceT & string);
83
79
  readonly nodeKind?: NodeKindIri | NodeKindString;
84
80
  readonly path?: (keyof DefaultNamespaceT & string) | PropertyPath;
85
- readonly xone?: readonly (NamedNode | (keyof DefaultNamespaceT & string) | sh_Shape)[];
86
81
  }) => ReturnType<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>>[0];
87
82
  readonly path?: (keyof DefaultNamespaceT & string) | PropertyPath;
88
83
  }> | readonly (sh_PropertyShape | (keyof DefaultNamespaceT & string) | NamedNode<string>)[];
89
- readonly type?: IriLike<DefaultNamespaceT> | readonly IriLike<DefaultNamespaceT>[];
90
84
  readonly shaclmateName?: string;
91
- readonly xone?: readonly (NamedNode | (keyof DefaultNamespaceT & string) | sh_Shape)[];
92
85
  }) => sh_NodeShape;
93
- PropertyShape: ($identifier: Exclude<NonNullable<Parameters<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>[0]>["$identifier"], string | (() => sh_PropertyShape.Identifier)> | (keyof DefaultNamespaceT & string), parameters?: Omit<NonNullable<Parameters<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>[0]>, "$identifier" | "in_" | "maxCount" | "minCount" | "node" | "nodeKind" | "path" | "xone"> & {
86
+ PropertyShape: ($identifier: BlankNode | (keyof DefaultNamespaceT & string) | NamedNode | undefined, parameters?: Omit<NonNullable<Parameters<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>[0]>, "$identifier" | "in_" | "maxCount" | "minCount" | "nodeKind" | "path"> & {
94
87
  readonly cardinality?: "optional" | "required" | "set";
95
88
  readonly in_?: skos_ConceptScheme | ConvertibleInArray;
96
- readonly node?: NamedNode | (keyof DefaultNamespaceT & string);
97
89
  readonly nodeKind?: NodeKindIri | NodeKindString;
98
90
  readonly path?: (keyof DefaultNamespaceT & string) | PropertyPath;
99
- readonly xone?: readonly (NamedNode | (keyof DefaultNamespaceT & string) | sh_Shape)[];
100
91
  }) => ReturnType<typeof sh_PropertyShape.createUnsafe<DefaultNamespaceT>>;
101
92
  };
102
93
  export {};
package/dist/sh.js CHANGED
@@ -34,7 +34,7 @@ function convertNodeKind(nodeKind) {
34
34
  export function sh({ defaultNamespace, toIdentifier, toIri, toIriArray, }) {
35
35
  function PropertyShape($identifier, parameters) {
36
36
  // Order of default population matters here.
37
- const { cardinality: cardinalityParameter, in_: inParameter, path: pathParameter, node: nodeParameter, nodeKind: nodeKindParameter, xone: xoneParameter, ...otherParameters } = parameters ?? {};
37
+ const { cardinality: cardinalityParameter, in_: inParameter, path: pathParameter, nodeKind: nodeKindParameter, ...otherParameters } = parameters ?? {};
38
38
  const $identifierTerm = toIdentifier($identifier);
39
39
  let path;
40
40
  switch (typeof pathParameter) {
@@ -75,21 +75,17 @@ export function sh({ defaultNamespace, toIdentifier, toIri, toIriArray, }) {
75
75
  in_: convertIn(inParameter),
76
76
  maxCount,
77
77
  minCount,
78
- node: nodeParameter ? toIri(nodeParameter) : undefined,
79
78
  nodeKind: nodeKindParameter
80
79
  ? convertNodeKind(nodeKindParameter)
81
80
  : undefined,
82
81
  path,
83
- xone: xoneParameter
84
- ? xoneParameter.map((xoneMember) => typeof xoneMember === "string" ? toIri(xoneMember) : xoneMember)
85
- : undefined,
86
82
  });
87
83
  }
88
84
  return {
89
85
  namespace: _namespace,
90
86
  NodeShape: ($identifier, parameters) => {
91
87
  const nodeShapeIdentifier = toIdentifier($identifier);
92
- let { implicitClassTarget, in_: inParameter, nodeKind: nodeKindParameter, properties: propertiesParameter, shaclmateName, type: typeParameter, xone: xoneParameter, ...otherParameters } = parameters ?? {};
88
+ let { implicitClassTarget, in_: inParameter, nodeKind: nodeKindParameter, properties: propertiesParameter, shaclmateName, type: typeParameter, ...otherParameters } = parameters ?? {};
93
89
  let properties;
94
90
  if (propertiesParameter) {
95
91
  if (Array.isArray(propertiesParameter)) {
@@ -154,9 +150,6 @@ export function sh({ defaultNamespace, toIdentifier, toIri, toIriArray, }) {
154
150
  properties,
155
151
  shaclmateName,
156
152
  type,
157
- xone: xoneParameter
158
- ? xoneParameter.map((xoneMember) => typeof xoneMember === "string" ? toIri(xoneMember) : xoneMember)
159
- : undefined,
160
153
  });
161
154
  },
162
155
  PropertyShape,
package/dist/shapes.d.ts CHANGED
@@ -195,7 +195,7 @@ export declare namespace sh_NodeShape {
195
195
  const create: <$DefaultNamespaceT extends $NamespaceBuilder = $NamespaceBuilder>(parameters?: {
196
196
  readonly $defaultNamespace?: $DefaultNamespaceT;
197
197
  readonly $identifier?: (() => sh_NodeShape.Identifier) | BlankNode | NamedNode | (keyof $DefaultNamespaceT & string);
198
- readonly and?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
198
+ readonly and?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
199
199
  readonly class_?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
200
200
  readonly closed?: boolean | Maybe<boolean>;
201
201
  readonly comment?: string | Maybe<string>;
@@ -209,7 +209,7 @@ export declare namespace sh_NodeShape {
209
209
  readonly ignore?: boolean;
210
210
  readonly ignoredProperties?: readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[] | Maybe<readonly NamedNode[]>;
211
211
  readonly in_?: readonly (NamedNode | Literal)[] | Maybe<readonly (NamedNode | Literal)[]>;
212
- readonly isDefinedBy?: (NamedNode | owl_Ontology) | Maybe<NamedNode | owl_Ontology>;
212
+ readonly isDefinedBy?: NamedNode | owl_Ontology | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | owl_Ontology>;
213
213
  readonly label?: string | Maybe<string>;
214
214
  readonly languageIn?: readonly string[] | Maybe<readonly string[]>;
215
215
  readonly maxExclusive?: bigint | boolean | number | string | Date | Literal | Maybe<Literal>;
@@ -220,12 +220,12 @@ export declare namespace sh_NodeShape {
220
220
  readonly minInclusive?: bigint | boolean | number | string | Date | Literal | Maybe<Literal>;
221
221
  readonly minLength?: bigint | Maybe<bigint>;
222
222
  readonly mutable?: boolean | Maybe<boolean>;
223
- readonly node?: (NamedNode | sh_NodeShape) | Maybe<NamedNode | sh_NodeShape>;
223
+ readonly node?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | sh_NodeShape>;
224
224
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
225
- readonly not?: (NamedNode | sh_NodeShape) | readonly (NamedNode | sh_NodeShape)[];
226
- readonly or?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
225
+ readonly not?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string))[];
226
+ readonly or?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
227
227
  readonly pattern?: string | Maybe<string>;
228
- readonly properties?: (NamedNode | sh_PropertyShape) | readonly (NamedNode | sh_PropertyShape)[];
228
+ readonly properties?: NamedNode | sh_PropertyShape | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_PropertyShape | (keyof $DefaultNamespaceT & string))[];
229
229
  readonly rdfType?: (keyof $DefaultNamespaceT & string) | NamedNode | Maybe<NamedNode>;
230
230
  readonly severity?: sh_Severity["value"] | sh_Severity | Maybe<sh_Severity>;
231
231
  readonly shaclmateName?: string | Maybe<string>;
@@ -237,12 +237,12 @@ export declare namespace sh_NodeShape {
237
237
  readonly toRdfTypes?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
238
238
  readonly tsImports?: string | readonly string[];
239
239
  readonly type?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
240
- readonly xone?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
240
+ readonly xone?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
241
241
  }) => Either<Error, sh_NodeShape>;
242
242
  function createUnsafe<$DefaultNamespaceT extends $NamespaceBuilder = $NamespaceBuilder>(parameters?: {
243
243
  readonly $defaultNamespace?: $DefaultNamespaceT;
244
244
  readonly $identifier?: (() => sh_NodeShape.Identifier) | BlankNode | NamedNode | (keyof $DefaultNamespaceT & string);
245
- readonly and?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
245
+ readonly and?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
246
246
  readonly class_?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
247
247
  readonly closed?: boolean | Maybe<boolean>;
248
248
  readonly comment?: string | Maybe<string>;
@@ -256,7 +256,7 @@ export declare namespace sh_NodeShape {
256
256
  readonly ignore?: boolean;
257
257
  readonly ignoredProperties?: readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[] | Maybe<readonly NamedNode[]>;
258
258
  readonly in_?: readonly (NamedNode | Literal)[] | Maybe<readonly (NamedNode | Literal)[]>;
259
- readonly isDefinedBy?: (NamedNode | owl_Ontology) | Maybe<NamedNode | owl_Ontology>;
259
+ readonly isDefinedBy?: NamedNode | owl_Ontology | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | owl_Ontology>;
260
260
  readonly label?: string | Maybe<string>;
261
261
  readonly languageIn?: readonly string[] | Maybe<readonly string[]>;
262
262
  readonly maxExclusive?: bigint | boolean | number | string | Date | Literal | Maybe<Literal>;
@@ -267,12 +267,12 @@ export declare namespace sh_NodeShape {
267
267
  readonly minInclusive?: bigint | boolean | number | string | Date | Literal | Maybe<Literal>;
268
268
  readonly minLength?: bigint | Maybe<bigint>;
269
269
  readonly mutable?: boolean | Maybe<boolean>;
270
- readonly node?: (NamedNode | sh_NodeShape) | Maybe<NamedNode | sh_NodeShape>;
270
+ readonly node?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | sh_NodeShape>;
271
271
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
272
- readonly not?: (NamedNode | sh_NodeShape) | readonly (NamedNode | sh_NodeShape)[];
273
- readonly or?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
272
+ readonly not?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string))[];
273
+ readonly or?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
274
274
  readonly pattern?: string | Maybe<string>;
275
- readonly properties?: (NamedNode | sh_PropertyShape) | readonly (NamedNode | sh_PropertyShape)[];
275
+ readonly properties?: NamedNode | sh_PropertyShape | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_PropertyShape | (keyof $DefaultNamespaceT & string))[];
276
276
  readonly rdfType?: (keyof $DefaultNamespaceT & string) | NamedNode | Maybe<NamedNode>;
277
277
  readonly severity?: sh_Severity["value"] | sh_Severity | Maybe<sh_Severity>;
278
278
  readonly shaclmateName?: string | Maybe<string>;
@@ -284,7 +284,7 @@ export declare namespace sh_NodeShape {
284
284
  readonly toRdfTypes?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
285
285
  readonly tsImports?: string | readonly string[];
286
286
  readonly type?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
287
- readonly xone?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
287
+ readonly xone?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
288
288
  }): sh_NodeShape;
289
289
  type Identifier = BlankNode | NamedNode;
290
290
  namespace Identifier {
@@ -6590,7 +6590,7 @@ export declare namespace sh_PropertyShape {
6590
6590
  const create: <$DefaultNamespaceT extends $NamespaceBuilder = $NamespaceBuilder>(parameters: {
6591
6591
  readonly $defaultNamespace?: $DefaultNamespaceT;
6592
6592
  readonly $identifier?: (() => sh_PropertyShape.Identifier) | BlankNode | NamedNode | (keyof $DefaultNamespaceT & string);
6593
- readonly and?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6593
+ readonly and?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6594
6594
  readonly class_?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6595
6595
  readonly comment?: string | Maybe<string>;
6596
6596
  readonly datatype?: (keyof $DefaultNamespaceT & string) | NamedNode | Maybe<NamedNode>;
@@ -6601,11 +6601,11 @@ export declare namespace sh_PropertyShape {
6601
6601
  readonly display?: boolean;
6602
6602
  readonly equals?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6603
6603
  readonly flags?: string | Maybe<string>;
6604
- readonly groups?: (NamedNode | sh_PropertyGroup) | readonly (NamedNode | sh_PropertyGroup)[];
6604
+ readonly groups?: NamedNode | sh_PropertyGroup | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_PropertyGroup | (keyof $DefaultNamespaceT & string))[];
6605
6605
  readonly hasValues?: (NamedNode | Literal) | readonly (NamedNode | Literal)[];
6606
6606
  readonly ignore?: boolean;
6607
6607
  readonly in_?: readonly (NamedNode | Literal)[] | Maybe<readonly (NamedNode | Literal)[]>;
6608
- readonly isDefinedBy?: (NamedNode | owl_Ontology) | Maybe<NamedNode | owl_Ontology>;
6608
+ readonly isDefinedBy?: NamedNode | owl_Ontology | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | owl_Ontology>;
6609
6609
  readonly label?: string | Maybe<string>;
6610
6610
  readonly languageIn?: readonly string[] | Maybe<readonly string[]>;
6611
6611
  readonly lessThan?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
@@ -6621,10 +6621,10 @@ export declare namespace sh_PropertyShape {
6621
6621
  readonly minLength?: bigint | Maybe<bigint>;
6622
6622
  readonly mutable?: boolean | Maybe<boolean>;
6623
6623
  readonly name?: string | Maybe<string>;
6624
- readonly node?: (NamedNode | sh_NodeShape) | Maybe<NamedNode | sh_NodeShape>;
6624
+ readonly node?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | sh_NodeShape>;
6625
6625
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
6626
- readonly not?: (NamedNode | sh_NodeShape) | readonly (NamedNode | sh_NodeShape)[];
6627
- readonly or?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6626
+ readonly not?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string))[];
6627
+ readonly or?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6628
6628
  readonly order?: number | Maybe<number>;
6629
6629
  readonly path: $PropertyPath;
6630
6630
  readonly pattern?: string | Maybe<string>;
@@ -6640,12 +6640,12 @@ export declare namespace sh_PropertyShape {
6640
6640
  readonly targetObjectsOf?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6641
6641
  readonly targetSubjectsOf?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6642
6642
  readonly uniqueLang?: boolean | Maybe<boolean>;
6643
- readonly xone?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6643
+ readonly xone?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6644
6644
  }) => Either<Error, sh_PropertyShape>;
6645
6645
  function createUnsafe<$DefaultNamespaceT extends $NamespaceBuilder = $NamespaceBuilder>(parameters: {
6646
6646
  readonly $defaultNamespace?: $DefaultNamespaceT;
6647
6647
  readonly $identifier?: (() => sh_PropertyShape.Identifier) | BlankNode | NamedNode | (keyof $DefaultNamespaceT & string);
6648
- readonly and?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6648
+ readonly and?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6649
6649
  readonly class_?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6650
6650
  readonly comment?: string | Maybe<string>;
6651
6651
  readonly datatype?: (keyof $DefaultNamespaceT & string) | NamedNode | Maybe<NamedNode>;
@@ -6656,11 +6656,11 @@ export declare namespace sh_PropertyShape {
6656
6656
  readonly display?: boolean;
6657
6657
  readonly equals?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6658
6658
  readonly flags?: string | Maybe<string>;
6659
- readonly groups?: (NamedNode | sh_PropertyGroup) | readonly (NamedNode | sh_PropertyGroup)[];
6659
+ readonly groups?: NamedNode | sh_PropertyGroup | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_PropertyGroup | (keyof $DefaultNamespaceT & string))[];
6660
6660
  readonly hasValues?: (NamedNode | Literal) | readonly (NamedNode | Literal)[];
6661
6661
  readonly ignore?: boolean;
6662
6662
  readonly in_?: readonly (NamedNode | Literal)[] | Maybe<readonly (NamedNode | Literal)[]>;
6663
- readonly isDefinedBy?: (NamedNode | owl_Ontology) | Maybe<NamedNode | owl_Ontology>;
6663
+ readonly isDefinedBy?: NamedNode | owl_Ontology | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | owl_Ontology>;
6664
6664
  readonly label?: string | Maybe<string>;
6665
6665
  readonly languageIn?: readonly string[] | Maybe<readonly string[]>;
6666
6666
  readonly lessThan?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
@@ -6676,10 +6676,10 @@ export declare namespace sh_PropertyShape {
6676
6676
  readonly minLength?: bigint | Maybe<bigint>;
6677
6677
  readonly mutable?: boolean | Maybe<boolean>;
6678
6678
  readonly name?: string | Maybe<string>;
6679
- readonly node?: (NamedNode | sh_NodeShape) | Maybe<NamedNode | sh_NodeShape>;
6679
+ readonly node?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | Maybe<NamedNode | sh_NodeShape>;
6680
6680
  readonly nodeKind?: ("http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal") | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
6681
- readonly not?: (NamedNode | sh_NodeShape) | readonly (NamedNode | sh_NodeShape)[];
6682
- readonly or?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6681
+ readonly not?: NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | sh_NodeShape | (keyof $DefaultNamespaceT & string))[];
6682
+ readonly or?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6683
6683
  readonly order?: number | Maybe<number>;
6684
6684
  readonly path: $PropertyPath;
6685
6685
  readonly pattern?: string | Maybe<string>;
@@ -6695,7 +6695,7 @@ export declare namespace sh_PropertyShape {
6695
6695
  readonly targetObjectsOf?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6696
6696
  readonly targetSubjectsOf?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
6697
6697
  readonly uniqueLang?: boolean | Maybe<boolean>;
6698
- readonly xone?: readonly (NamedNode | sh_Shape)[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6698
+ readonly xone?: readonly (NamedNode | sh_Shape | (keyof $DefaultNamespaceT & string))[] | Maybe<readonly (NamedNode | sh_Shape)[]>;
6699
6699
  }): sh_PropertyShape;
6700
6700
  type Identifier = BlankNode | NamedNode;
6701
6701
  namespace Identifier {
@@ -18078,7 +18078,7 @@ export declare namespace skos_Concept {
18078
18078
  readonly $defaultNamespace?: $DefaultNamespaceT;
18079
18079
  readonly $identifier: (() => skos_Concept.Identifier) | (keyof $DefaultNamespaceT & string) | NamedNode;
18080
18080
  readonly altLabel?: string | Literal | readonly (string | Literal)[];
18081
- readonly broader?: (NamedNode | skos_Concept) | readonly (NamedNode | skos_Concept)[];
18081
+ readonly broader?: NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string))[];
18082
18082
  readonly definition?: string | Literal | readonly (string | Literal)[];
18083
18083
  readonly hiddenLabel?: string | Literal | readonly (string | Literal)[];
18084
18084
  readonly notation?: bigint | boolean | number | string | Date | Literal | readonly (bigint | boolean | number | string | Date | Literal)[];
@@ -18089,7 +18089,7 @@ export declare namespace skos_Concept {
18089
18089
  readonly $defaultNamespace?: $DefaultNamespaceT;
18090
18090
  readonly $identifier: (() => skos_Concept.Identifier) | (keyof $DefaultNamespaceT & string) | NamedNode;
18091
18091
  readonly altLabel?: string | Literal | readonly (string | Literal)[];
18092
- readonly broader?: (NamedNode | skos_Concept) | readonly (NamedNode | skos_Concept)[];
18092
+ readonly broader?: NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string))[];
18093
18093
  readonly definition?: string | Literal | readonly (string | Literal)[];
18094
18094
  readonly hiddenLabel?: string | Literal | readonly (string | Literal)[];
18095
18095
  readonly notation?: bigint | boolean | number | string | Date | Literal | readonly (bigint | boolean | number | string | Date | Literal)[];
@@ -18279,24 +18279,24 @@ export declare namespace skos_ConceptScheme {
18279
18279
  readonly $defaultNamespace?: $DefaultNamespaceT;
18280
18280
  readonly $identifier: (() => skos_ConceptScheme.Identifier) | (keyof $DefaultNamespaceT & string) | NamedNode;
18281
18281
  readonly altLabel?: string | Literal | readonly (string | Literal)[];
18282
- readonly concepts?: (NamedNode | skos_Concept) | readonly (NamedNode | skos_Concept)[];
18282
+ readonly concepts?: NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string))[];
18283
18283
  readonly definition?: string | Literal | readonly (string | Literal)[];
18284
18284
  readonly hiddenLabel?: string | Literal | readonly (string | Literal)[];
18285
18285
  readonly notation?: bigint | boolean | number | string | Date | Literal | readonly (bigint | boolean | number | string | Date | Literal)[];
18286
18286
  readonly prefLabel?: string | Literal | readonly (string | Literal)[];
18287
- readonly topConcepts?: (NamedNode | skos_Concept) | readonly (NamedNode | skos_Concept)[];
18287
+ readonly topConcepts?: NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string))[];
18288
18288
  readonly type?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
18289
18289
  }) => Either<Error, skos_ConceptScheme>;
18290
18290
  function createUnsafe<$DefaultNamespaceT extends $NamespaceBuilder = $NamespaceBuilder>(parameters: {
18291
18291
  readonly $defaultNamespace?: $DefaultNamespaceT;
18292
18292
  readonly $identifier: (() => skos_ConceptScheme.Identifier) | (keyof $DefaultNamespaceT & string) | NamedNode;
18293
18293
  readonly altLabel?: string | Literal | readonly (string | Literal)[];
18294
- readonly concepts?: (NamedNode | skos_Concept) | readonly (NamedNode | skos_Concept)[];
18294
+ readonly concepts?: NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string))[];
18295
18295
  readonly definition?: string | Literal | readonly (string | Literal)[];
18296
18296
  readonly hiddenLabel?: string | Literal | readonly (string | Literal)[];
18297
18297
  readonly notation?: bigint | boolean | number | string | Date | Literal | readonly (bigint | boolean | number | string | Date | Literal)[];
18298
18298
  readonly prefLabel?: string | Literal | readonly (string | Literal)[];
18299
- readonly topConcepts?: (NamedNode | skos_Concept) | readonly (NamedNode | skos_Concept)[];
18299
+ readonly topConcepts?: NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string) | readonly (NamedNode | skos_Concept | (keyof $DefaultNamespaceT & string))[];
18300
18300
  readonly type?: (keyof $DefaultNamespaceT & string) | NamedNode | readonly ((keyof $DefaultNamespaceT & string) | NamedNode)[];
18301
18301
  }): skos_ConceptScheme;
18302
18302
  type Identifier = NamedNode;
package/dist/shapes.js CHANGED
@@ -359,7 +359,8 @@ export var sh_NodeShape;
359
359
  if (value["termType"] === "NamedNode") {
360
360
  return [value];
361
361
  }
362
- if (sh_Shape.issh_Shape(value)) {
362
+ if (value["termType"] === "sh_NodeShape" ||
363
+ value["termType"] === "sh_PropertyShape") {
363
364
  return sh_Shape.toRdfResourceValues(value, {
364
365
  graph: _options.graph,
365
366
  propertyPath: _options.propertyPath,
@@ -465,7 +466,7 @@ export var sh_NodeShape;
465
466
  if (value["termType"] === "NamedNode") {
466
467
  return [value];
467
468
  }
468
- if (owl_Ontology.isowl_Ontology(value)) {
469
+ if (value["termType"] === "owl_Ontology") {
469
470
  return [
470
471
  owl_Ontology.toRdfResource(value, {
471
472
  graph: _options.graph,
@@ -531,7 +532,7 @@ export var sh_NodeShape;
531
532
  if (value["termType"] === "NamedNode") {
532
533
  return [value];
533
534
  }
534
- if (sh_NodeShape.issh_NodeShape(value)) {
535
+ if (value["termType"] === "sh_NodeShape") {
535
536
  return [
536
537
  sh_NodeShape.toRdfResource(value, {
537
538
  graph: _options.graph,
@@ -551,7 +552,7 @@ export var sh_NodeShape;
551
552
  if (value["termType"] === "NamedNode") {
552
553
  return [value];
553
554
  }
554
- if (sh_NodeShape.issh_NodeShape(value)) {
555
+ if (value["termType"] === "sh_NodeShape") {
555
556
  return [
556
557
  sh_NodeShape.toRdfResource(value, {
557
558
  graph: _options.graph,
@@ -581,7 +582,8 @@ export var sh_NodeShape;
581
582
  if (value["termType"] === "NamedNode") {
582
583
  return [value];
583
584
  }
584
- if (sh_Shape.issh_Shape(value)) {
585
+ if (value["termType"] === "sh_NodeShape" ||
586
+ value["termType"] === "sh_PropertyShape") {
585
587
  return sh_Shape.toRdfResourceValues(value, {
586
588
  graph: _options.graph,
587
589
  propertyPath: _options.propertyPath,
@@ -613,7 +615,7 @@ export var sh_NodeShape;
613
615
  if (value["termType"] === "NamedNode") {
614
616
  return [value];
615
617
  }
616
- if (sh_PropertyShape.issh_PropertyShape(value)) {
618
+ if (value["termType"] === "sh_PropertyShape") {
617
619
  return [
618
620
  sh_PropertyShape.toRdfResource(value, {
619
621
  graph: _options.graph,
@@ -658,7 +660,8 @@ export var sh_NodeShape;
658
660
  if (value["termType"] === "NamedNode") {
659
661
  return [value];
660
662
  }
661
- if (sh_Shape.issh_Shape(value)) {
663
+ if (value["termType"] === "sh_NodeShape" ||
664
+ value["termType"] === "sh_PropertyShape") {
662
665
  return sh_Shape.toRdfResourceValues(value, {
663
666
  graph: _options.graph,
664
667
  propertyPath: _options.propertyPath,
@@ -688,7 +691,17 @@ export var sh_NodeShape;
688
691
  sh_NodeShape.$toString = (_shNodeShape) => `sh_NodeShape(${JSON.stringify(sh_NodeShape.toStringRecord(_shNodeShape))})`;
689
692
  sh_NodeShape.create = (parameters) => $sequenceRecord({
690
693
  $identifier: $convertToIdentifierProperty(parameters?.$identifier, parameters?.$defaultNamespace),
691
- and: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.and, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.and.type, value)),
694
+ and: $convertToMaybe($convertToList((value, defaultNamespace) => {
695
+ switch (typeof value) {
696
+ case "object":
697
+ return Either.of(value);
698
+ case "string":
699
+ return $convertToIri(value, defaultNamespace);
700
+ default:
701
+ value;
702
+ throw new Error("should never reach this point");
703
+ }
704
+ }))(parameters?.and, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.and.type, value)),
692
705
  class_: $convertToScalarSet($convertToIri)(parameters?.class_, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.class_.type, value)),
693
706
  closed: $convertToMaybe($identityConversionFunction)(parameters?.closed, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.closed.type, value)),
694
707
  comment: $convertToMaybe($identityConversionFunction)(parameters?.comment, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
@@ -702,7 +715,17 @@ export var sh_NodeShape;
702
715
  ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters?.ignore, parameters?.$defaultNamespace),
703
716
  ignoredProperties: $convertToMaybe($convertToList($convertToIri))(parameters?.ignoredProperties, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.ignoredProperties.type, value)),
704
717
  in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.in_, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.in_.type, value)),
705
- isDefinedBy: $convertToMaybe($identityConversionFunction)(parameters?.isDefinedBy, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.isDefinedBy.type, value)),
718
+ isDefinedBy: $convertToMaybe((value, defaultNamespace) => {
719
+ switch (typeof value) {
720
+ case "object":
721
+ return Either.of(value);
722
+ case "string":
723
+ return $convertToIri(value, defaultNamespace);
724
+ default:
725
+ value;
726
+ throw new Error("should never reach this point");
727
+ }
728
+ })(parameters?.isDefinedBy, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.isDefinedBy.type, value)),
706
729
  label: $convertToMaybe($identityConversionFunction)(parameters?.label, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
707
730
  languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.languageIn, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.languageIn.type, value)),
708
731
  maxExclusive: $convertToMaybe($convertToLiteral)(parameters?.maxExclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxExclusive.type, value)),
@@ -713,12 +736,52 @@ export var sh_NodeShape;
713
736
  minInclusive: $convertToMaybe($convertToLiteral)(parameters?.minInclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minInclusive.type, value)),
714
737
  minLength: $convertToMaybe($identityConversionFunction)(parameters?.minLength, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minLength.type, value)),
715
738
  mutable: $convertToMaybe($identityConversionFunction)(parameters?.mutable, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.mutable.type, value)),
716
- node: $convertToMaybe($identityConversionFunction)(parameters?.node, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.node.type, value)),
739
+ node: $convertToMaybe((value, defaultNamespace) => {
740
+ switch (typeof value) {
741
+ case "object":
742
+ return Either.of(value);
743
+ case "string":
744
+ return $convertToIri(value, defaultNamespace);
745
+ default:
746
+ value;
747
+ throw new Error("should never reach this point");
748
+ }
749
+ })(parameters?.node, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.node.type, value)),
717
750
  nodeKind: $convertToMaybe(($convertToInIri))(parameters?.nodeKind, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.nodeKind.type, value)),
718
- not: $convertToScalarSet($identityConversionFunction)(parameters?.not, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.not.type, value)),
719
- or: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.or, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.or.type, value)),
751
+ not: $convertToScalarSet((value, defaultNamespace) => {
752
+ switch (typeof value) {
753
+ case "object":
754
+ return Either.of(value);
755
+ case "string":
756
+ return $convertToIri(value, defaultNamespace);
757
+ default:
758
+ value;
759
+ throw new Error("should never reach this point");
760
+ }
761
+ })(parameters?.not, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.not.type, value)),
762
+ or: $convertToMaybe($convertToList((value, defaultNamespace) => {
763
+ switch (typeof value) {
764
+ case "object":
765
+ return Either.of(value);
766
+ case "string":
767
+ return $convertToIri(value, defaultNamespace);
768
+ default:
769
+ value;
770
+ throw new Error("should never reach this point");
771
+ }
772
+ }))(parameters?.or, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.or.type, value)),
720
773
  pattern: $convertToMaybe($identityConversionFunction)(parameters?.pattern, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.pattern.type, value)),
721
- properties: $convertToScalarSet($identityConversionFunction)(parameters?.properties, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.properties.type, value)),
774
+ properties: $convertToScalarSet((value, defaultNamespace) => {
775
+ switch (typeof value) {
776
+ case "object":
777
+ return Either.of(value);
778
+ case "string":
779
+ return $convertToIri(value, defaultNamespace);
780
+ default:
781
+ value;
782
+ throw new Error("should never reach this point");
783
+ }
784
+ })(parameters?.properties, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.properties.type, value)),
722
785
  rdfType: $convertToMaybe($convertToIri)(parameters?.rdfType, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.rdfType.type, value)),
723
786
  severity: $convertToMaybe(($convertToInIri))(parameters?.severity, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.severity.type, value)),
724
787
  shaclmateName: $convertToMaybe($identityConversionFunction)(parameters?.shaclmateName, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.shaclmateName.type, value)),
@@ -730,7 +793,17 @@ export var sh_NodeShape;
730
793
  toRdfTypes: $convertToScalarSet($convertToIri)(parameters?.toRdfTypes, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.toRdfTypes.type, value)),
731
794
  tsImports: $convertToScalarSet($identityConversionFunction)(parameters?.tsImports, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.tsImports.type, value)),
732
795
  type: $convertToScalarSet($convertToIri)(parameters?.type, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.type.type, value)),
733
- xone: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.xone, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.xone.type, value)),
796
+ xone: $convertToMaybe($convertToList((value, defaultNamespace) => {
797
+ switch (typeof value) {
798
+ case "object":
799
+ return Either.of(value);
800
+ case "string":
801
+ return $convertToIri(value, defaultNamespace);
802
+ default:
803
+ value;
804
+ throw new Error("should never reach this point");
805
+ }
806
+ }))(parameters?.xone, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.xone.type, value)),
734
807
  })
735
808
  .map((properties) => ({
736
809
  ...properties,
@@ -1332,7 +1405,8 @@ export var sh_PropertyShape;
1332
1405
  if (value["termType"] === "NamedNode") {
1333
1406
  return [value];
1334
1407
  }
1335
- if (sh_Shape.issh_Shape(value)) {
1408
+ if (value["termType"] === "sh_NodeShape" ||
1409
+ value["termType"] === "sh_PropertyShape") {
1336
1410
  return sh_Shape.toRdfResourceValues(value, {
1337
1411
  graph: _options.graph,
1338
1412
  propertyPath: _options.propertyPath,
@@ -1385,7 +1459,7 @@ export var sh_PropertyShape;
1385
1459
  if (value["termType"] === "NamedNode") {
1386
1460
  return [value];
1387
1461
  }
1388
- if (sh_PropertyGroup.issh_PropertyGroup(value)) {
1462
+ if (value["termType"] === "sh_PropertyGroup") {
1389
1463
  return [
1390
1464
  sh_PropertyGroup.toRdfResource(value, {
1391
1465
  graph: _options.graph,
@@ -1432,7 +1506,7 @@ export var sh_PropertyShape;
1432
1506
  if (value["termType"] === "NamedNode") {
1433
1507
  return [value];
1434
1508
  }
1435
- if (owl_Ontology.isowl_Ontology(value)) {
1509
+ if (value["termType"] === "owl_Ontology") {
1436
1510
  return [
1437
1511
  owl_Ontology.toRdfResource(value, {
1438
1512
  graph: _options.graph,
@@ -1513,7 +1587,7 @@ export var sh_PropertyShape;
1513
1587
  if (value["termType"] === "NamedNode") {
1514
1588
  return [value];
1515
1589
  }
1516
- if (sh_NodeShape.issh_NodeShape(value)) {
1590
+ if (value["termType"] === "sh_NodeShape") {
1517
1591
  return [
1518
1592
  sh_NodeShape.toRdfResource(value, {
1519
1593
  graph: _options.graph,
@@ -1533,7 +1607,7 @@ export var sh_PropertyShape;
1533
1607
  if (value["termType"] === "NamedNode") {
1534
1608
  return [value];
1535
1609
  }
1536
- if (sh_NodeShape.issh_NodeShape(value)) {
1610
+ if (value["termType"] === "sh_NodeShape") {
1537
1611
  return [
1538
1612
  sh_NodeShape.toRdfResource(value, {
1539
1613
  graph: _options.graph,
@@ -1563,7 +1637,8 @@ export var sh_PropertyShape;
1563
1637
  if (value["termType"] === "NamedNode") {
1564
1638
  return [value];
1565
1639
  }
1566
- if (sh_Shape.issh_Shape(value)) {
1640
+ if (value["termType"] === "sh_NodeShape" ||
1641
+ value["termType"] === "sh_PropertyShape") {
1567
1642
  return sh_Shape.toRdfResourceValues(value, {
1568
1643
  graph: _options.graph,
1569
1644
  propertyPath: _options.propertyPath,
@@ -1647,7 +1722,8 @@ export var sh_PropertyShape;
1647
1722
  if (value["termType"] === "NamedNode") {
1648
1723
  return [value];
1649
1724
  }
1650
- if (sh_Shape.issh_Shape(value)) {
1725
+ if (value["termType"] === "sh_NodeShape" ||
1726
+ value["termType"] === "sh_PropertyShape") {
1651
1727
  return sh_Shape.toRdfResourceValues(value, {
1652
1728
  graph: _options.graph,
1653
1729
  propertyPath: _options.propertyPath,
@@ -1677,7 +1753,17 @@ export var sh_PropertyShape;
1677
1753
  sh_PropertyShape.$toString = (_shPropertyShape) => `sh_PropertyShape(${JSON.stringify(sh_PropertyShape.toStringRecord(_shPropertyShape))})`;
1678
1754
  sh_PropertyShape.create = (parameters) => $sequenceRecord({
1679
1755
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
1680
- and: $convertToMaybe($convertToList($identityConversionFunction))(parameters.and, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.and.type, value)),
1756
+ and: $convertToMaybe($convertToList((value, defaultNamespace) => {
1757
+ switch (typeof value) {
1758
+ case "object":
1759
+ return Either.of(value);
1760
+ case "string":
1761
+ return $convertToIri(value, defaultNamespace);
1762
+ default:
1763
+ value;
1764
+ throw new Error("should never reach this point");
1765
+ }
1766
+ }))(parameters.and, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.and.type, value)),
1681
1767
  class_: $convertToScalarSet($convertToIri)(parameters.class_, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.class_.type, value)),
1682
1768
  comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
1683
1769
  datatype: $convertToMaybe($convertToIri)(parameters.datatype, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.datatype.type, value)),
@@ -1688,11 +1774,31 @@ export var sh_PropertyShape;
1688
1774
  display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display, parameters.$defaultNamespace),
1689
1775
  equals: $convertToScalarSet($convertToIri)(parameters.equals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.equals.type, value)),
1690
1776
  flags: $convertToMaybe($identityConversionFunction)(parameters.flags, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.flags.type, value)),
1691
- groups: $convertToScalarSet($identityConversionFunction)(parameters.groups, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.groups.type, value)),
1777
+ groups: $convertToScalarSet((value, defaultNamespace) => {
1778
+ switch (typeof value) {
1779
+ case "object":
1780
+ return Either.of(value);
1781
+ case "string":
1782
+ return $convertToIri(value, defaultNamespace);
1783
+ default:
1784
+ value;
1785
+ throw new Error("should never reach this point");
1786
+ }
1787
+ })(parameters.groups, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.groups.type, value)),
1692
1788
  hasValues: $convertToScalarSet($identityConversionFunction)(parameters.hasValues, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.hasValues.type, value)),
1693
1789
  ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters.ignore, parameters.$defaultNamespace),
1694
1790
  in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters.in_, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.in_.type, value)),
1695
- isDefinedBy: $convertToMaybe($identityConversionFunction)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.isDefinedBy.type, value)),
1791
+ isDefinedBy: $convertToMaybe((value, defaultNamespace) => {
1792
+ switch (typeof value) {
1793
+ case "object":
1794
+ return Either.of(value);
1795
+ case "string":
1796
+ return $convertToIri(value, defaultNamespace);
1797
+ default:
1798
+ value;
1799
+ throw new Error("should never reach this point");
1800
+ }
1801
+ })(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.isDefinedBy.type, value)),
1696
1802
  label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
1697
1803
  languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters.languageIn, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.languageIn.type, value)),
1698
1804
  lessThan: $convertToScalarSet($convertToIri)(parameters.lessThan, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.lessThan.type, value)),
@@ -1708,10 +1814,40 @@ export var sh_PropertyShape;
1708
1814
  minLength: $convertToMaybe($identityConversionFunction)(parameters.minLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minLength.type, value)),
1709
1815
  mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.mutable.type, value)),
1710
1816
  name: $convertToMaybe($identityConversionFunction)(parameters.name, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.name.type, value)),
1711
- node: $convertToMaybe($identityConversionFunction)(parameters.node, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.node.type, value)),
1817
+ node: $convertToMaybe((value, defaultNamespace) => {
1818
+ switch (typeof value) {
1819
+ case "object":
1820
+ return Either.of(value);
1821
+ case "string":
1822
+ return $convertToIri(value, defaultNamespace);
1823
+ default:
1824
+ value;
1825
+ throw new Error("should never reach this point");
1826
+ }
1827
+ })(parameters.node, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.node.type, value)),
1712
1828
  nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.nodeKind.type, value)),
1713
- not: $convertToScalarSet($identityConversionFunction)(parameters.not, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.not.type, value)),
1714
- or: $convertToMaybe($convertToList($identityConversionFunction))(parameters.or, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.or.type, value)),
1829
+ not: $convertToScalarSet((value, defaultNamespace) => {
1830
+ switch (typeof value) {
1831
+ case "object":
1832
+ return Either.of(value);
1833
+ case "string":
1834
+ return $convertToIri(value, defaultNamespace);
1835
+ default:
1836
+ value;
1837
+ throw new Error("should never reach this point");
1838
+ }
1839
+ })(parameters.not, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.not.type, value)),
1840
+ or: $convertToMaybe($convertToList((value, defaultNamespace) => {
1841
+ switch (typeof value) {
1842
+ case "object":
1843
+ return Either.of(value);
1844
+ case "string":
1845
+ return $convertToIri(value, defaultNamespace);
1846
+ default:
1847
+ value;
1848
+ throw new Error("should never reach this point");
1849
+ }
1850
+ }))(parameters.or, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.or.type, value)),
1715
1851
  order: $convertToMaybe($identityConversionFunction)(parameters.order, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.order.type, value)),
1716
1852
  path: Either.of(parameters.path),
1717
1853
  pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.pattern.type, value)),
@@ -1727,7 +1863,17 @@ export var sh_PropertyShape;
1727
1863
  targetObjectsOf: $convertToScalarSet($convertToIri)(parameters.targetObjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetObjectsOf.type, value)),
1728
1864
  targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters.targetSubjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetSubjectsOf.type, value)),
1729
1865
  uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.uniqueLang.type, value)),
1730
- xone: $convertToMaybe($convertToList($identityConversionFunction))(parameters.xone, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.xone.type, value)),
1866
+ xone: $convertToMaybe($convertToList((value, defaultNamespace) => {
1867
+ switch (typeof value) {
1868
+ case "object":
1869
+ return Either.of(value);
1870
+ case "string":
1871
+ return $convertToIri(value, defaultNamespace);
1872
+ default:
1873
+ value;
1874
+ throw new Error("should never reach this point");
1875
+ }
1876
+ }))(parameters.xone, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.xone.type, value)),
1731
1877
  })
1732
1878
  .map((properties) => ({
1733
1879
  ...properties,
@@ -2343,7 +2489,7 @@ export var skos_Concept;
2343
2489
  if (value["termType"] === "NamedNode") {
2344
2490
  return [value];
2345
2491
  }
2346
- if (skos_Concept.isskos_Concept(value)) {
2492
+ if (value["termType"] === "skos_Concept") {
2347
2493
  return [
2348
2494
  skos_Concept.toRdfResource(value, {
2349
2495
  graph: _options.graph,
@@ -2408,7 +2554,17 @@ export var skos_Concept;
2408
2554
  skos_Concept.create = (parameters) => $sequenceRecord({
2409
2555
  $identifier: $convertToIriIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
2410
2556
  altLabel: $convertToScalarSet($identityConversionFunction)(parameters.altLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.altLabel.type, value)),
2411
- broader: $convertToScalarSet($identityConversionFunction)(parameters.broader, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.broader.type, value)),
2557
+ broader: $convertToScalarSet((value, defaultNamespace) => {
2558
+ switch (typeof value) {
2559
+ case "object":
2560
+ return Either.of(value);
2561
+ case "string":
2562
+ return $convertToIri(value, defaultNamespace);
2563
+ default:
2564
+ value;
2565
+ throw new Error("should never reach this point");
2566
+ }
2567
+ })(parameters.broader, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.broader.type, value)),
2412
2568
  definition: $convertToScalarSet($identityConversionFunction)(parameters.definition, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.definition.type, value)),
2413
2569
  hiddenLabel: $convertToScalarSet($identityConversionFunction)(parameters.hiddenLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.hiddenLabel.type, value)),
2414
2570
  notation: $convertToScalarSet($convertToLiteral)(parameters.notation, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.notation.type, value)),
@@ -2581,7 +2737,7 @@ export var skos_ConceptScheme;
2581
2737
  if (value["termType"] === "NamedNode") {
2582
2738
  return [value];
2583
2739
  }
2584
- if (skos_Concept.isskos_Concept(value)) {
2740
+ if (value["termType"] === "skos_Concept") {
2585
2741
  return [
2586
2742
  skos_Concept.toRdfResource(value, {
2587
2743
  graph: _options.graph,
@@ -2643,7 +2799,7 @@ export var skos_ConceptScheme;
2643
2799
  if (value["termType"] === "NamedNode") {
2644
2800
  return [value];
2645
2801
  }
2646
- if (skos_Concept.isskos_Concept(value)) {
2802
+ if (value["termType"] === "skos_Concept") {
2647
2803
  return [
2648
2804
  skos_Concept.toRdfResource(value, {
2649
2805
  graph: _options.graph,
@@ -2665,12 +2821,32 @@ export var skos_ConceptScheme;
2665
2821
  skos_ConceptScheme.create = (parameters) => $sequenceRecord({
2666
2822
  $identifier: $convertToIriIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
2667
2823
  altLabel: $convertToScalarSet($identityConversionFunction)(parameters.altLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.altLabel.type, value)),
2668
- concepts: $convertToScalarSet($identityConversionFunction)(parameters.concepts, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_ConceptScheme.schema.properties.concepts.type, value)),
2824
+ concepts: $convertToScalarSet((value, defaultNamespace) => {
2825
+ switch (typeof value) {
2826
+ case "object":
2827
+ return Either.of(value);
2828
+ case "string":
2829
+ return $convertToIri(value, defaultNamespace);
2830
+ default:
2831
+ value;
2832
+ throw new Error("should never reach this point");
2833
+ }
2834
+ })(parameters.concepts, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_ConceptScheme.schema.properties.concepts.type, value)),
2669
2835
  definition: $convertToScalarSet($identityConversionFunction)(parameters.definition, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.definition.type, value)),
2670
2836
  hiddenLabel: $convertToScalarSet($identityConversionFunction)(parameters.hiddenLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.hiddenLabel.type, value)),
2671
2837
  notation: $convertToScalarSet($convertToLiteral)(parameters.notation, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.notation.type, value)),
2672
2838
  prefLabel: $convertToScalarSet($identityConversionFunction)(parameters.prefLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.prefLabel.type, value)),
2673
- topConcepts: $convertToScalarSet($identityConversionFunction)(parameters.topConcepts, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_ConceptScheme.schema.properties.topConcepts.type, value)),
2839
+ topConcepts: $convertToScalarSet((value, defaultNamespace) => {
2840
+ switch (typeof value) {
2841
+ case "object":
2842
+ return Either.of(value);
2843
+ case "string":
2844
+ return $convertToIri(value, defaultNamespace);
2845
+ default:
2846
+ value;
2847
+ throw new Error("should never reach this point");
2848
+ }
2849
+ })(parameters.topConcepts, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_ConceptScheme.schema.properties.topConcepts.type, value)),
2674
2850
  type: $convertToScalarSet($convertToIri)(parameters.type, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.type.type, value)),
2675
2851
  })
2676
2852
  .map((properties) => ({
@@ -2850,10 +3026,10 @@ export var skos_ConceptScheme;
2850
3026
  export var sh_Shape;
2851
3027
  (function (sh_Shape) {
2852
3028
  sh_Shape.$toString = (value) => {
2853
- if (sh_NodeShape.issh_NodeShape(value)) {
3029
+ if (value["termType"] === "sh_NodeShape") {
2854
3030
  return sh_NodeShape.$toString(value);
2855
3031
  }
2856
- if (sh_PropertyShape.issh_PropertyShape(value)) {
3032
+ if (value["termType"] === "sh_PropertyShape") {
2857
3033
  return sh_PropertyShape.$toString(value);
2858
3034
  }
2859
3035
  throw new Error("unable to serialize to string");
@@ -3278,7 +3454,7 @@ export var sh_Shape;
3278
3454
  throw new Error("unrecognized type");
3279
3455
  };
3280
3456
  sh_Shape.toRdfResourceValues = ((value, _options) => {
3281
- if (sh_NodeShape.issh_NodeShape(value)) {
3457
+ if (value["termType"] === "sh_NodeShape") {
3282
3458
  return [
3283
3459
  sh_NodeShape.toRdfResource(value, {
3284
3460
  graph: _options.graph,
@@ -3286,7 +3462,7 @@ export var sh_Shape;
3286
3462
  }).identifier,
3287
3463
  ];
3288
3464
  }
3289
- if (sh_PropertyShape.issh_PropertyShape(value)) {
3465
+ if (value["termType"] === "sh_PropertyShape") {
3290
3466
  return [
3291
3467
  sh_PropertyShape.toRdfResource(value, {
3292
3468
  graph: _options.graph,
package/dist/skos.d.ts CHANGED
@@ -9,12 +9,12 @@ export interface ConvertibleConceptParameters<ConceptIriString extends string, D
9
9
  type ConvertibleRelatedConcepts<ConceptIriString> = ConceptIriString | NamedNode | skos_Concept | readonly (ConceptIriString | NamedNode | skos_Concept)[];
10
10
  export declare function skos<DefaultNamespaceT extends NamespaceBuilder>({ defaultNamespace, toIri, }: BuilderBuilderParameters<DefaultNamespaceT>): {
11
11
  namespace: NamespaceBuilder<keyof typeof _namespace>;
12
- Concept: ($identifier: NamedNode | (keyof DefaultNamespaceT & string), parameters?: ConvertibleConceptParameters<keyof DefaultNamespaceT & string, DefaultNamespaceT>) => skos_Concept;
12
+ Concept: ($identifier: (keyof DefaultNamespaceT & string) | NamedNode, parameters?: ConvertibleConceptParameters<keyof DefaultNamespaceT & string, DefaultNamespaceT>) => skos_Concept;
13
13
  ConceptScheme: <ConceptsRecordT extends { [K in keyof ConceptsRecordT]: Omit<ConvertibleConceptParameters<Extract<keyof ConceptsRecordT, string>, DefaultNamespaceT>, "broader" | "notation"> & {
14
14
  readonly $identifier?: (keyof DefaultNamespaceT & string) | NamedNode;
15
15
  readonly broader?: ConvertibleRelatedConcepts<Extract<keyof ConceptsRecordT, string>> | undefined;
16
16
  readonly notation?: boolean | ConvertibleConceptParameters<Extract<keyof T, string>, DefaultNamespaceT>["notation"];
17
- }; }>($identifier: NamedNode | (keyof DefaultNamespaceT & string), parameters?: Omit<Parameters<typeof skos_ConceptScheme.createUnsafe<DefaultNamespaceT>>[0], "$identifier" | "concepts" | "termType" | "topConcepts"> & {
17
+ }; }>($identifier: (keyof DefaultNamespaceT & string) | NamedNode, parameters?: Omit<Parameters<typeof skos_ConceptScheme.createUnsafe<DefaultNamespaceT>>[0], "$identifier" | "concepts" | "termType" | "topConcepts"> & {
18
18
  readonly concepts?: ConceptsRecordT;
19
19
  }) => skos_ConceptScheme;
20
20
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "dependencies": {
3
- "@rdfx/data-factory": "0.0.43",
4
- "@rdfx/literal": "0.0.43",
5
- "@rdfx/resource": "0.0.43",
6
- "@rdfx/string": "0.0.43",
3
+ "@rdfx/data-factory": "0.0.45",
4
+ "@rdfx/literal": "0.0.45",
5
+ "@rdfx/resource": "0.0.45",
6
+ "@rdfx/string": "0.0.45",
7
7
  "@rdfjs/namespace": "~2.0.1",
8
8
  "@rdfjs/types": "~2.0.1",
9
9
  "@types/rdfjs__namespace": "~2.0.10",
@@ -11,11 +11,11 @@
11
11
  "purify-ts": "~2.1.4"
12
12
  },
13
13
  "devDependencies": {
14
- "@rdfx/collection": "0.0.43",
15
- "@rdfx/fs": "0.0.43",
16
- "@rdfx/testing": "0.0.43",
17
- "@shaclmate/compiler": "4.0.77",
18
- "@shaclmate/validator": "4.0.77",
14
+ "@rdfx/collection": "0.0.45",
15
+ "@rdfx/fs": "0.0.45",
16
+ "@rdfx/testing": "0.0.45",
17
+ "@shaclmate/compiler": "4.0.80",
18
+ "@shaclmate/validator": "4.0.80",
19
19
  "@tpluscode/rdf-ns-builders": "~4.3.0",
20
20
  "ts-log": "~3.0.2"
21
21
  },
@@ -38,9 +38,9 @@
38
38
  "depcheck": "depcheck --ignores=\"@tsconfig/*,vitest,vitest-fetch-mock\" .",
39
39
  "dev": "tsc -w --preserveWatchOutput",
40
40
  "dev:tests": "tsc -p __tests__ -w --preserveWatchOutput",
41
- "test": "cd ../.. && vitest run /Users/minor/projects/rdfx/packages/builder/__tests__"
41
+ "test": "cd ../.. && vitest run packages/builder/__tests__"
42
42
  },
43
43
  "type": "module",
44
44
  "types": "./dist/index.d.ts",
45
- "version": "0.0.43"
45
+ "version": "0.0.45"
46
46
  }