@shaclmate/compiler 4.0.7 → 4.0.9

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 (306) hide show
  1. package/dist/Compiler.d.ts +1 -4
  2. package/dist/Compiler.js +1 -5
  3. package/dist/ShapesGraphToAstTransformer.d.ts +2 -11
  4. package/dist/ShapesGraphToAstTransformer.js +25 -27
  5. package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.d.ts +3 -0
  6. package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.js +5 -0
  7. package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.d.ts +4 -0
  8. package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +27 -0
  9. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +74 -19
  10. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.d.ts +1 -1
  11. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +45 -91
  12. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +11 -0
  13. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +146 -0
  14. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.d.ts +7 -0
  15. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +182 -0
  16. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +9 -7
  17. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +3 -5
  18. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +33 -10
  19. package/dist/ast/AbstractCompoundType.d.ts +26 -8
  20. package/dist/ast/AbstractCompoundType.js +84 -16
  21. package/dist/ast/AbstractContainerType.d.ts +2 -4
  22. package/dist/ast/AbstractContainerType.js +3 -4
  23. package/dist/ast/AbstractLazyObjectType.d.ts +1 -0
  24. package/dist/ast/AbstractLazyObjectType.js +3 -0
  25. package/dist/ast/AbstractTermType.d.ts +1 -0
  26. package/dist/ast/AbstractTermType.js +1 -0
  27. package/dist/ast/AbstractType.d.ts +16 -1
  28. package/dist/ast/AbstractType.js +11 -1
  29. package/dist/ast/Ast.d.ts +4 -4
  30. package/dist/ast/BlankNodeType.d.ts +1 -1
  31. package/dist/ast/DefaultValueType.d.ts +1 -2
  32. package/dist/ast/DefaultValueType.js +2 -0
  33. package/dist/ast/IdentifierType.d.ts +1 -1
  34. package/dist/ast/IntersectionType.d.ts +7 -2
  35. package/dist/ast/IntersectionType.js +8 -0
  36. package/dist/ast/ListType.d.ts +2 -9
  37. package/dist/ast/ListType.js +1 -9
  38. package/dist/ast/LiteralType.d.ts +1 -0
  39. package/dist/ast/LiteralType.js +26 -0
  40. package/dist/ast/ObjectCompoundType.d.ts +12 -0
  41. package/dist/ast/ObjectCompoundType.js +88 -0
  42. package/dist/ast/ObjectIntersectionType.d.ts +3 -7
  43. package/dist/ast/ObjectIntersectionType.js +1 -7
  44. package/dist/ast/ObjectType.d.ts +14 -31
  45. package/dist/ast/ObjectType.js +41 -73
  46. package/dist/ast/ObjectUnionType.d.ts +3 -7
  47. package/dist/ast/ObjectUnionType.js +1 -7
  48. package/dist/ast/OptionType.d.ts +1 -2
  49. package/dist/ast/OptionType.js +2 -0
  50. package/dist/ast/SetType.d.ts +1 -2
  51. package/dist/ast/SetType.js +2 -0
  52. package/dist/ast/Type.d.ts +1 -4
  53. package/dist/ast/Type.js +0 -6
  54. package/dist/ast/UnionType.d.ts +11 -6
  55. package/dist/ast/UnionType.js +6 -4
  56. package/dist/ast/index.d.ts +1 -2
  57. package/dist/ast/index.js +1 -2
  58. package/dist/generators/json/AstJsonGenerator.js +16 -14
  59. package/dist/generators/ts/AbstractCollectionType.js +8 -10
  60. package/dist/generators/ts/AbstractContainerType.d.ts +8 -3
  61. package/dist/generators/ts/AbstractContainerType.js +9 -2
  62. package/dist/generators/ts/AbstractDateType.d.ts +2 -2
  63. package/dist/generators/ts/AbstractDateType.js +2 -2
  64. package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
  65. package/dist/generators/ts/AbstractIdentifierType.js +1 -1
  66. package/dist/generators/ts/AbstractLazyObjectType.d.ts +11 -8
  67. package/dist/generators/ts/AbstractLazyObjectType.js +19 -14
  68. package/dist/generators/ts/AbstractNamedUnionType.d.ts +33 -0
  69. package/dist/generators/ts/AbstractNamedUnionType.js +193 -0
  70. package/dist/generators/ts/AbstractNumericType.d.ts +2 -2
  71. package/dist/generators/ts/AbstractNumericType.js +3 -3
  72. package/dist/generators/ts/AbstractTermType.d.ts +7 -4
  73. package/dist/generators/ts/AbstractTermType.js +7 -4
  74. package/dist/generators/ts/AbstractType.d.ts +29 -14
  75. package/dist/generators/ts/AbstractUnionType.d.ts +80 -0
  76. package/dist/generators/ts/AbstractUnionType.js +514 -0
  77. package/dist/generators/ts/AnonymousUnionType.d.ts +26 -0
  78. package/dist/generators/ts/AnonymousUnionType.js +56 -0
  79. package/dist/generators/ts/BigDecimalType.d.ts +3 -3
  80. package/dist/generators/ts/BigDecimalType.js +3 -3
  81. package/dist/generators/ts/BlankNodeType.d.ts +1 -1
  82. package/dist/generators/ts/BlankNodeType.js +1 -1
  83. package/dist/generators/ts/BooleanType.d.ts +2 -2
  84. package/dist/generators/ts/BooleanType.js +2 -2
  85. package/dist/generators/ts/DefaultValueType.d.ts +4 -4
  86. package/dist/generators/ts/DefaultValueType.js +14 -13
  87. package/dist/generators/ts/IdentifierType.d.ts +1 -1
  88. package/dist/generators/ts/IdentifierType.js +1 -1
  89. package/dist/generators/ts/IriType.d.ts +1 -1
  90. package/dist/generators/ts/IriType.js +1 -1
  91. package/dist/generators/ts/LazyObjectOptionType.d.ts +1 -1
  92. package/dist/generators/ts/LazyObjectOptionType.js +9 -9
  93. package/dist/generators/ts/LazyObjectSetType.d.ts +1 -1
  94. package/dist/generators/ts/LazyObjectSetType.js +7 -7
  95. package/dist/generators/ts/LazyObjectType.d.ts +1 -1
  96. package/dist/generators/ts/LazyObjectType.js +7 -8
  97. package/dist/generators/ts/ListType.d.ts +8 -7
  98. package/dist/generators/ts/ListType.js +14 -13
  99. package/dist/generators/ts/LiteralType.d.ts +1 -1
  100. package/dist/generators/ts/LiteralType.js +2 -2
  101. package/dist/generators/ts/NamedObjectUnionType.d.ts +35 -0
  102. package/dist/generators/ts/NamedObjectUnionType.js +221 -0
  103. package/dist/generators/ts/NamedUnionType.d.ts +11 -0
  104. package/dist/generators/ts/NamedUnionType.js +13 -0
  105. package/dist/generators/ts/ObjectType.d.ts +34 -25
  106. package/dist/generators/ts/ObjectType.js +62 -52
  107. package/dist/generators/ts/OptionType.d.ts +4 -4
  108. package/dist/generators/ts/OptionType.js +10 -10
  109. package/dist/generators/ts/SetType.d.ts +4 -4
  110. package/dist/generators/ts/SetType.js +13 -11
  111. package/dist/generators/ts/StringType.d.ts +2 -2
  112. package/dist/generators/ts/StringType.js +2 -2
  113. package/dist/generators/ts/TermType.d.ts +1 -1
  114. package/dist/generators/ts/TermType.js +2 -2
  115. package/dist/generators/ts/TsGenerator.js +23 -15
  116. package/dist/generators/ts/Type.d.ts +4 -3
  117. package/dist/generators/ts/TypeFactory.d.ts +7 -5
  118. package/dist/generators/ts/TypeFactory.js +117 -90
  119. package/dist/generators/ts/ZodGenerator.js +6 -6
  120. package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +3 -3
  121. package/dist/generators/ts/_ObjectType/{TypeDiscriminantProperty.d.ts → DiscriminantProperty.d.ts} +14 -14
  122. package/dist/generators/ts/_ObjectType/{TypeDiscriminantProperty.js → DiscriminantProperty.js} +10 -10
  123. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.d.ts +2 -2
  124. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.js +2 -2
  125. package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +2 -2
  126. package/dist/generators/ts/_ObjectType/IdentifierProperty.js +7 -4
  127. package/dist/generators/ts/_ObjectType/ObjectType_classDeclaration.js +8 -8
  128. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  129. package/dist/generators/ts/_ObjectType/{ObjectType_sparqlConstructTriplesFunctionDeclaration.js → ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js} +6 -5
  130. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  131. package/dist/generators/ts/_ObjectType/{ObjectType_sparqlWherePatternsFunctionDeclarations.js → ObjectType_focusSparqlWherePatternsFunctionDeclaration.js} +5 -5
  132. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +5 -0
  133. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +20 -0
  134. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +5 -0
  135. package/dist/generators/ts/_ObjectType/{ObjectType_fromRdfFunctionDeclaration.js → ObjectType_fromRdfResourceFunctionDeclaration.js} +6 -7
  136. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +5 -0
  137. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +20 -0
  138. package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +2 -2
  139. package/dist/generators/ts/_ObjectType/ObjectType_parseJsonFunctionDeclaration.d.ts +5 -0
  140. package/dist/generators/ts/_ObjectType/ObjectType_parseJsonFunctionDeclaration.js +19 -0
  141. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromJsonFunctionDeclaration.d.ts +5 -0
  142. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromJsonFunctionDeclaration.js +38 -0
  143. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromRdfResourceFunctionDeclaration.d.ts +5 -0
  144. package/dist/generators/ts/_ObjectType/{ObjectType_propertiesFromRdfFunctionDeclaration.js → ObjectType_propertiesFromRdfResourceFunctionDeclaration.js} +16 -15
  145. package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +1 -2
  146. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +2 -2
  147. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionOrMethodDeclaration.d.ts +5 -0
  148. package/dist/generators/ts/_ObjectType/{ObjectType_toRdfFunctionOrMethodDeclaration.js → ObjectType_toRdfResourceFunctionOrMethodDeclaration.js} +10 -8
  149. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  150. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +13 -0
  151. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  152. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js +15 -0
  153. package/dist/generators/ts/_ObjectType/Property.d.ts +2 -2
  154. package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +2 -2
  155. package/dist/generators/ts/_ObjectType/ShaclProperty.js +6 -6
  156. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +2 -0
  157. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +12 -0
  158. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +2 -0
  159. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +14 -0
  160. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +2 -0
  161. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +15 -0
  162. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +2 -0
  163. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +17 -0
  164. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +2 -0
  165. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +15 -0
  166. package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +5 -0
  167. package/dist/generators/ts/_snippets/snippets_PropertyPath.js +35 -0
  168. package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +2 -2
  169. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +2 -0
  170. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +7 -0
  171. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +2 -0
  172. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +16 -0
  173. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +2 -0
  174. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +13 -0
  175. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +2 -0
  176. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +16 -0
  177. package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +2 -2
  178. package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +2 -2
  179. package/dist/generators/ts/_snippets/snippets_booleanEquals.js +1 -1
  180. package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +2 -2
  181. package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +2 -2
  182. package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +2 -2
  183. package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +1 -1
  184. package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +2 -2
  185. package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +2 -2
  186. package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +2 -2
  187. package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +2 -2
  188. package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +2 -2
  189. package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +2 -2
  190. package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +2 -2
  191. package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +2 -3
  192. package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +2 -2
  193. package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +2 -2
  194. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +4 -3
  195. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +4 -3
  196. package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +3 -2
  197. package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +2 -2
  198. package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +2 -2
  199. package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +2 -2
  200. package/dist/generators/ts/graphqlSchemaVariableStatement.js +4 -4
  201. package/dist/generators/ts/imports.d.ts +1 -1
  202. package/dist/generators/ts/imports.js +1 -1
  203. package/dist/generators/ts/objectSetDeclarations.d.ts +3 -3
  204. package/dist/generators/ts/objectSetDeclarations.js +15 -15
  205. package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +3 -3
  206. package/dist/generators/ts/objectSetInterfaceDeclaration.js +2 -2
  207. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +3 -3
  208. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +16 -17
  209. package/dist/generators/ts/snippets.d.ts +10 -6
  210. package/dist/generators/ts/snippets.js +20 -12
  211. package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +3 -3
  212. package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +7 -8
  213. package/dist/generators/ts/synthesizeUberObjectUnionType.d.ts +2 -2
  214. package/dist/generators/ts/synthesizeUberObjectUnionType.js +9 -4
  215. package/dist/input/NodeShape.d.ts +5 -6
  216. package/dist/input/NodeShape.js +19 -22
  217. package/dist/input/Ontology.d.ts +4 -4
  218. package/dist/input/Ontology.js +10 -10
  219. package/dist/input/PropertyShape.d.ts +4 -4
  220. package/dist/input/PropertyShape.js +10 -10
  221. package/dist/input/ShapesGraph.d.ts +3 -2
  222. package/dist/input/ShapesGraph.js +13 -8
  223. package/dist/input/generated.d.ts +2551 -2040
  224. package/dist/input/generated.js +2806 -2346
  225. package/package.json +3 -5
  226. package/dist/_ShapesGraphToAstTransformer/CurieFactory.d.ts +0 -16
  227. package/dist/_ShapesGraphToAstTransformer/CurieFactory.js +0 -45
  228. package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.d.ts +0 -3
  229. package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.js +0 -2
  230. package/dist/_ShapesGraphToAstTransformer/index.d.ts +0 -6
  231. package/dist/_ShapesGraphToAstTransformer/index.js +0 -6
  232. package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.d.ts +0 -5
  233. package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.js +0 -9
  234. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +0 -11
  235. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +0 -338
  236. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.d.ts +0 -12
  237. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.js +0 -31
  238. package/dist/ast/AbstractObjectCompoundType.d.ts +0 -45
  239. package/dist/ast/AbstractObjectCompoundType.js +0 -180
  240. package/dist/ast/Curie.d.ts +0 -21
  241. package/dist/ast/Curie.js +0 -29
  242. package/dist/ast/PlaceholderType.d.ts +0 -15
  243. package/dist/ast/PlaceholderType.js +0 -19
  244. package/dist/generators/codeName.d.ts +0 -6
  245. package/dist/generators/codeName.js +0 -66
  246. package/dist/generators/ts/AbstractDeclaredType.d.ts +0 -23
  247. package/dist/generators/ts/AbstractDeclaredType.js +0 -17
  248. package/dist/generators/ts/ObjectUnionType.d.ts +0 -65
  249. package/dist/generators/ts/ObjectUnionType.js +0 -257
  250. package/dist/generators/ts/UnionType.d.ts +0 -40
  251. package/dist/generators/ts/UnionType.js +0 -527
  252. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.d.ts +0 -4
  253. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.js +0 -66
  254. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfFunctionDeclaration.d.ts +0 -5
  255. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromRdfFunctionDeclaration.d.ts +0 -5
  256. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  257. package/dist/generators/ts/_ObjectType/ObjectType_sparqlWherePatternsFunctionDeclarations.d.ts +0 -5
  258. package/dist/generators/ts/_ObjectType/ObjectType_toRdfFunctionOrMethodDeclaration.d.ts +0 -5
  259. package/dist/generators/ts/_ObjectUnionType/MemberType.d.ts +0 -34
  260. package/dist/generators/ts/_ObjectUnionType/MemberType.js +0 -105
  261. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.d.ts +0 -5
  262. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.js +0 -29
  263. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.d.ts +0 -4
  264. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.js +0 -19
  265. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.d.ts +0 -4
  266. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.js +0 -10
  267. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.d.ts +0 -5
  268. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.js +0 -19
  269. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.d.ts +0 -5
  270. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.js +0 -20
  271. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.d.ts +0 -5
  272. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.js +0 -18
  273. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.d.ts +0 -5
  274. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.js +0 -28
  275. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.d.ts +0 -4
  276. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.js +0 -9
  277. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.d.ts +0 -5
  278. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.js +0 -13
  279. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.d.ts +0 -5
  280. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.js +0 -10
  281. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.d.ts +0 -5
  282. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.js +0 -14
  283. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.d.ts +0 -4
  284. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.js +0 -37
  285. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  286. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.js +0 -15
  287. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.d.ts +0 -5
  288. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.js +0 -35
  289. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.d.ts +0 -5
  290. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.js +0 -26
  291. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.d.ts +0 -5
  292. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.js +0 -43
  293. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.d.ts +0 -4
  294. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.js +0 -10
  295. package/dist/generators/ts/_snippets/snippets_FromRdfOptions.d.ts +0 -2
  296. package/dist/generators/ts/_snippets/snippets_FromRdfOptions.js +0 -5
  297. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.d.ts +0 -2
  298. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.js +0 -5
  299. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.d.ts +0 -2
  300. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.js +0 -6
  301. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.d.ts +0 -2
  302. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.js +0 -12
  303. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.d.ts +0 -2
  304. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.js +0 -6
  305. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.d.ts +0 -2
  306. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.js +0 -15
@@ -0,0 +1,221 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { pascalCase } from "change-case";
8
+ import { Maybe } from "purify-ts";
9
+ import { PropertyPath } from "rdfjs-resource";
10
+ import { Memoize } from "typescript-memoize";
11
+ import { ObjectType_objectSetMethodNames } from "./_ObjectType/ObjectType_objectSetMethodNames.js";
12
+ import { ObjectType_sparqlConstructQueryFunctionDeclaration } from "./_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js";
13
+ import { ObjectType_sparqlConstructQueryStringFunctionDeclaration } from "./_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js";
14
+ import { AbstractNamedUnionType } from "./AbstractNamedUnionType.js";
15
+ import { AbstractType } from "./AbstractType.js";
16
+ import { imports } from "./imports.js";
17
+ import { snippets } from "./snippets.js";
18
+ import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
19
+ import { code, joinCode, literalOf } from "./ts-poet-wrapper.js";
20
+ function singleEntryRecord(key, value) {
21
+ const record = {};
22
+ record[key] = value;
23
+ return record;
24
+ }
25
+ export class NamedObjectUnionType extends AbstractNamedUnionType {
26
+ #identifierType;
27
+ graphqlArgs = Maybe.empty();
28
+ kind = "NamedObjectUnionType";
29
+ constructor({ identifierType, ...superParameters }) {
30
+ super({ ...superParameters, identifierType: Maybe.of(identifierType) });
31
+ this.#identifierType = identifierType;
32
+ }
33
+ get graphqlType() {
34
+ return new AbstractType.GraphqlType(code `${this._name}.${syntheticNamePrefix}GraphQL`);
35
+ }
36
+ get identifierTypeAlias() {
37
+ return code `${this.staticModuleName}.${syntheticNamePrefix}Identifier`;
38
+ }
39
+ get objectSetMethodNames() {
40
+ return ObjectType_objectSetMethodNames.call(this);
41
+ }
42
+ get schema() {
43
+ return code `${this.staticModuleName}.${syntheticNamePrefix}schema`;
44
+ }
45
+ get schemaType() {
46
+ return code `typeof ${this.schema}`;
47
+ }
48
+ get staticModuleDeclarations() {
49
+ return {
50
+ ...super.staticModuleDeclarations,
51
+ ...this.identifierTypeDeclarations,
52
+ ...this.focusSparqlConstructTriplesFunctionDeclaration,
53
+ ...this.focusSparqlWherePatternsFunctionDeclaration,
54
+ ...this.fromRdfResourceFunctionDeclaration,
55
+ ...this.graphqlTypeVariableStatement,
56
+ ...this.isTypeFunctionDeclaration,
57
+ ...this.schemaVariableStatement,
58
+ ...ObjectType_sparqlConstructQueryFunctionDeclaration.call(this)
59
+ .map((code_) => singleEntryRecord(`${syntheticNamePrefix}sparqlConstructQuery`, code_))
60
+ .orDefault({}),
61
+ ...ObjectType_sparqlConstructQueryStringFunctionDeclaration.call(this)
62
+ .map((code_) => singleEntryRecord(`${syntheticNamePrefix}sparqlConstructQueryString`, code_))
63
+ .orDefault({}),
64
+ ...this.toRdfResourceFunctionDeclaration,
65
+ };
66
+ }
67
+ get focusSparqlConstructTriplesFunctionDeclaration() {
68
+ if (!this.features.has("sparql")) {
69
+ return {};
70
+ }
71
+ return singleEntryRecord(`${syntheticNamePrefix}focusSparqlConstructTriples`, code `\
72
+ export function ${syntheticNamePrefix}focusSparqlConstructTriples({ filter, focusIdentifier, variablePrefix }: { filter: ${this.filterType} | undefined; focusIdentifier: ${imports.NamedNode} | ${imports.Variable}; ignoreRdfType: boolean; variablePrefix: string }): readonly ${imports.sparqljs}.Triple[] {
73
+ return [${joinCode(this.concreteMembers.map((member) => code `...${member.type.staticModuleName}.${syntheticNamePrefix}focusSparqlConstructTriples({ filter: filter?.on?.${member.type.name}, focusIdentifier, ignoreRdfType: false, variablePrefix: \`\${variablePrefix}${pascalCase(member.type.name)}\` }).concat()`), { on: ", " })}];
74
+ }`);
75
+ }
76
+ get focusSparqlWherePatternsFunctionDeclaration() {
77
+ if (!this.features.has("sparql")) {
78
+ return {};
79
+ }
80
+ return singleEntryRecord(`${syntheticNamePrefix}focusSparqlWherePatterns`, code `\
81
+ export function ${syntheticNamePrefix}focusSparqlWherePatterns({ filter, focusIdentifier, preferredLanguages, variablePrefix }: { filter: ${this.filterType} | undefined; focusIdentifier: ${imports.NamedNode} | ${imports.Variable}; ignoreRdfType: boolean; preferredLanguages: readonly string[] | undefined; variablePrefix: string }): readonly ${snippets.SparqlPattern}[] {
82
+ ${joinCode([
83
+ code `let patterns: ${snippets.SparqlPattern}[] = [];`,
84
+ code `\
85
+ if (focusIdentifier.termType === "Variable") {
86
+ patterns = patterns.concat(${this.#identifierType.valueSparqlWherePatternsFunction}({
87
+ filter: filter?.${syntheticNamePrefix}identifier,
88
+ ignoreRdfType: false,
89
+ preferredLanguages,
90
+ propertyPatterns: [],
91
+ schema: ${this.#identifierType.schema},
92
+ valueVariable: focusIdentifier,
93
+ variablePrefix,
94
+ }));
95
+ }`,
96
+ code `patterns.push({ patterns: [${joinCode(this.concreteMembers.map((member) => code `${{
97
+ patterns: code `${member.type.staticModuleName}.${syntheticNamePrefix}focusSparqlWherePatterns({ filter: filter?.on?.${member.type.name}, focusIdentifier, ignoreRdfType: false, preferredLanguages, variablePrefix: \`\${variablePrefix}${pascalCase(member.type.name)}\` }).concat()`,
98
+ type: literalOf("group"),
99
+ }}`), { on: ", " })}], type: "union" });`,
100
+ code `return patterns;`,
101
+ ])}
102
+ }`);
103
+ }
104
+ get fromRdfResourceFunctionDeclaration() {
105
+ if (!this.features.has("rdf")) {
106
+ return {};
107
+ }
108
+ return singleEntryRecord(`${syntheticNamePrefix}fromRdfResource`, code `\
109
+ export const ${syntheticNamePrefix}fromRdfResource: ${snippets.FromRdfResourceFunction}<${this.name}> = (resource, options) =>
110
+ ${this.concreteMembers.reduce((expression, member) => {
111
+ const memberTypeExpression = code `(${member.type.staticModuleName}.${syntheticNamePrefix}fromRdfResource(resource, { ...options, ignoreRdfType: false }) as ${imports.Either}<Error, ${this.name}>)`;
112
+ return expression !== null
113
+ ? code `${expression}.altLazy(() => ${memberTypeExpression})`
114
+ : memberTypeExpression;
115
+ }, null)};`);
116
+ }
117
+ get graphqlTypeVariableStatement() {
118
+ if (!this.features.has("graphql")) {
119
+ return {};
120
+ }
121
+ return singleEntryRecord(`${syntheticNamePrefix}GraphQL`, code `\
122
+ export const ${syntheticNamePrefix}GraphQL = new ${imports.GraphQLUnionType}(${{
123
+ description: this.comment.map(JSON.stringify).extract(),
124
+ name: this.name,
125
+ resolveType: code `(value: ${this.name}) => value.${syntheticNamePrefix}type`,
126
+ types: code `[${joinCode(this.concreteMembers.map((member) => member.type.graphqlType.nullableName), { on: ", " })}]`,
127
+ }});`);
128
+ }
129
+ get identifierTypeDeclarations() {
130
+ return singleEntryRecord(`${syntheticNamePrefix}Identifier`, code `\
131
+ export type ${syntheticNamePrefix}Identifier = ${this.#identifierType.name};
132
+ export namespace ${syntheticNamePrefix}Identifier { ${joinCode([this.#identifierType.fromStringFunction, this.#identifierType.toStringFunction])} }`);
133
+ }
134
+ get isTypeFunctionDeclaration() {
135
+ if (this._name === `${syntheticNamePrefix}Object`) {
136
+ return {};
137
+ }
138
+ return singleEntryRecord(`is${this._name}`, code `\
139
+ export function is${this._name}(object: ${syntheticNamePrefix}Object): object is ${this.name} {
140
+ return ${joinCode(this.concreteMembers.map((member) => code `${member.type.staticModuleName}.is${member.type.name}(object)`), { on: " || " })};
141
+ }`);
142
+ }
143
+ get schemaVariableStatement() {
144
+ const commonPropertiesByName = {};
145
+ this.concreteMembers.forEach((member, memberI) => {
146
+ for (const memberTypeProperty of member.type.ownProperties.concat(member.type.ancestorObjectTypes.flatMap((ancestorObjectType) => ancestorObjectType.ownProperties))) {
147
+ if (memberTypeProperty.kind !== "ShaclProperty") {
148
+ continue;
149
+ }
150
+ let commonProperty = commonPropertiesByName[memberTypeProperty.name];
151
+ if (commonProperty) {
152
+ if (PropertyPath.equals(commonProperty.property.path, memberTypeProperty.path)) {
153
+ commonProperty.memberTypesWithProperty[memberI] = true;
154
+ }
155
+ }
156
+ else {
157
+ commonPropertiesByName[memberTypeProperty.name] = commonProperty = {
158
+ memberTypesWithProperty: new Array(this.concreteMembers.length).fill(false),
159
+ property: memberTypeProperty,
160
+ };
161
+ commonProperty.memberTypesWithProperty[memberI] = true;
162
+ }
163
+ }
164
+ });
165
+ const propertiesObject = [];
166
+ for (const name of Object.keys(commonPropertiesByName).toSorted()) {
167
+ const { memberTypesWithProperty, property } = commonPropertiesByName[name];
168
+ if (!memberTypesWithProperty.every((value) => value)) {
169
+ continue;
170
+ }
171
+ propertiesObject.push(code `${property.name}: ${property.schema}`);
172
+ }
173
+ return singleEntryRecord(`${syntheticNamePrefix}schema`, code `\
174
+ export const ${syntheticNamePrefix}schema =
175
+ ${{
176
+ ...super.schemaObject,
177
+ properties: code `{ ${joinCode(propertiesObject, { on: ", " })} }`,
178
+ }} as const;`);
179
+ }
180
+ get toRdfResourceFunctionDeclaration() {
181
+ if (!this.features.has("rdf")) {
182
+ return {};
183
+ }
184
+ return singleEntryRecord(``, code `\
185
+ export const ${syntheticNamePrefix}toRdfResource: ${snippets.ToRdfResourceFunction}<${this.name}> = (value, options) => {
186
+ ${joinCode(this.concreteMembers
187
+ .map((member) => {
188
+ let returnExpression;
189
+ switch (member.type.declarationType) {
190
+ case "class":
191
+ returnExpression = code `value.${syntheticNamePrefix}toRdfResource(options)`;
192
+ break;
193
+ case "interface":
194
+ returnExpression = code `${member.type.staticModuleName}.${syntheticNamePrefix}toRdfResource(value, options)`;
195
+ break;
196
+ }
197
+ return code `if (${member.type.staticModuleName}.is${member.type.name}(value)) { return ${returnExpression}; }`;
198
+ })
199
+ .concat(code `throw new Error("unrecognized type");`))}
200
+ };`);
201
+ }
202
+ graphqlResolveExpression({ variables, }) {
203
+ return variables.value;
204
+ }
205
+ }
206
+ __decorate([
207
+ Memoize()
208
+ ], NamedObjectUnionType.prototype, "graphqlType", null);
209
+ __decorate([
210
+ Memoize()
211
+ ], NamedObjectUnionType.prototype, "identifierTypeAlias", null);
212
+ __decorate([
213
+ Memoize()
214
+ ], NamedObjectUnionType.prototype, "objectSetMethodNames", null);
215
+ __decorate([
216
+ Memoize()
217
+ ], NamedObjectUnionType.prototype, "schema", null);
218
+ __decorate([
219
+ Memoize()
220
+ ], NamedObjectUnionType.prototype, "schemaType", null);
221
+ //# sourceMappingURL=NamedObjectUnionType.js.map
@@ -0,0 +1,11 @@
1
+ import { AbstractNamedUnionType } from "./AbstractNamedUnionType.js";
2
+ import type { AbstractType } from "./AbstractType.js";
3
+ import type { Type } from "./Type.js";
4
+ import type { Code } from "./ts-poet-wrapper.js";
5
+ export declare class NamedUnionType extends AbstractNamedUnionType<Type> {
6
+ readonly graphqlArgs: AbstractType["graphqlArgs"];
7
+ readonly kind = "NamedUnionType";
8
+ graphqlResolveExpression(): Code;
9
+ get graphqlType(): AbstractType.GraphqlType;
10
+ }
11
+ //# sourceMappingURL=NamedUnionType.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { Maybe } from "purify-ts";
2
+ import { AbstractNamedUnionType } from "./AbstractNamedUnionType.js";
3
+ export class NamedUnionType extends AbstractNamedUnionType {
4
+ graphqlArgs = Maybe.empty();
5
+ kind = "NamedUnionType";
6
+ graphqlResolveExpression() {
7
+ throw new Error("GraphQL doesn't support scalar unions");
8
+ }
9
+ get graphqlType() {
10
+ throw new Error("GraphQL doesn't support scalar unions");
11
+ }
12
+ }
13
+ //# sourceMappingURL=NamedUnionType.js.map
@@ -1,65 +1,71 @@
1
1
  import type { NamedNode } from "@rdfjs/types";
2
2
  import { Maybe, NonEmptyList } from "purify-ts";
3
- import type { IdentifierMintingStrategy } from "../../enums/IdentifierMintingStrategy.js";
3
+ import type { TsFeature } from "../../enums/TsFeature.js";
4
4
  import type { TsObjectDeclarationType } from "../../enums/TsObjectDeclarationType.js";
5
+ import { DiscriminantProperty as _DiscriminantProperty } from "./_ObjectType/DiscriminantProperty.js";
5
6
  import { IdentifierPrefixProperty as _IdentifierPrefixProperty } from "./_ObjectType/IdentifierPrefixProperty.js";
6
7
  import { IdentifierProperty as _IdentifierProperty } from "./_ObjectType/IdentifierProperty.js";
7
8
  import type { Property as _Property } from "./_ObjectType/Property.js";
8
9
  import { ShaclProperty as _ShaclProperty } from "./_ObjectType/ShaclProperty.js";
9
- import { TypeDiscriminantProperty as _TypeDiscriminantProperty } from "./_ObjectType/TypeDiscriminantProperty.js";
10
- import { AbstractDeclaredType } from "./AbstractDeclaredType.js";
10
+ import { AbstractType } from "./AbstractType.js";
11
11
  import type { BlankNodeType } from "./BlankNodeType.js";
12
12
  import type { IdentifierType } from "./IdentifierType.js";
13
13
  import type { IriType } from "./IriType.js";
14
14
  import type { Type } from "./Type.js";
15
15
  import { type Code } from "./ts-poet-wrapper.js";
16
- export declare class ObjectType extends AbstractDeclaredType {
16
+ export declare class ObjectType extends AbstractType {
17
17
  private readonly imports;
18
18
  protected readonly toRdfTypes: readonly NamedNode[];
19
19
  readonly abstract: boolean;
20
20
  readonly declarationType: TsObjectDeclarationType;
21
21
  readonly extern: boolean;
22
+ readonly features: ReadonlySet<TsFeature>;
22
23
  readonly fromRdfType: Maybe<NamedNode>;
23
- readonly graphqlArgs: AbstractDeclaredType["graphqlArgs"];
24
+ readonly graphqlArgs: AbstractType["graphqlArgs"];
24
25
  readonly identifierType: BlankNodeType | IdentifierType | IriType;
25
26
  readonly kind = "ObjectType";
27
+ readonly name: string;
28
+ readonly recursive: boolean;
26
29
  readonly staticModuleName: string;
27
30
  readonly synthetic: boolean;
28
31
  readonly typeofs: NonEmptyList<"object">;
29
- constructor({ abstract, declarationType, extern, fromRdfType, identifierType, imports, lazyAncestorObjectTypes, lazyChildObjectTypes, lazyDescendantObjectTypes, lazyParentObjectTypes, lazyProperties, staticModuleName, synthetic, toRdfTypes, ...superParameters }: {
32
+ constructor({ abstract, declarationType, extern, features, fromRdfType, identifierType, imports, lazyAncestorObjectTypes, lazyChildObjectTypes, lazyDescendantObjectTypes, lazyDiscriminantProperty, lazyIdentifierProperty, lazyParentObjectTypes, lazyProperties, name, recursive, staticModuleName, synthetic, toRdfTypes, ...superParameters }: {
30
33
  abstract: boolean;
31
34
  comment: Maybe<string>;
32
35
  declarationType: TsObjectDeclarationType;
33
36
  extern: boolean;
37
+ features: ReadonlySet<TsFeature>;
34
38
  fromRdfType: Maybe<NamedNode>;
35
- identifierMintingStrategy: Maybe<IdentifierMintingStrategy>;
36
39
  identifierType: BlankNodeType | IdentifierType | IriType;
37
40
  imports: readonly string[];
38
41
  label: Maybe<string>;
39
42
  lazyAncestorObjectTypes: () => readonly ObjectType[];
40
43
  lazyChildObjectTypes: () => readonly ObjectType[];
44
+ lazyDiscriminantProperty: (objectType: ObjectType) => ObjectType.DiscriminantProperty;
45
+ lazyIdentifierProperty: (objectType: ObjectType) => ObjectType.IdentifierProperty;
41
46
  lazyDescendantObjectTypes: () => readonly ObjectType[];
42
47
  lazyParentObjectTypes: () => readonly ObjectType[];
43
48
  lazyProperties: (objectType: ObjectType) => readonly ObjectType.Property[];
49
+ name: string;
50
+ recursive: boolean;
44
51
  staticModuleName: string;
45
52
  synthetic: boolean;
46
53
  toRdfTypes: readonly NamedNode[];
47
- } & ConstructorParameters<typeof AbstractDeclaredType>[0]);
48
- get _discriminantProperty(): AbstractDeclaredType.DiscriminantProperty;
54
+ } & ConstructorParameters<typeof AbstractType>[0]);
49
55
  get ancestorObjectTypes(): readonly ObjectType[];
50
56
  get childObjectTypes(): readonly ObjectType[];
51
- get conversions(): readonly AbstractDeclaredType.Conversion[];
52
- get declaration(): Code;
57
+ get conversions(): readonly AbstractType.Conversion[];
58
+ get declaration(): Maybe<Code>;
53
59
  get descendantFromRdfTypeVariables(): readonly Code[];
54
60
  get descendantFromRdfTypes(): readonly NamedNode[];
55
61
  get descendantObjectTypes(): readonly ObjectType[];
56
- get discriminantProperty(): Maybe<AbstractDeclaredType.DiscriminantProperty>;
62
+ get discriminantProperty(): Maybe<AbstractType.DiscriminantProperty>;
57
63
  get discriminantValue(): string;
58
64
  get equalsFunction(): Code;
59
65
  get filterFunction(): Code;
60
66
  get filterType(): Code;
61
67
  get fromRdfTypeVariable(): Maybe<Code>;
62
- get graphqlType(): AbstractDeclaredType.GraphqlType;
68
+ get graphqlType(): AbstractType.GraphqlType;
63
69
  get identifierProperty(): ObjectType.IdentifierProperty;
64
70
  get identifierTypeAlias(): Code;
65
71
  get mutable(): boolean;
@@ -70,30 +76,33 @@ export declare class ObjectType extends AbstractDeclaredType {
70
76
  get properties(): readonly ObjectType.Property[];
71
77
  get schema(): Code;
72
78
  get schemaType(): Code;
73
- get sparqlConstructTriplesFunction(): Code;
74
- get sparqlWherePatternsFunction(): Code;
79
+ get valueSparqlConstructTriplesFunction(): Code;
80
+ get valueSparqlWherePatternsFunction(): Code;
75
81
  get toRdfjsResourceType(): Code;
82
+ get _discriminantProperty(): ObjectType.DiscriminantProperty;
76
83
  protected get thisVariable(): Code;
77
- fromJsonExpression({ variables, }: Parameters<AbstractDeclaredType["fromJsonExpression"]>[0]): Code;
78
- fromRdfExpression({ variables, }: Parameters<AbstractDeclaredType["fromRdfExpression"]>[0]): Code;
84
+ fromJsonExpression({ variables, }: Parameters<AbstractType["fromJsonExpression"]>[0]): Code;
85
+ fromRdfResourceValuesExpression({ variables, }: Parameters<AbstractType["fromRdfResourceValuesExpression"]>[0]): Code;
79
86
  graphqlResolveExpression({ variables, }: {
80
87
  variables: {
81
88
  value: Code;
82
89
  };
83
90
  }): Code;
84
- hashStatements({ variables, }: Parameters<AbstractDeclaredType["hashStatements"]>[0]): readonly Code[];
85
- jsonType(): AbstractDeclaredType.JsonType;
86
- jsonUiSchemaElement({ variables, }: Parameters<AbstractDeclaredType["jsonUiSchemaElement"]>[0]): Maybe<Code>;
87
- jsonZodSchema({ context, }: Parameters<AbstractDeclaredType["jsonZodSchema"]>[0]): Code;
91
+ hashStatements({ variables, }: Parameters<AbstractType["hashStatements"]>[0]): readonly Code[];
92
+ jsonType(): AbstractType.JsonType;
93
+ jsonUiSchemaElement({ variables, }: Parameters<AbstractType["jsonUiSchemaElement"]>[0]): Maybe<Code>;
94
+ jsonZodSchema({ context, }: Parameters<AbstractType["jsonZodSchema"]>[0]): Code;
88
95
  newExpression({ parameters }: {
89
96
  parameters: Code;
90
97
  }): Code;
91
- toJsonExpression({ variables, }: Parameters<AbstractDeclaredType["toJsonExpression"]>[0]): Code;
92
- toRdfExpression({ variables, }: Parameters<AbstractDeclaredType["toRdfExpression"]>[0]): Code;
98
+ toJsonExpression({ variables, }: Parameters<AbstractType["toJsonExpression"]>[0]): Code;
99
+ toRdfResourceValuesExpression({ variables, }: Parameters<AbstractType["toRdfResourceValuesExpression"]>[0]): Code;
93
100
  protected ensureAtMostOneSuperObjectType(): void;
94
101
  private readonly lazyAncestorObjectTypes;
95
102
  private readonly lazyChildObjectTypes;
96
103
  private readonly lazyDescendantObjectTypes;
104
+ private readonly lazyDiscriminantProperty;
105
+ private readonly lazyIdentifierProperty;
97
106
  private readonly lazyParentObjectTypes;
98
107
  private readonly lazyProperties;
99
108
  }
@@ -111,7 +120,7 @@ export declare namespace ObjectType {
111
120
  type Property = _Property;
112
121
  const ShaclProperty: typeof _ShaclProperty;
113
122
  type ShaclProperty<TypeT extends Type> = _ShaclProperty<TypeT>;
114
- const TypeDiscriminantProperty: typeof _TypeDiscriminantProperty;
115
- type TypeDiscriminantProperty = _TypeDiscriminantProperty;
123
+ const DiscriminantProperty: typeof _DiscriminantProperty;
124
+ type DiscriminantProperty = _DiscriminantProperty;
116
125
  }
117
126
  //# sourceMappingURL=ObjectType.d.ts.map