@shaclmate/compiler 4.0.39 → 4.0.41

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.
Files changed (211) hide show
  1. package/dist/ShapesGraphToAstTransformer.d.ts +0 -8
  2. package/dist/ShapesGraphToAstTransformer.js +5 -85
  3. package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +128 -160
  4. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.d.ts +1 -1
  5. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +0 -16
  6. package/dist/ast/AbstractCompoundType.d.ts +2 -1
  7. package/dist/ast/AbstractCompoundType.js +1 -1
  8. package/dist/ast/AbstractLazyObjectType.d.ts +0 -2
  9. package/dist/ast/Ast.d.ts +1 -3
  10. package/dist/ast/ListType.d.ts +1 -1
  11. package/dist/ast/ListType.js +1 -1
  12. package/dist/ast/ObjectType.d.ts +0 -12
  13. package/dist/ast/ObjectType.js +0 -78
  14. package/dist/generators/AstJsonGenerator.js +7 -3
  15. package/dist/generators/transformAstToLabeledPropertyGraph.js +59 -56
  16. package/dist/generators/ts/AbstractCollectionType.d.ts +5 -12
  17. package/dist/generators/ts/AbstractCollectionType.js +9 -68
  18. package/dist/generators/ts/AbstractContainerType.d.ts +4 -6
  19. package/dist/generators/ts/AbstractContainerType.js +5 -9
  20. package/dist/generators/ts/AbstractDateType.d.ts +6 -3
  21. package/dist/generators/ts/AbstractDateType.js +7 -2
  22. package/dist/generators/ts/AbstractIdentifierType.d.ts +4 -0
  23. package/dist/generators/ts/AbstractIdentifierType.js +3 -0
  24. package/dist/generators/ts/AbstractLazyObjectType.d.ts +9 -9
  25. package/dist/generators/ts/AbstractLazyObjectType.js +30 -19
  26. package/dist/generators/ts/AbstractLiteralType.d.ts +1 -0
  27. package/dist/generators/ts/AbstractNumericType.d.ts +1 -1
  28. package/dist/generators/ts/AbstractNumericType.js +9 -9
  29. package/dist/generators/ts/AbstractObjectSetType.d.ts +10 -9
  30. package/dist/generators/ts/AbstractObjectSetType.js +2 -2
  31. package/dist/generators/ts/AbstractPrimitiveType.d.ts +1 -0
  32. package/dist/generators/ts/AbstractPrimitiveType.js +2 -2
  33. package/dist/generators/ts/AbstractTermType.d.ts +1 -2
  34. package/dist/generators/ts/AbstractTermType.js +3 -5
  35. package/dist/generators/ts/AbstractType.d.ts +61 -26
  36. package/dist/generators/ts/AbstractType.js +37 -17
  37. package/dist/generators/ts/BigDecimalType.d.ts +5 -1
  38. package/dist/generators/ts/BigDecimalType.js +6 -3
  39. package/dist/generators/ts/BigIntType.d.ts +3 -1
  40. package/dist/generators/ts/BigIntType.js +3 -3
  41. package/dist/generators/ts/BlankNodeType.d.ts +3 -3
  42. package/dist/generators/ts/BlankNodeType.js +13 -13
  43. package/dist/generators/ts/BooleanType.d.ts +5 -3
  44. package/dist/generators/ts/BooleanType.js +11 -6
  45. package/dist/generators/ts/DefaultValueType.d.ts +40 -2
  46. package/dist/generators/ts/DefaultValueType.js +14 -12
  47. package/dist/generators/ts/FloatType.d.ts +3 -1
  48. package/dist/generators/ts/FloatType.js +1 -1
  49. package/dist/generators/ts/GraphqlSchema.d.ts +4 -4
  50. package/dist/generators/ts/GraphqlSchema.js +6 -6
  51. package/dist/generators/ts/IdentifierType.d.ts +3 -3
  52. package/dist/generators/ts/IdentifierType.js +19 -17
  53. package/dist/generators/ts/IntType.d.ts +3 -1
  54. package/dist/generators/ts/IntType.js +1 -1
  55. package/dist/generators/ts/IriType.d.ts +2 -2
  56. package/dist/generators/ts/IriType.js +21 -19
  57. package/dist/generators/ts/LazyObjectOptionType.d.ts +2 -0
  58. package/dist/generators/ts/LazyObjectOptionType.js +14 -10
  59. package/dist/generators/ts/LazyObjectSetType.js +14 -8
  60. package/dist/generators/ts/LazyObjectType.js +9 -6
  61. package/dist/generators/ts/ListType.d.ts +13 -5
  62. package/dist/generators/ts/ListType.js +48 -12
  63. package/dist/generators/ts/LiteralType.d.ts +5 -1
  64. package/dist/generators/ts/LiteralType.js +11 -8
  65. package/dist/generators/ts/{NamedObjectType.d.ts → ObjectType.d.ts} +19 -34
  66. package/dist/generators/ts/ObjectType.js +282 -0
  67. package/dist/generators/ts/ObjectUnionType.d.ts +20 -0
  68. package/dist/generators/ts/{NamedObjectUnionType.js → ObjectUnionType.js} +52 -60
  69. package/dist/generators/ts/OptionType.d.ts +6 -2
  70. package/dist/generators/ts/OptionType.js +20 -15
  71. package/dist/generators/ts/RdfjsDatasetObjectSetType.js +8 -11
  72. package/dist/generators/ts/SetType.d.ts +16 -1
  73. package/dist/generators/ts/SetType.js +80 -2
  74. package/dist/generators/ts/Snippets.d.ts +3 -1
  75. package/dist/generators/ts/Snippets.js +18 -4
  76. package/dist/generators/ts/SparqlObjectSetType.js +2 -2
  77. package/dist/generators/ts/StringType.d.ts +5 -3
  78. package/dist/generators/ts/StringType.js +15 -6
  79. package/dist/generators/ts/TermType.d.ts +6 -2
  80. package/dist/generators/ts/TermType.js +15 -12
  81. package/dist/generators/ts/TsGenerator.d.ts +1 -1
  82. package/dist/generators/ts/TsGenerator.js +60 -32
  83. package/dist/generators/ts/Type.d.ts +4 -5
  84. package/dist/generators/ts/TypeFactory.d.ts +7 -8
  85. package/dist/generators/ts/TypeFactory.js +62 -76
  86. package/dist/generators/ts/{AbstractUnionType.d.ts → UnionType.d.ts} +36 -11
  87. package/dist/generators/ts/{AbstractUnionType.js → UnionType.js} +296 -105
  88. package/dist/generators/ts/ZodGenerator.d.ts +1 -1
  89. package/dist/generators/ts/ZodGenerator.js +21 -16
  90. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/AbstractProperty.d.ts +9 -6
  91. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/AbstractProperty.js +3 -3
  92. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/DiscriminantProperty.d.ts +9 -13
  93. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/DiscriminantProperty.js +22 -39
  94. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/IdentifierProperty.d.ts +1 -5
  95. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/IdentifierProperty.js +18 -13
  96. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.d.ts +5 -0
  97. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.js +44 -0
  98. package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.d.ts +5 -0
  99. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.js → _ObjectType/ObjectType_equalsFunctionDeclaration.js} +3 -7
  100. package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.d.ts +5 -0
  101. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_filterFunctionDeclaration.js → _ObjectType/ObjectType_filterFunctionDeclaration.js} +3 -6
  102. package/dist/generators/ts/_ObjectType/ObjectType_filterTypeDeclaration.d.ts +5 -0
  103. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_filterTypeDeclaration.js → _ObjectType/ObjectType_filterTypeDeclaration.js} +2 -5
  104. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  105. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js → _ObjectType/ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js} +2 -6
  106. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  107. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js → _ObjectType/ObjectType_focusSparqlWherePatternsFunctionDeclaration.js} +5 -24
  108. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +5 -0
  109. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +18 -0
  110. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +5 -0
  111. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.js +51 -0
  112. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +5 -0
  113. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +15 -0
  114. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.d.ts +5 -0
  115. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.js → _ObjectType/ObjectType_fromRdfTypeVariableStatement.js} +2 -2
  116. package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeVariableStatement.d.ts +5 -0
  117. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.js → _ObjectType/ObjectType_graphqlTypeVariableStatement.js} +4 -4
  118. package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.d.ts +4 -0
  119. package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.js +41 -0
  120. package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.d.ts +4 -0
  121. package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.js +12 -0
  122. package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.d.ts +5 -0
  123. package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +20 -0
  124. package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +5 -0
  125. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js → _ObjectType/ObjectType_jsonParseFunctionDeclaration.js} +2 -2
  126. package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.d.ts +5 -0
  127. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js → _ObjectType/ObjectType_jsonSchemaFunctionDeclaration.js} +5 -11
  128. package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.d.ts +5 -0
  129. package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.js +9 -0
  130. package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.d.ts +5 -0
  131. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js → _ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.js} +4 -6
  132. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_objectSetMethodNames.d.ts → _ObjectType/ObjectType_objectSetMethodNames.d.ts} +3 -3
  133. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_objectSetMethodNames.js → _ObjectType/ObjectType_objectSetMethodNames.js} +4 -4
  134. package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.d.ts +5 -0
  135. package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +12 -0
  136. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts → _ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts} +3 -3
  137. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js → _ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js} +5 -5
  138. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts → _ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts} +3 -3
  139. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +12 -0
  140. package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.d.ts +5 -0
  141. package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.js +20 -0
  142. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionDeclaration.d.ts +5 -0
  143. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js → _ObjectType/ObjectType_toRdfResourceFunctionDeclaration.js} +4 -4
  144. package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.d.ts +4 -0
  145. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js → _ObjectType/ObjectType_toStringFunctionDeclarations.js} +7 -14
  146. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  147. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js → _ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js} +3 -3
  148. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  149. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js → _ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js} +3 -3
  150. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/ShaclProperty.js +12 -12
  151. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +4 -0
  152. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.js +16 -0
  153. package/dist/generators/ts/_snippets/snippets_convertToArraySet.d.ts +3 -0
  154. package/dist/generators/ts/_snippets/snippets_convertToArraySet.js +8 -0
  155. package/dist/generators/ts/_snippets/snippets_convertToList.d.ts +3 -0
  156. package/dist/generators/ts/_snippets/snippets_convertToList.js +7 -0
  157. package/dist/generators/ts/_snippets/snippets_convertToScalarSet.d.ts +3 -0
  158. package/dist/generators/ts/_snippets/snippets_convertToScalarSet.js +15 -0
  159. package/dist/input/generated.d.ts +758 -117
  160. package/dist/input/generated.js +636 -128
  161. package/package.json +4 -6
  162. package/dist/generators/ts/AbstractNamedUnionType.d.ts +0 -30
  163. package/dist/generators/ts/AbstractNamedUnionType.js +0 -190
  164. package/dist/generators/ts/AnonymousUnionType.d.ts +0 -27
  165. package/dist/generators/ts/AnonymousUnionType.js +0 -59
  166. package/dist/generators/ts/NamedObjectType.js +0 -342
  167. package/dist/generators/ts/NamedObjectUnionType.d.ts +0 -37
  168. package/dist/generators/ts/NamedUnionType.d.ts +0 -11
  169. package/dist/generators/ts/NamedUnionType.js +0 -13
  170. package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.d.ts +0 -5
  171. package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +0 -65
  172. package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.d.ts +0 -5
  173. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.d.ts +0 -5
  174. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.d.ts +0 -5
  175. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  176. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +0 -5
  177. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.d.ts +0 -5
  178. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +0 -43
  179. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.d.ts +0 -5
  180. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +0 -80
  181. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +0 -5
  182. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +0 -15
  183. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.d.ts +0 -5
  184. package/dist/generators/ts/_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.d.ts +0 -5
  185. package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.d.ts +0 -4
  186. package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.js +0 -45
  187. package/dist/generators/ts/_NamedObjectType/NamedObjectType_interfaceDeclaration.d.ts +0 -4
  188. package/dist/generators/ts/_NamedObjectType/NamedObjectType_interfaceDeclaration.js +0 -16
  189. package/dist/generators/ts/_NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.d.ts +0 -5
  190. package/dist/generators/ts/_NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.js +0 -17
  191. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.d.ts +0 -5
  192. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.d.ts +0 -5
  193. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.d.ts +0 -5
  194. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js +0 -16
  195. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.d.ts +0 -5
  196. package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.d.ts +0 -5
  197. package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.js +0 -12
  198. package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js +0 -12
  199. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.d.ts +0 -5
  200. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.js +0 -41
  201. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.d.ts +0 -5
  202. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.d.ts +0 -4
  203. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  204. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +0 -5
  205. package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.d.ts +0 -4
  206. package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.js +0 -25
  207. package/dist/generators/ts/_snippets/snippets_convertToArray.d.ts +0 -3
  208. package/dist/generators/ts/_snippets/snippets_convertToArray.js +0 -8
  209. /package/dist/generators/ts/{_NamedObjectType → _ObjectType}/Property.d.ts +0 -0
  210. /package/dist/generators/ts/{_NamedObjectType → _ObjectType}/Property.js +0 -0
  211. /package/dist/generators/ts/{_NamedObjectType → _ObjectType}/ShaclProperty.d.ts +0 -0
@@ -1,4 +1,3 @@
1
- import type { AnonymousUnionType } from "./AnonymousUnionType.js";
2
1
  import type { BigDecimalType } from "./BigDecimalType.js";
3
2
  import type { BigIntType } from "./BigIntType.js";
4
3
  import type { BlankNodeType } from "./BlankNodeType.js";
@@ -15,12 +14,12 @@ import type { LazyObjectSetType } from "./LazyObjectSetType.js";
15
14
  import type { LazyObjectType } from "./LazyObjectType.js";
16
15
  import type { ListType } from "./ListType.js";
17
16
  import type { LiteralType } from "./LiteralType.js";
18
- import type { NamedObjectType } from "./NamedObjectType.js";
19
- import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
20
- import type { NamedUnionType } from "./NamedUnionType.js";
17
+ import type { ObjectType } from "./ObjectType.js";
18
+ import type { ObjectUnionType } from "./ObjectUnionType.js";
21
19
  import type { OptionType } from "./OptionType.js";
22
20
  import type { SetType } from "./SetType.js";
23
21
  import type { StringType } from "./StringType.js";
24
22
  import type { TermType } from "./TermType.js";
25
- export type Type = AnonymousUnionType | BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DefaultValueType<DefaultValueType.ItemType> | FloatType | IdentifierType | IntType | IriType | LazyObjectOptionType | LazyObjectSetType | LazyObjectType | ListType<ListType.ItemType> | LiteralType | NamedObjectUnionType | NamedUnionType | NamedObjectType | OptionType<OptionType.ItemType> | SetType<SetType.ItemType> | StringType | TermType;
23
+ import type { UnionType } from "./UnionType.js";
24
+ export type Type = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DefaultValueType<DefaultValueType.ItemType> | FloatType | IdentifierType | IntType | IriType | LazyObjectOptionType | LazyObjectSetType | LazyObjectType | ListType<ListType.ItemType> | LiteralType | ObjectUnionType | ObjectType | OptionType<OptionType.ItemType> | SetType<SetType.ItemType> | StringType | TermType | UnionType<Type>;
26
25
  //# sourceMappingURL=Type.d.ts.map
@@ -1,18 +1,17 @@
1
1
  import type { Literal, NamedNode } from "@rdfjs/types";
2
2
  import type { Logger } from "ts-log";
3
3
  import * as ast from "../../ast/index.js";
4
- import { AnonymousUnionType } from "./AnonymousUnionType.js";
5
- import { NamedObjectType } from "./NamedObjectType.js";
6
- import { NamedObjectUnionType } from "./NamedObjectUnionType.js";
7
- import { NamedUnionType } from "./NamedUnionType.js";
4
+ import { ObjectType } from "./ObjectType.js";
5
+ import { ObjectUnionType } from "./ObjectUnionType.js";
8
6
  import type { Reusables } from "./Reusables.js";
9
7
  import type { TsGenerator } from "./TsGenerator.js";
10
8
  import type { Type } from "./Type.js";
9
+ import { UnionType } from "./UnionType.js";
11
10
  export declare class TypeFactory {
12
11
  private readonly configuration;
13
12
  private readonly logger;
14
13
  private readonly reusables;
15
- private cachedNamedObjectUnionTypesByShapeIdentifier;
14
+ private cachedObjectUnionTypesByShapeIdentifier;
16
15
  private cachedObjectTypePropertiesByShapeIdentifier;
17
16
  private cachedObjectTypesByShapeIdentifier;
18
17
  constructor({ configuration, logger, reusables, }: {
@@ -20,12 +19,12 @@ export declare class TypeFactory {
20
19
  logger: Logger;
21
20
  reusables: Reusables;
22
21
  });
23
- createNamedObjectType(astType: ast.ObjectType): NamedObjectType;
24
- createNamedObjectUnionType(astType: ast.ObjectUnionType): NamedObjectUnionType;
22
+ createObjectType(astType: ast.ObjectType): ObjectType;
23
+ createObjectUnionType(astType: ast.ObjectUnionType): ObjectUnionType;
25
24
  createType(astType: ast.Type, parameters?: {
26
25
  defaultValue?: Literal | NamedNode;
27
26
  }): Type;
28
- createUnionType(astType: ast.UnionType): AnonymousUnionType | NamedUnionType | NamedObjectUnionType;
27
+ createUnionType(astType: ast.UnionType): ObjectUnionType | UnionType<Type>;
29
28
  private createBlankNodeType;
30
29
  private createDefaultValueType;
31
30
  private createIdentifierType;
@@ -7,7 +7,6 @@ import { Maybe } from "purify-ts";
7
7
  import reservedTsIdentifiers_ from "reserved-identifiers";
8
8
  import { invariant } from "ts-invariant";
9
9
  import * as ast from "../../ast/index.js";
10
- import { AnonymousUnionType } from "./AnonymousUnionType.js";
11
10
  import { BigDecimalType } from "./BigDecimalType.js";
12
11
  import { BigIntType } from "./BigIntType.js";
13
12
  import { BlankNodeType } from "./BlankNodeType.js";
@@ -24,19 +23,18 @@ import { LazyObjectSetType } from "./LazyObjectSetType.js";
24
23
  import { LazyObjectType } from "./LazyObjectType.js";
25
24
  import { ListType } from "./ListType.js";
26
25
  import { LiteralType } from "./LiteralType.js";
27
- import { NamedObjectType } from "./NamedObjectType.js";
28
- import { NamedObjectUnionType } from "./NamedObjectUnionType.js";
29
- import { NamedUnionType } from "./NamedUnionType.js";
26
+ import { ObjectType } from "./ObjectType.js";
27
+ import { ObjectUnionType } from "./ObjectUnionType.js";
30
28
  import { OptionType } from "./OptionType.js";
31
29
  import { SetType } from "./SetType.js";
32
30
  import { StringType } from "./StringType.js";
33
31
  import { TermType } from "./TermType.js";
34
- import { code } from "./ts-poet-wrapper.js";
32
+ import { UnionType } from "./UnionType.js";
35
33
  export class TypeFactory {
36
34
  configuration;
37
35
  logger;
38
36
  reusables;
39
- cachedNamedObjectUnionTypesByShapeIdentifier = new TermMap();
37
+ cachedObjectUnionTypesByShapeIdentifier = new TermMap();
40
38
  cachedObjectTypePropertiesByShapeIdentifier = new TermMap();
41
39
  cachedObjectTypesByShapeIdentifier = new TermMap();
42
40
  constructor({ configuration, logger, reusables, }) {
@@ -44,48 +42,32 @@ export class TypeFactory {
44
42
  this.logger = logger;
45
43
  this.reusables = reusables;
46
44
  }
47
- createNamedObjectType(astType) {
45
+ createObjectType(astType) {
48
46
  {
49
47
  const cachedObjectType = this.cachedObjectTypesByShapeIdentifier.get(astType.shapeIdentifier);
50
48
  if (cachedObjectType) {
51
49
  return cachedObjectType;
52
50
  }
53
51
  }
52
+ const discriminantProperty = astType.name.map((name) => new ObjectType.DiscriminantProperty({
53
+ configuration: this.configuration,
54
+ logger: this.logger,
55
+ name: `${this.configuration.syntheticNamePrefix}type`,
56
+ objectType: { alias: astType.name },
57
+ reusables: this.reusables,
58
+ value: name,
59
+ }));
54
60
  const identifierType = this.createIdentifierType(astType.identifierType);
55
- const name = this.tsName(astType.name.unsafeCoerce(), {
56
- synthetic: astType.synthetic,
57
- });
58
- const namedObjectType = new NamedObjectType({
61
+ const objectType = new ObjectType({
62
+ alias: astType.name.map((name) => this.tsName(name, { synthetic: astType.synthetic })),
63
+ discriminantProperty,
59
64
  comment: astType.comment,
60
65
  configuration: this.configuration,
61
66
  extern: astType.extern,
62
67
  fromRdfType: astType.fromRdfType,
63
68
  identifierType,
64
69
  label: astType.label,
65
- lazyAncestorObjectTypes: () => astType.ancestorObjectTypes.map((astType) => this.createNamedObjectType(astType)),
66
- lazyChildObjectTypes: () => astType.childObjectTypes.map((astType) => this.createNamedObjectType(astType)),
67
- lazyDescendantObjectTypes: () => astType.descendantObjectTypes.map((astType) => this.createNamedObjectType(astType)),
68
- lazyDiscriminantProperty: (namedObjectType) => {
69
- // Discriminant property
70
- const discriminantDescendantValues = new Set();
71
- for (const descendantObjectType of namedObjectType.descendantObjectTypes) {
72
- discriminantDescendantValues.add(descendantObjectType.discriminantValue);
73
- }
74
- return new NamedObjectType.DiscriminantProperty({
75
- configuration: this.configuration,
76
- logger: this.logger,
77
- name: `${this.configuration.syntheticNamePrefix}type`,
78
- namedObjectType,
79
- reusables: this.reusables,
80
- type: new NamedObjectType.DiscriminantProperty.Type({
81
- descendantValues: [...discriminantDescendantValues].sort(),
82
- mutable: false,
83
- ownValues: [namedObjectType.discriminantValue],
84
- }),
85
- });
86
- },
87
- lazyParentObjectTypes: () => astType.parentObjectTypes.map((astType) => this.createNamedObjectType(astType)),
88
- lazyProperties: (namedObjectType) => {
70
+ lazyProperties: (objectType) => {
89
71
  const properties = astType.properties
90
72
  .toSorted((left, right) => {
91
73
  if (left.order < right.order) {
@@ -98,54 +80,54 @@ export class TypeFactory {
98
80
  })
99
81
  .map((astProperty) => this.createObjectTypeProperty({
100
82
  astObjectTypeProperty: astProperty,
101
- namedObjectType,
83
+ objectType,
102
84
  }));
103
- properties.splice(0, 0, namedObjectType._discriminantProperty);
104
- properties.splice(0, 0, new NamedObjectType.IdentifierProperty({
85
+ discriminantProperty.ifJust((discriminantProperty) => {
86
+ properties.splice(0, 0, discriminantProperty);
87
+ });
88
+ properties.splice(0, 0, new ObjectType.IdentifierProperty({
105
89
  configuration: this.configuration,
106
90
  logger: this.logger,
107
91
  name: `${this.configuration.syntheticNamePrefix}identifier`,
108
- namedObjectType,
92
+ objectType,
109
93
  reusables: this.reusables,
110
94
  type: identifierType,
111
- typeAlias: code `${name}.Identifier`,
112
95
  }));
113
96
  return properties;
114
97
  },
115
98
  logger: this.logger,
116
- name,
117
99
  recursive: astType.recursive,
118
100
  reusables: this.reusables,
119
101
  synthetic: astType.synthetic,
120
102
  toRdfTypes: astType.toRdfTypes,
121
103
  });
122
- this.cachedObjectTypesByShapeIdentifier.set(astType.shapeIdentifier, namedObjectType);
123
- return namedObjectType;
104
+ this.cachedObjectTypesByShapeIdentifier.set(astType.shapeIdentifier, objectType);
105
+ return objectType;
124
106
  }
125
- createNamedObjectUnionType(astType) {
107
+ createObjectUnionType(astType) {
126
108
  {
127
- const cachedNamedObjectUnionType = this.cachedNamedObjectUnionTypesByShapeIdentifier.get(astType.shapeIdentifier);
128
- if (cachedNamedObjectUnionType) {
129
- return cachedNamedObjectUnionType;
109
+ const cachedObjectUnionType = this.cachedObjectUnionTypesByShapeIdentifier.get(astType.shapeIdentifier);
110
+ if (cachedObjectUnionType) {
111
+ return cachedObjectUnionType;
130
112
  }
131
113
  }
132
- const namedObjectUnionType = new NamedObjectUnionType({
114
+ const objectUnionType = new ObjectUnionType({
115
+ alias: astType.name.map((name) => this.tsName(name)),
133
116
  comment: astType.comment,
134
117
  configuration: this.configuration,
135
- identifierType: this.createIdentifierType(ast.ObjectCompoundType.identifierType(astType)),
118
+ identifierType: Maybe.of(this.createIdentifierType(ast.ObjectCompoundType.identifierType(astType))),
136
119
  label: astType.label,
137
120
  logger: this.logger,
138
121
  members: ast.ObjectCompoundType.memberObjectTypes(astType).map((namedObjectType) => ({
139
122
  discriminantValue: Maybe.empty(),
140
- type: this.createNamedObjectType(namedObjectType),
123
+ type: this.createObjectType(namedObjectType),
141
124
  })),
142
- name: this.tsName(astType.name.unsafeCoerce()),
143
125
  recursive: astType.recursive,
144
126
  reusables: this.reusables,
145
127
  synthetic: astType.synthetic,
146
128
  });
147
- this.cachedNamedObjectUnionTypesByShapeIdentifier.set(astType.shapeIdentifier, namedObjectUnionType);
148
- return namedObjectUnionType;
129
+ this.cachedObjectUnionTypesByShapeIdentifier.set(astType.shapeIdentifier, objectUnionType);
130
+ return objectUnionType;
149
131
  }
150
132
  createType(astType, parameters) {
151
133
  switch (astType.kind) {
@@ -170,7 +152,7 @@ export class TypeFactory {
170
152
  case "Literal":
171
153
  return this.createLiteralType(astType, parameters);
172
154
  case "Object":
173
- return this.createNamedObjectType(astType);
155
+ return this.createObjectType(astType);
174
156
  case "Option":
175
157
  return this.createOptionType(astType);
176
158
  case "Set":
@@ -183,10 +165,10 @@ export class TypeFactory {
183
165
  }
184
166
  createUnionType(astType) {
185
167
  if (astType.isObjectUnionType()) {
186
- return this.createNamedObjectUnionType(astType);
168
+ return this.createObjectUnionType(astType);
187
169
  }
188
- return astType.name
189
- .map((name) => new NamedUnionType({
170
+ return new UnionType({
171
+ alias: astType.name.map((name) => this.tsName(name)),
190
172
  comment: astType.comment,
191
173
  configuration: this.configuration,
192
174
  identifierType: Maybe.empty(),
@@ -196,26 +178,14 @@ export class TypeFactory {
196
178
  discriminantValue: member.discriminantValue,
197
179
  type: this.createType(member.type),
198
180
  })),
199
- name,
200
181
  recursive: astType.recursive,
201
182
  reusables: this.reusables,
202
- }))
203
- .orDefaultLazy(() => new AnonymousUnionType({
204
- comment: astType.comment,
205
- configuration: this.configuration,
206
- label: astType.label,
207
- identifierType: Maybe.empty(),
208
- logger: this.logger,
209
- members: astType.members.map((member) => ({
210
- discriminantValue: member.discriminantValue,
211
- type: this.createType(member.type),
212
- })),
213
- recursive: astType.recursive,
214
- reusables: this.reusables,
215
- }));
183
+ synthetic: astType.synthetic,
184
+ });
216
185
  }
217
186
  createBlankNodeType(astType) {
218
187
  return new BlankNodeType({
188
+ alias: astType.name.map((name) => this.tsName(name)),
219
189
  comment: astType.comment,
220
190
  configuration: this.configuration,
221
191
  label: astType.label,
@@ -229,6 +199,7 @@ export class TypeFactory {
229
199
  });
230
200
  invariant(DefaultValueType.isItemType(itemType));
231
201
  return new DefaultValueType({
202
+ alias: astType.name.map((name) => this.tsName(name)),
232
203
  comment: astType.comment,
233
204
  configuration: this.configuration,
234
205
  defaultValue: astType.defaultValue,
@@ -244,6 +215,7 @@ export class TypeFactory {
244
215
  return this.createBlankNodeType(astType);
245
216
  case "Identifier":
246
217
  return new IdentifierType({
218
+ alias: astType.name.map((name) => this.tsName(name)),
247
219
  comment: astType.comment,
248
220
  configuration: this.configuration,
249
221
  label: astType.label,
@@ -256,6 +228,7 @@ export class TypeFactory {
256
228
  }
257
229
  createIriType(astType) {
258
230
  return new IriType({
231
+ alias: astType.name.map((name) => this.tsName(name)),
259
232
  comment: astType.comment,
260
233
  configuration: this.configuration,
261
234
  hasValues: astType.hasValues,
@@ -267,6 +240,7 @@ export class TypeFactory {
267
240
  }
268
241
  createLazyObjectOptionType(astType) {
269
242
  return new LazyObjectOptionType({
243
+ alias: astType.name.map((name) => this.tsName(name)),
270
244
  comment: astType.comment,
271
245
  configuration: this.configuration,
272
246
  label: astType.label,
@@ -278,6 +252,7 @@ export class TypeFactory {
278
252
  }
279
253
  createLazyObjectSetType(astType) {
280
254
  return new LazyObjectSetType({
255
+ alias: astType.name.map((name) => this.tsName(name)),
281
256
  comment: astType.comment,
282
257
  configuration: this.configuration,
283
258
  label: astType.label,
@@ -289,6 +264,7 @@ export class TypeFactory {
289
264
  }
290
265
  createLazyObjectType(astType) {
291
266
  return new LazyObjectType({
267
+ alias: astType.name.map((name) => this.tsName(name)),
292
268
  comment: astType.comment,
293
269
  configuration: this.configuration,
294
270
  label: astType.label,
@@ -302,13 +278,13 @@ export class TypeFactory {
302
278
  const itemType = this.createType(astType.itemType);
303
279
  invariant(ListType.isItemType(itemType));
304
280
  return new ListType({
281
+ alias: astType.name.map((name) => this.tsName(name)),
305
282
  comment: astType.comment,
306
283
  configuration: this.configuration,
307
284
  identifierNodeKind: astType.identifierNodeKind,
308
285
  itemType,
309
286
  label: astType.label,
310
287
  logger: this.logger,
311
- minCount: 0n,
312
288
  mutable: astType.mutable,
313
289
  reusables: this.reusables,
314
290
  toRdfTypes: astType.toRdfTypes,
@@ -339,6 +315,7 @@ export class TypeFactory {
339
315
  switch (datatypeDefinition.kind) {
340
316
  case "bigdecimal":
341
317
  return new BigDecimalType({
318
+ alias: astType.name.map((name) => this.tsName(name)),
342
319
  comment: astType.comment,
343
320
  configuration: this.configuration,
344
321
  hasValues: astType.hasValues,
@@ -350,6 +327,7 @@ export class TypeFactory {
350
327
  });
351
328
  case "bigint":
352
329
  return new BigIntType({
330
+ alias: astType.name.map((name) => this.tsName(name)),
353
331
  comment: astType.comment,
354
332
  configuration: this.configuration,
355
333
  datatype,
@@ -363,6 +341,7 @@ export class TypeFactory {
363
341
  });
364
342
  case "boolean":
365
343
  return new BooleanType({
344
+ alias: astType.name.map((name) => this.tsName(name)),
366
345
  comment: astType.comment,
367
346
  configuration: this.configuration,
368
347
  datatype,
@@ -377,6 +356,7 @@ export class TypeFactory {
377
356
  case "date":
378
357
  case "datetime":
379
358
  return new (datatypeDefinition.kind === "date" ? DateType : DateTimeType)({
359
+ alias: astType.name.map((name) => this.tsName(name)),
380
360
  comment: astType.comment,
381
361
  configuration: this.configuration,
382
362
  datatype,
@@ -393,6 +373,7 @@ export class TypeFactory {
393
373
  case "float":
394
374
  case "int":
395
375
  return new (datatypeDefinition.kind === "float" ? FloatType : IntType)({
376
+ alias: astType.name.map((name) => this.tsName(name)),
396
377
  comment: astType.comment,
397
378
  configuration: this.configuration,
398
379
  datatype,
@@ -409,6 +390,7 @@ export class TypeFactory {
409
390
  case "string":
410
391
  if (!datatype.equals(rdf.langString)) {
411
392
  return new StringType({
393
+ alias: astType.name.map((name) => this.tsName(name)),
412
394
  comment: astType.comment,
413
395
  configuration: this.configuration,
414
396
  datatype,
@@ -438,6 +420,7 @@ export class TypeFactory {
438
420
  // // this.logger.debug("literal type has no datatypes");
439
421
  // }
440
422
  return new LiteralType({
423
+ alias: astType.name.map((name) => this.tsName(name)),
441
424
  comment: astType.comment,
442
425
  configuration: this.configuration,
443
426
  hasValues: astType.hasValues,
@@ -448,14 +431,14 @@ export class TypeFactory {
448
431
  reusables: this.reusables,
449
432
  });
450
433
  }
451
- createObjectTypeProperty({ astObjectTypeProperty, namedObjectType, }) {
434
+ createObjectTypeProperty({ astObjectTypeProperty, objectType, }) {
452
435
  {
453
436
  const cachedProperty = this.cachedObjectTypePropertiesByShapeIdentifier.get(astObjectTypeProperty.shapeIdentifier);
454
437
  if (cachedProperty) {
455
438
  return cachedProperty;
456
439
  }
457
440
  }
458
- const property = new NamedObjectType.ShaclProperty({
441
+ const property = new ObjectType.ShaclProperty({
459
442
  comment: astObjectTypeProperty.comment,
460
443
  configuration: this.configuration,
461
444
  description: astObjectTypeProperty.description,
@@ -463,7 +446,7 @@ export class TypeFactory {
463
446
  label: astObjectTypeProperty.label,
464
447
  logger: this.logger,
465
448
  mutable: astObjectTypeProperty.mutable,
466
- namedObjectType,
449
+ objectType,
467
450
  name: this.tsName(astObjectTypeProperty.name),
468
451
  path: astObjectTypeProperty.path,
469
452
  recursive: !!astObjectTypeProperty.recursive,
@@ -477,6 +460,7 @@ export class TypeFactory {
477
460
  const itemType = this.createType(astType.itemType);
478
461
  invariant(OptionType.isItemType(itemType));
479
462
  return new OptionType({
463
+ alias: astType.name.map((name) => this.tsName(name)),
480
464
  comment: astType.comment,
481
465
  configuration: this.configuration,
482
466
  itemType,
@@ -489,6 +473,7 @@ export class TypeFactory {
489
473
  const itemType = this.createType(astType.itemType);
490
474
  invariant(SetType.isItemType(itemType));
491
475
  return new SetType({
476
+ alias: astType.name.map((name) => this.tsName(name)),
492
477
  comment: astType.comment,
493
478
  configuration: this.configuration,
494
479
  itemType,
@@ -501,6 +486,7 @@ export class TypeFactory {
501
486
  }
502
487
  createTermType(astType) {
503
488
  return new TermType({
489
+ alias: astType.name.map((name) => this.tsName(name)),
504
490
  comment: astType.comment,
505
491
  configuration: this.configuration,
506
492
  hasValues: astType.hasValues,
@@ -6,26 +6,41 @@ import type { IriType } from "./IriType.js";
6
6
  import type { Type } from "./Type.js";
7
7
  import type { Typeof } from "./Typeof.js";
8
8
  import { type Code } from "./ts-poet-wrapper.js";
9
- export declare abstract class AbstractUnionType<MemberTypeT extends Type> extends AbstractType {
9
+ export declare class UnionType<MemberTypeT extends Type> extends AbstractType {
10
10
  private readonly discriminant;
11
- private readonly identifierType;
11
+ readonly graphqlArgs: AbstractType["graphqlArgs"];
12
+ readonly identifierType: Maybe<BlankNodeType | IdentifierType | IriType>;
13
+ readonly kind: "ObjectUnion" | "Union";
12
14
  readonly recursive: boolean;
15
+ readonly synthetic: boolean;
13
16
  readonly validationFunction: Maybe<Code>;
14
- constructor({ identifierType, members, recursive, ...superParameters }: {
17
+ constructor({ identifierType, members, recursive, synthetic, ...superParameters }: {
15
18
  identifierType: Maybe<BlankNodeType | IdentifierType | IriType>;
16
19
  members: readonly (Pick<AbstractUnionType.Member<MemberTypeT>, "type"> & {
17
20
  readonly discriminantValue: Maybe<number | string>;
18
21
  })[];
19
22
  recursive: boolean;
23
+ synthetic: boolean;
20
24
  } & ConstructorParameters<typeof AbstractType>[0]);
21
25
  get conversionFunction(): Maybe<AbstractType.ConversionFunction>;
26
+ get declaration(): Maybe<Code>;
22
27
  get discriminantProperty(): Maybe<AbstractType.DiscriminantProperty>;
28
+ get equalsFunction(): Code;
29
+ get filterFunction(): Code;
30
+ get filterType(): Code;
31
+ get graphqlType(): AbstractType.GraphqlType;
32
+ get hashFunction(): Code;
33
+ get jsonSchemaFunctionDeclaration(): Code;
34
+ get jsonTypeAliasDeclaration(): Code;
23
35
  get members(): readonly AbstractUnionType.Member<MemberTypeT>[];
24
36
  get mutable(): boolean;
37
+ get expression(): Code;
25
38
  get referencesObjectType(): boolean;
26
39
  get schemaType(): Code;
27
40
  get toRdfResourceValueTypes(): AbstractType["toRdfResourceValueTypes"];
28
- get typeofs(): AbstractType["typeofs"];
41
+ get jsTypes(): AbstractType["jsTypes"];
42
+ get valueSparqlConstructTriplesFunction(): Code;
43
+ get valueSparqlWherePatternsFunction(): Code;
29
44
  protected get inlineEqualsFunction(): Code;
30
45
  protected get inlineFilterFunction(): Code;
31
46
  protected get inlineFilterType(): Code;
@@ -34,14 +49,27 @@ export declare abstract class AbstractUnionType<MemberTypeT extends Type> extend
34
49
  protected get inlineHashFunction(): Code;
35
50
  protected get inlineJsonSchema(): Code;
36
51
  protected get inlineJsonType(): AbstractType.JsonType;
37
- protected get inlineName(): Code;
52
+ protected get inlineExpression(): Code;
38
53
  protected get inlineToJsonFunction(): Code;
39
54
  protected get inlineToRdfResourceValuesFunction(): Code;
40
55
  protected get inlineToStringFunction(): Code;
41
56
  protected get inlineValueSparqlConstructTriplesFunction(): Code;
42
57
  protected get inlineValueSparqlWherePatternsFunction(): Code;
43
58
  protected get schemaInitializers(): readonly Code[];
59
+ protected get staticModuleDeclarations(): Record<string, Code>;
60
+ fromJsonExpression({ variables, }: Parameters<AbstractType["fromJsonExpression"]>[0]): Code;
61
+ fromRdfResourceValuesExpression({ variables, }: Parameters<AbstractType["fromRdfResourceValuesExpression"]>[0]): Code;
62
+ graphqlResolveExpression({ variables, }: {
63
+ variables: {
64
+ value: Code;
65
+ };
66
+ }): Code;
67
+ jsonSchema({ context, }: Parameters<AbstractType["jsonSchema"]>[0]): Code;
68
+ jsonType(): AbstractType.JsonType;
44
69
  jsonUiSchemaElement(): Maybe<Code>;
70
+ toJsonExpression({ variables, }: Parameters<AbstractType["toJsonExpression"]>[0]): Code;
71
+ toRdfResourceValuesExpression({ variables, }: Parameters<AbstractType["toRdfResourceValuesExpression"]>[0]): Code;
72
+ toStringExpression({ variables, }: Parameters<AbstractType["toStringExpression"]>[0]): Code;
45
73
  private readonly lazyMembers;
46
74
  }
47
75
  type Discriminant = ExtrinsicDiscriminant | HybridDiscriminant | IntrinsicDiscriminant | TypeofDiscriminant;
@@ -56,17 +84,14 @@ type HybridDiscriminant = {
56
84
  readonly kind: "Hybrid";
57
85
  readonly memberValues: readonly {
58
86
  readonly kind: "Extrinsic" | "Intrinsic";
59
- readonly ownValues: readonly AbstractType.DiscriminantProperty.Value[];
87
+ readonly values: readonly AbstractType.DiscriminantProperty.Value[];
60
88
  }[];
61
89
  readonly name: string;
62
90
  };
63
91
  type IntrinsicDiscriminant = {
64
92
  readonly jsonName: string;
65
93
  readonly kind: "Intrinsic";
66
- readonly memberValues: readonly {
67
- readonly descendantValues: readonly AbstractType.DiscriminantProperty.Value[];
68
- readonly ownValues: readonly AbstractType.DiscriminantProperty.Value[];
69
- }[];
94
+ readonly memberValues: readonly AbstractType.DiscriminantProperty.Value[];
70
95
  readonly name: string;
71
96
  };
72
97
  type TypeofDiscriminant = {
@@ -93,4 +118,4 @@ export declare namespace AbstractUnionType {
93
118
  }
94
119
  }
95
120
  export {};
96
- //# sourceMappingURL=AbstractUnionType.d.ts.map
121
+ //# sourceMappingURL=UnionType.d.ts.map