@shaclmate/compiler 4.0.8 → 4.0.10

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 (372) 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 +5 -5
  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 +17 -15
  59. package/dist/generators/ts/AbstractCollectionType.d.ts +1 -1
  60. package/dist/generators/ts/AbstractCollectionType.js +10 -12
  61. package/dist/generators/ts/AbstractContainerType.d.ts +9 -4
  62. package/dist/generators/ts/AbstractContainerType.js +10 -3
  63. package/dist/generators/ts/AbstractDateType.d.ts +2 -2
  64. package/dist/generators/ts/AbstractDateType.js +2 -2
  65. package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
  66. package/dist/generators/ts/AbstractIdentifierType.js +1 -1
  67. package/dist/generators/ts/AbstractLazyObjectType.d.ts +13 -10
  68. package/dist/generators/ts/AbstractLazyObjectType.js +21 -16
  69. package/dist/generators/ts/AbstractNamedUnionType.d.ts +33 -0
  70. package/dist/generators/ts/AbstractNamedUnionType.js +195 -0
  71. package/dist/generators/ts/AbstractNumericType.d.ts +3 -3
  72. package/dist/generators/ts/AbstractNumericType.js +4 -4
  73. package/dist/generators/ts/AbstractTermType.d.ts +7 -4
  74. package/dist/generators/ts/AbstractTermType.js +7 -4
  75. package/dist/generators/ts/AbstractType.d.ts +34 -19
  76. package/dist/generators/ts/AbstractUnionType.d.ts +80 -0
  77. package/dist/generators/ts/AbstractUnionType.js +514 -0
  78. package/dist/generators/ts/AnonymousUnionType.d.ts +26 -0
  79. package/dist/generators/ts/AnonymousUnionType.js +56 -0
  80. package/dist/generators/ts/BigDecimalType.d.ts +4 -4
  81. package/dist/generators/ts/BigDecimalType.js +5 -5
  82. package/dist/generators/ts/BigIntType.d.ts +1 -1
  83. package/dist/generators/ts/BigIntType.js +1 -1
  84. package/dist/generators/ts/BlankNodeType.d.ts +2 -2
  85. package/dist/generators/ts/BlankNodeType.js +2 -2
  86. package/dist/generators/ts/BooleanType.d.ts +3 -3
  87. package/dist/generators/ts/BooleanType.js +3 -3
  88. package/dist/generators/ts/DateTimeType.d.ts +1 -1
  89. package/dist/generators/ts/DateTimeType.js +1 -1
  90. package/dist/generators/ts/DateType.d.ts +1 -1
  91. package/dist/generators/ts/DateType.js +1 -1
  92. package/dist/generators/ts/DefaultValueType.d.ts +5 -5
  93. package/dist/generators/ts/DefaultValueType.js +17 -16
  94. package/dist/generators/ts/IdentifierType.d.ts +2 -2
  95. package/dist/generators/ts/IdentifierType.js +2 -2
  96. package/dist/generators/ts/IriType.d.ts +2 -2
  97. package/dist/generators/ts/IriType.js +2 -2
  98. package/dist/generators/ts/LazyObjectOptionType.d.ts +1 -1
  99. package/dist/generators/ts/LazyObjectOptionType.js +10 -10
  100. package/dist/generators/ts/LazyObjectSetType.d.ts +1 -1
  101. package/dist/generators/ts/LazyObjectSetType.js +8 -8
  102. package/dist/generators/ts/LazyObjectType.d.ts +1 -1
  103. package/dist/generators/ts/LazyObjectType.js +9 -10
  104. package/dist/generators/ts/ListType.d.ts +9 -8
  105. package/dist/generators/ts/ListType.js +15 -14
  106. package/dist/generators/ts/LiteralType.d.ts +2 -2
  107. package/dist/generators/ts/LiteralType.js +3 -3
  108. package/dist/generators/ts/NamedObjectType.d.ts +126 -0
  109. package/dist/generators/ts/NamedObjectType.js +420 -0
  110. package/dist/generators/ts/NamedObjectUnionType.d.ts +35 -0
  111. package/dist/generators/ts/NamedObjectUnionType.js +217 -0
  112. package/dist/generators/ts/NamedUnionType.d.ts +11 -0
  113. package/dist/generators/ts/NamedUnionType.js +13 -0
  114. package/dist/generators/ts/OptionType.d.ts +5 -5
  115. package/dist/generators/ts/OptionType.js +12 -12
  116. package/dist/generators/ts/SetType.d.ts +4 -4
  117. package/dist/generators/ts/SetType.js +13 -11
  118. package/dist/generators/ts/StringType.d.ts +3 -3
  119. package/dist/generators/ts/StringType.js +3 -3
  120. package/dist/generators/ts/TermType.d.ts +2 -2
  121. package/dist/generators/ts/TermType.js +3 -3
  122. package/dist/generators/ts/TsGenerator.js +28 -20
  123. package/dist/generators/ts/Type.d.ts +5 -4
  124. package/dist/generators/ts/TypeFactory.d.ts +9 -7
  125. package/dist/generators/ts/TypeFactory.js +139 -112
  126. package/dist/generators/ts/ZodGenerator.js +18 -16
  127. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/AbstractProperty.d.ts +9 -9
  128. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/AbstractProperty.js +3 -3
  129. package/dist/generators/ts/{_ObjectType/TypeDiscriminantProperty.d.ts → _NamedObjectType/DiscriminantProperty.d.ts} +14 -14
  130. package/dist/generators/ts/{_ObjectType/TypeDiscriminantProperty.js → _NamedObjectType/DiscriminantProperty.js} +22 -20
  131. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/IdentifierPrefixProperty.d.ts +3 -3
  132. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/IdentifierPrefixProperty.js +6 -6
  133. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/IdentifierProperty.d.ts +3 -3
  134. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/IdentifierProperty.js +31 -28
  135. package/dist/generators/ts/_NamedObjectType/NamedObjectType_classDeclaration.d.ts +4 -0
  136. package/dist/generators/ts/{_ObjectType/ObjectType_classDeclaration.js → _NamedObjectType/NamedObjectType_classDeclaration.js} +15 -15
  137. package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.d.ts +5 -0
  138. package/dist/generators/ts/{_ObjectType/ObjectType_createFunctionDeclaration.js → _NamedObjectType/NamedObjectType_createFunctionDeclaration.js} +2 -2
  139. package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionOrMethodDeclaration.d.ts +5 -0
  140. package/dist/generators/ts/{_ObjectType/ObjectType_equalsFunctionOrMethodDeclaration.js → _NamedObjectType/NamedObjectType_equalsFunctionOrMethodDeclaration.js} +2 -2
  141. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.d.ts +4 -0
  142. package/dist/generators/ts/{_ObjectType/ObjectType_filterFunctionDeclaration.js → _NamedObjectType/NamedObjectType_filterFunctionDeclaration.js} +2 -2
  143. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.d.ts +4 -0
  144. package/dist/generators/ts/{_ObjectType/ObjectType_filterTypeDeclaration.js → _NamedObjectType/NamedObjectType_filterTypeDeclaration.js} +2 -2
  145. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  146. package/dist/generators/ts/{_ObjectType/ObjectType_sparqlConstructTriplesFunctionDeclaration.js → _NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js} +6 -5
  147. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  148. package/dist/generators/ts/{_ObjectType/ObjectType_sparqlWherePatternsFunctionDeclarations.js → _NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js} +5 -5
  149. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.d.ts +5 -0
  150. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +20 -0
  151. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.d.ts +5 -0
  152. package/dist/generators/ts/{_ObjectType/ObjectType_fromRdfFunctionDeclaration.js → _NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js} +6 -7
  153. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +5 -0
  154. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +20 -0
  155. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.d.ts +5 -0
  156. package/dist/generators/ts/{_ObjectType/ObjectType_fromRdfTypeVariableStatement.js → _NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.js} +2 -2
  157. package/dist/generators/ts/_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.d.ts +5 -0
  158. package/dist/generators/ts/{_ObjectType/ObjectType_graphqlTypeVariableStatement.js → _NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.js} +2 -2
  159. package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionOrMethodDeclarations.d.ts +4 -0
  160. package/dist/generators/ts/{_ObjectType/ObjectType_hashFunctionOrMethodDeclarations.js → _NamedObjectType/NamedObjectType_hashFunctionOrMethodDeclarations.js} +2 -2
  161. package/dist/generators/ts/_NamedObjectType/NamedObjectType_interfaceDeclaration.d.ts +4 -0
  162. package/dist/generators/ts/{_ObjectType/ObjectType_interfaceDeclaration.js → _NamedObjectType/NamedObjectType_interfaceDeclaration.js} +2 -2
  163. package/dist/generators/ts/_NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.d.ts +4 -0
  164. package/dist/generators/ts/{_ObjectType/ObjectType_isTypeFunctionDeclaration.js → _NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.js} +4 -4
  165. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.d.ts +5 -0
  166. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js +19 -0
  167. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.d.ts +5 -0
  168. package/dist/generators/ts/{_ObjectType/ObjectType_jsonZodSchemaFunctionDeclaration.js → _NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js} +5 -5
  169. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.d.ts +5 -0
  170. package/dist/generators/ts/{_ObjectType/ObjectType_jsonTypeAliasDeclaration.js → _NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js} +2 -2
  171. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.d.ts +5 -0
  172. package/dist/generators/ts/{_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.js → _NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js} +4 -4
  173. package/dist/generators/ts/_NamedObjectType/NamedObjectType_objectSetMethodNames.d.ts +9 -0
  174. package/dist/generators/ts/{_ObjectType/ObjectType_objectSetMethodNames.js → _NamedObjectType/NamedObjectType_objectSetMethodNames.js} +2 -2
  175. package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.d.ts +5 -0
  176. package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.js +38 -0
  177. package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.d.ts +5 -0
  178. package/dist/generators/ts/{_ObjectType/ObjectType_propertiesFromRdfFunctionDeclaration.js → _NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.js} +16 -15
  179. package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.d.ts +4 -0
  180. package/dist/generators/ts/{_ObjectType/ObjectType_schemaVariableStatement.js → _NamedObjectType/NamedObjectType_schemaVariableStatement.js} +3 -4
  181. package/dist/generators/ts/{_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts → _NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts} +2 -2
  182. package/dist/generators/ts/{_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js → _NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js} +4 -4
  183. package/dist/generators/ts/{_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts → _NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts} +2 -2
  184. package/dist/generators/ts/{_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js → _NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js} +2 -2
  185. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionOrMethodDeclaration.d.ts +5 -0
  186. package/dist/generators/ts/{_ObjectType/ObjectType_toJsonFunctionOrMethodDeclaration.js → _NamedObjectType/NamedObjectType_toJsonFunctionOrMethodDeclaration.js} +2 -2
  187. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionOrMethodDeclaration.d.ts +5 -0
  188. package/dist/generators/ts/{_ObjectType/ObjectType_toRdfFunctionOrMethodDeclaration.js → _NamedObjectType/NamedObjectType_toRdfResourceFunctionOrMethodDeclaration.js} +10 -8
  189. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  190. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +13 -0
  191. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  192. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js +15 -0
  193. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/Property.d.ts +2 -2
  194. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/ShaclProperty.d.ts +3 -3
  195. package/dist/generators/ts/{_ObjectType → _NamedObjectType}/ShaclProperty.js +14 -14
  196. package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.d.ts +4 -0
  197. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +2 -0
  198. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +12 -0
  199. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +2 -0
  200. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +14 -0
  201. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +2 -0
  202. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +15 -0
  203. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +2 -0
  204. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +17 -0
  205. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +2 -0
  206. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +15 -0
  207. package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +5 -0
  208. package/dist/generators/ts/_snippets/snippets_PropertyPath.js +35 -0
  209. package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +2 -2
  210. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +2 -0
  211. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +7 -0
  212. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +2 -0
  213. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +16 -0
  214. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +2 -0
  215. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +13 -0
  216. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +2 -0
  217. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +16 -0
  218. package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +2 -2
  219. package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +2 -2
  220. package/dist/generators/ts/_snippets/snippets_booleanEquals.js +1 -1
  221. package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +2 -2
  222. package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +2 -2
  223. package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +2 -2
  224. package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +1 -1
  225. package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +2 -2
  226. package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +2 -2
  227. package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +2 -2
  228. package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +2 -2
  229. package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +2 -2
  230. package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +2 -2
  231. package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +2 -2
  232. package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +2 -3
  233. package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +2 -2
  234. package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +2 -2
  235. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +4 -3
  236. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +4 -3
  237. package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +3 -2
  238. package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +2 -2
  239. package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +2 -2
  240. package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +4 -4
  241. package/dist/generators/ts/graphqlSchemaVariableStatement.js +25 -25
  242. package/dist/generators/ts/imports.d.ts +1 -1
  243. package/dist/generators/ts/imports.js +1 -1
  244. package/dist/generators/ts/objectSetDeclarations.d.ts +5 -5
  245. package/dist/generators/ts/objectSetDeclarations.js +34 -31
  246. package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +5 -5
  247. package/dist/generators/ts/objectSetInterfaceDeclaration.js +6 -4
  248. package/dist/generators/ts/objectSetMethodSignatures.d.ts +4 -4
  249. package/dist/generators/ts/objectSetMethodSignatures.js +9 -9
  250. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +5 -5
  251. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +54 -53
  252. package/dist/generators/ts/singleEntryRecord.d.ts +2 -0
  253. package/dist/generators/ts/singleEntryRecord.js +6 -0
  254. package/dist/generators/ts/snippets.d.ts +10 -6
  255. package/dist/generators/ts/snippets.js +20 -12
  256. package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +5 -5
  257. package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +19 -20
  258. package/dist/generators/ts/synthesizeUberObjectUnionType.d.ts +4 -4
  259. package/dist/generators/ts/synthesizeUberObjectUnionType.js +14 -9
  260. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.d.ts +5 -5
  261. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.js +2 -2
  262. package/dist/input/NodeShape.d.ts +0 -1
  263. package/dist/input/NodeShape.js +0 -3
  264. package/dist/input/ShapesGraph.d.ts +3 -2
  265. package/dist/input/ShapesGraph.js +12 -7
  266. package/dist/input/generated.d.ts +1899 -88
  267. package/dist/input/generated.js +676 -564
  268. package/package.json +5 -7
  269. package/dist/_ShapesGraphToAstTransformer/CurieFactory.d.ts +0 -16
  270. package/dist/_ShapesGraphToAstTransformer/CurieFactory.js +0 -45
  271. package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.d.ts +0 -3
  272. package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.js +0 -2
  273. package/dist/_ShapesGraphToAstTransformer/index.d.ts +0 -6
  274. package/dist/_ShapesGraphToAstTransformer/index.js +0 -6
  275. package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.d.ts +0 -5
  276. package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.js +0 -9
  277. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +0 -11
  278. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +0 -338
  279. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.d.ts +0 -12
  280. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.js +0 -31
  281. package/dist/ast/AbstractObjectCompoundType.d.ts +0 -45
  282. package/dist/ast/AbstractObjectCompoundType.js +0 -180
  283. package/dist/ast/Curie.d.ts +0 -21
  284. package/dist/ast/Curie.js +0 -29
  285. package/dist/ast/PlaceholderType.d.ts +0 -15
  286. package/dist/ast/PlaceholderType.js +0 -19
  287. package/dist/generators/codeName.d.ts +0 -6
  288. package/dist/generators/codeName.js +0 -66
  289. package/dist/generators/ts/AbstractDeclaredType.d.ts +0 -23
  290. package/dist/generators/ts/AbstractDeclaredType.js +0 -17
  291. package/dist/generators/ts/ObjectType.d.ts +0 -117
  292. package/dist/generators/ts/ObjectType.js +0 -402
  293. package/dist/generators/ts/ObjectUnionType.d.ts +0 -65
  294. package/dist/generators/ts/ObjectUnionType.js +0 -257
  295. package/dist/generators/ts/UnionType.d.ts +0 -40
  296. package/dist/generators/ts/UnionType.js +0 -527
  297. package/dist/generators/ts/_ObjectType/ObjectType_classDeclaration.d.ts +0 -4
  298. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.d.ts +0 -5
  299. package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionOrMethodDeclaration.d.ts +0 -5
  300. package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.d.ts +0 -4
  301. package/dist/generators/ts/_ObjectType/ObjectType_filterTypeDeclaration.d.ts +0 -4
  302. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.d.ts +0 -4
  303. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.js +0 -66
  304. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfFunctionDeclaration.d.ts +0 -5
  305. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.d.ts +0 -5
  306. package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeVariableStatement.d.ts +0 -5
  307. package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionOrMethodDeclarations.d.ts +0 -4
  308. package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.d.ts +0 -4
  309. package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.d.ts +0 -4
  310. package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.d.ts +0 -5
  311. package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.js +0 -14
  312. package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.d.ts +0 -5
  313. package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.d.ts +0 -5
  314. package/dist/generators/ts/_ObjectType/ObjectType_jsonZodSchemaFunctionDeclaration.d.ts +0 -5
  315. package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.d.ts +0 -9
  316. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromRdfFunctionDeclaration.d.ts +0 -5
  317. package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.d.ts +0 -4
  318. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  319. package/dist/generators/ts/_ObjectType/ObjectType_sparqlWherePatternsFunctionDeclarations.d.ts +0 -5
  320. package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionOrMethodDeclaration.d.ts +0 -5
  321. package/dist/generators/ts/_ObjectType/ObjectType_toRdfFunctionOrMethodDeclaration.d.ts +0 -5
  322. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +0 -4
  323. package/dist/generators/ts/_ObjectUnionType/MemberType.d.ts +0 -34
  324. package/dist/generators/ts/_ObjectUnionType/MemberType.js +0 -105
  325. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.d.ts +0 -5
  326. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.js +0 -29
  327. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.d.ts +0 -4
  328. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.js +0 -19
  329. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.d.ts +0 -4
  330. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.js +0 -10
  331. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.d.ts +0 -5
  332. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.js +0 -19
  333. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.d.ts +0 -5
  334. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.js +0 -20
  335. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.d.ts +0 -5
  336. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.js +0 -18
  337. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.d.ts +0 -5
  338. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.js +0 -28
  339. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.d.ts +0 -4
  340. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.js +0 -9
  341. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.d.ts +0 -5
  342. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.js +0 -13
  343. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.d.ts +0 -5
  344. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.js +0 -10
  345. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.d.ts +0 -5
  346. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.js +0 -14
  347. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.d.ts +0 -4
  348. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.js +0 -37
  349. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  350. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.js +0 -15
  351. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.d.ts +0 -5
  352. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.js +0 -35
  353. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.d.ts +0 -5
  354. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.js +0 -26
  355. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.d.ts +0 -5
  356. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.js +0 -43
  357. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.d.ts +0 -4
  358. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.js +0 -10
  359. package/dist/generators/ts/_snippets/snippets_FromRdfOptions.d.ts +0 -2
  360. package/dist/generators/ts/_snippets/snippets_FromRdfOptions.js +0 -5
  361. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.d.ts +0 -2
  362. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.js +0 -5
  363. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.d.ts +0 -2
  364. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.js +0 -6
  365. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.d.ts +0 -2
  366. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.js +0 -12
  367. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.d.ts +0 -2
  368. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.js +0 -6
  369. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.d.ts +0 -2
  370. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.js +0 -15
  371. /package/dist/generators/ts/{_ObjectType → _NamedObjectType}/Property.js +0 -0
  372. /package/dist/generators/ts/{_ObjectType → _NamedObjectType}/identifierTypeDeclarations.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import { Maybe } from "purify-ts";
2
2
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
3
  import { code, joinCode } from "../ts-poet-wrapper.js";
4
- export function ObjectType_toJsonFunctionOrMethodDeclaration() {
4
+ export function NamedObjectType_toJsonFunctionOrMethodDeclaration() {
5
5
  if (!this.features.has("json")) {
6
6
  return Maybe.empty();
7
7
  }
@@ -56,4 +56,4 @@ ${preamble}${syntheticNamePrefix}toJson(${joinCode(parameters, { on: ", " })}):
56
56
  return JSON.parse(JSON.stringify({ ${joinCode(jsonObjectMembers, { on: "," })} } satisfies ${this.jsonType().name}));
57
57
  }`);
58
58
  }
59
- //# sourceMappingURL=ObjectType_toJsonFunctionOrMethodDeclaration.js.map
59
+ //# sourceMappingURL=NamedObjectType_toJsonFunctionOrMethodDeclaration.js.map
@@ -0,0 +1,5 @@
1
+ import { Maybe } from "purify-ts";
2
+ import type { NamedObjectType } from "../NamedObjectType.js";
3
+ import { type Code } from "../ts-poet-wrapper.js";
4
+ export declare function NamedObjectType_toRdfResourceFunctionOrMethodDeclaration(this: NamedObjectType): Maybe<Code>;
5
+ //# sourceMappingURL=NamedObjectType_toRdfResourceFunctionOrMethodDeclaration.d.ts.map
@@ -2,9 +2,10 @@ import { rdf } from "@tpluscode/rdf-ns-builders";
2
2
  import { Maybe } from "purify-ts";
3
3
  import { imports } from "../imports.js";
4
4
  import { rdfjsTermExpression } from "../rdfjsTermExpression.js";
5
+ import { snippets } from "../snippets.js";
5
6
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
6
7
  import { code, joinCode } from "../ts-poet-wrapper.js";
7
- export function ObjectType_toRdfFunctionOrMethodDeclaration() {
8
+ export function NamedObjectType_toRdfResourceFunctionOrMethodDeclaration() {
8
9
  if (!this.features.has("rdf")) {
9
10
  return Maybe.empty();
10
11
  }
@@ -17,7 +18,7 @@ export function ObjectType_toRdfFunctionOrMethodDeclaration() {
17
18
  if (this.declarationType === "interface") {
18
19
  parameters.push(code `${this.thisVariable}: ${this.name}`);
19
20
  }
20
- parameters.push(code `options?: { ${variables.ignoreRdfType}?: boolean; ${variables.graph}?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>, ${variables.resourceSet}?: ${imports.ResourceSet} }`);
21
+ parameters.push(code `options?: Parameters<${snippets.ToRdfResourceFunction}<${this.name}>>[1]`);
21
22
  const statements = [
22
23
  code `const ${variables.resourceSet} = options?.${variables.resourceSet} ?? new ${imports.ResourceSet}(${imports.datasetFactory}.dataset(), { dataFactory: ${imports.dataFactory} });`,
23
24
  ];
@@ -27,10 +28,10 @@ export function ObjectType_toRdfFunctionOrMethodDeclaration() {
27
28
  switch (this.declarationType) {
28
29
  case "class":
29
30
  preamble = "override ";
30
- superToRdfCall = code `super.${syntheticNamePrefix}toRdf(${superToRdfOptions})`;
31
+ superToRdfCall = code `super.${syntheticNamePrefix}toRdfResource(${superToRdfOptions})`;
31
32
  break;
32
33
  case "interface":
33
- superToRdfCall = code `${this.parentObjectTypes[0].staticModuleName}.${syntheticNamePrefix}toRdf(${this.thisVariable}, ${superToRdfOptions})`;
34
+ superToRdfCall = code `${this.parentObjectTypes[0].staticModuleName}.${syntheticNamePrefix}toRdfResource(${this.thisVariable}, ${superToRdfOptions})`;
34
35
  break;
35
36
  }
36
37
  statements.push(code `const ${variables.resource} = ${superToRdfCall};`);
@@ -42,17 +43,18 @@ export function ObjectType_toRdfFunctionOrMethodDeclaration() {
42
43
  statements.push(code `if (!options?.${variables.ignoreRdfType}) { ${joinCode(this.toRdfTypes.map((toRdfType) => code `${variables.resource}.add(${rdfjsTermExpression(rdf.type)}, ${imports.dataFactory}.namedNode("${toRdfType.value}"), options?.${variables.graph});`), { on: " " })} }`);
43
44
  }
44
45
  for (const property of this.properties) {
45
- statements.push(...property.toRdfStatements({
46
+ statements.push(...property.toRdfRdfResourceValuesStatements({
46
47
  variables: {
47
- ...variables,
48
48
  graph: code `options?.${variables.graph}`,
49
+ resource: variables.resource,
50
+ resourceSet: variables.resourceSet,
49
51
  value: code `${this.thisVariable}.${property.name}`,
50
52
  },
51
53
  }));
52
54
  }
53
55
  statements.push(code `return ${variables.resource};`);
54
56
  return Maybe.of(code `\
55
- ${preamble}${syntheticNamePrefix}toRdf(${joinCode(parameters, { on: "," })}): ${this.toRdfjsResourceType} {
57
+ ${preamble}${syntheticNamePrefix}toRdfResource(${joinCode(parameters, { on: "," })}): ${this.toRdfjsResourceType} {
56
58
  ${joinCode(statements)}
57
59
  }`);
58
60
  }
@@ -62,4 +64,4 @@ const variables = {
62
64
  resource: code `resource`,
63
65
  resourceSet: code `resourceSet`,
64
66
  };
65
- //# sourceMappingURL=ObjectType_toRdfFunctionOrMethodDeclaration.js.map
67
+ //# sourceMappingURL=NamedObjectType_toRdfResourceFunctionOrMethodDeclaration.js.map
@@ -0,0 +1,5 @@
1
+ import { Maybe } from "purify-ts";
2
+ import type { NamedObjectType } from "../NamedObjectType.js";
3
+ import { type Code } from "../ts-poet-wrapper.js";
4
+ export declare function NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration(this: NamedObjectType): Maybe<Code>;
5
+ //# sourceMappingURL=NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { Maybe } from "purify-ts";
2
+ import { snippets } from "../snippets.js";
3
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
4
+ import { code } from "../ts-poet-wrapper.js";
5
+ export function NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration() {
6
+ if (!this.features.has("sparql")) {
7
+ return Maybe.empty();
8
+ }
9
+ return Maybe.of(code `\
10
+ export const ${syntheticNamePrefix}valueSparqlConstructTriples: ${snippets.ValueSparqlConstructTriplesFunction}<${this.filterType}, ${this.schemaType}> = ({ filter, ignoreRdfType, valueVariable, variablePrefix }) =>
11
+ ${this.staticModuleName}.${syntheticNamePrefix}focusSparqlConstructTriples({ filter, focusIdentifier: valueVariable, ignoreRdfType, variablePrefix });`);
12
+ }
13
+ //# sourceMappingURL=NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js.map
@@ -0,0 +1,5 @@
1
+ import { Maybe } from "purify-ts";
2
+ import type { NamedObjectType } from "../NamedObjectType.js";
3
+ import { type Code } from "../ts-poet-wrapper.js";
4
+ export declare function NamedObjectType_valueSparqlWherePatternsFunctionDeclaration(this: NamedObjectType): Maybe<Code>;
5
+ //# sourceMappingURL=NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { Maybe } from "purify-ts";
2
+ import { snippets } from "../snippets.js";
3
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
4
+ import { code } from "../ts-poet-wrapper.js";
5
+ export function NamedObjectType_valueSparqlWherePatternsFunctionDeclaration() {
6
+ if (!this.features.has("sparql")) {
7
+ return Maybe.empty();
8
+ }
9
+ return Maybe.of(code `\
10
+ export const ${syntheticNamePrefix}valueSparqlWherePatterns: ${snippets.ValueSparqlWherePatternsFunction}<${this.filterType}, ${this.schemaType}> = ({ filter, ignoreRdfType, preferredLanguages, propertyPatterns, valueVariable, variablePrefix }) =>
11
+ (propertyPatterns as readonly ${snippets.SparqlPattern}[]).concat(
12
+ ${this.staticModuleName}.${syntheticNamePrefix}focusSparqlWherePatterns({ filter, focusIdentifier: valueVariable, ignoreRdfType, preferredLanguages, variablePrefix })
13
+ );`);
14
+ }
15
+ //# sourceMappingURL=NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js.map
@@ -1,7 +1,7 @@
1
1
  import type { Type } from "../Type.js";
2
+ import type { DiscriminantProperty } from "./DiscriminantProperty.js";
2
3
  import type { IdentifierPrefixProperty } from "./IdentifierPrefixProperty.js";
3
4
  import type { IdentifierProperty } from "./IdentifierProperty.js";
4
5
  import type { ShaclProperty } from "./ShaclProperty.js";
5
- import type { TypeDiscriminantProperty } from "./TypeDiscriminantProperty.js";
6
- export type Property = IdentifierProperty | IdentifierPrefixProperty | ShaclProperty<Type> | TypeDiscriminantProperty;
6
+ export type Property = IdentifierProperty | IdentifierPrefixProperty | ShaclProperty<Type> | DiscriminantProperty;
7
7
  //# sourceMappingURL=Property.d.ts.map
@@ -29,7 +29,7 @@ export declare class ShaclProperty<TypeT extends Type> extends AbstractProperty<
29
29
  get getAccessorDeclaration(): Maybe<Code>;
30
30
  get graphqlField(): AbstractProperty<TypeT>["graphqlField"];
31
31
  get jsonSignature(): Maybe<Code>;
32
- get jsonZodSchema(): AbstractProperty<TypeT>["jsonZodSchema"];
32
+ get jsonZchema(): AbstractProperty<TypeT>["jsonZchema"];
33
33
  protected get schemaObject(): {
34
34
  path: Code | undefined;
35
35
  kind: Code;
@@ -37,12 +37,12 @@ export declare class ShaclProperty<TypeT extends Type> extends AbstractProperty<
37
37
  };
38
38
  constructorStatements({ variables, }: Parameters<AbstractProperty<TypeT>["constructorStatements"]>[0]): readonly Code[];
39
39
  fromJsonStatements({ variables, }: Parameters<AbstractProperty<TypeT>["fromJsonStatements"]>[0]): readonly Code[];
40
- fromRdfExpression({ variables, }: Parameters<AbstractProperty<TypeT>["fromRdfExpression"]>[0]): Maybe<Code>;
40
+ fromRdfResourceValuesExpression({ variables, }: Parameters<AbstractProperty<TypeT>["fromRdfResourceValuesExpression"]>[0]): Maybe<Code>;
41
41
  hashStatements(parameters: Parameters<AbstractProperty<TypeT>["hashStatements"]>[0]): readonly Code[];
42
42
  jsonUiSchemaElement({ variables, }: Parameters<AbstractProperty<TypeT>["jsonUiSchemaElement"]>[0]): Maybe<Code>;
43
43
  sparqlConstructTriplesExpression({ variables, }: Parameters<AbstractProperty<TypeT>["sparqlConstructTriplesExpression"]>[0]): Maybe<Code>;
44
44
  sparqlWherePatternsExpression({ variables, }: Parameters<AbstractProperty<TypeT>["sparqlWherePatternsExpression"]>[0]): ReturnType<AbstractProperty<TypeT>["sparqlWherePatternsExpression"]>;
45
45
  toJsonObjectMemberExpression(parameters: Parameters<AbstractProperty<TypeT>["toJsonObjectMemberExpression"]>[0]): Maybe<Code>;
46
- toRdfStatements({ variables, }: Parameters<AbstractProperty<TypeT>["toRdfStatements"]>[0]): readonly Code[];
46
+ toRdfRdfResourceValuesStatements({ variables, }: Parameters<AbstractProperty<TypeT>["toRdfRdfResourceValuesStatements"]>[0]): readonly Code[];
47
47
  }
48
48
  //# sourceMappingURL=ShaclProperty.d.ts.map
@@ -59,7 +59,7 @@ export class ShaclProperty extends AbstractProperty {
59
59
  }
60
60
  get declaration() {
61
61
  const lhs = [];
62
- if (this.objectType.declarationType === "class" &&
62
+ if (this.namedObjectType.declarationType === "class" &&
63
63
  this.visibility !== "public") {
64
64
  lhs.push(code `${this.visibility}`);
65
65
  }
@@ -103,8 +103,8 @@ export class ShaclProperty extends AbstractProperty {
103
103
  const typeJsonType = this.type.jsonType();
104
104
  return Maybe.of(code `readonly ${this.name}${typeJsonType.optional ? "?" : ""}: ${typeJsonType.requiredName}`);
105
105
  }
106
- get jsonZodSchema() {
107
- let schema = this.type.jsonZodSchema({
106
+ get jsonZchema() {
107
+ let schema = this.type.jsonSchema({
108
108
  context: "property",
109
109
  });
110
110
  this.comment.alt(this.description).ifJust((description) => {
@@ -120,7 +120,7 @@ export class ShaclProperty extends AbstractProperty {
120
120
  ...super.schemaObject,
121
121
  // comment: this.comment.map(JSON.stringify).extract(),
122
122
  // description: this.description.map(JSON.stringify).extract(),
123
- path: this.objectType.features.has("rdf")
123
+ path: this.namedObjectType.features.has("rdf")
124
124
  ? propertyPathToCode(this.path)
125
125
  : undefined,
126
126
  // label: this.label.map(JSON.stringify).extract(),
@@ -135,7 +135,7 @@ export class ShaclProperty extends AbstractProperty {
135
135
  constructorStatements({ variables, }) {
136
136
  const typeConversions = this.type.conversions;
137
137
  if (typeConversions.length === 1) {
138
- switch (this.objectType.declarationType) {
138
+ switch (this.namedObjectType.declarationType) {
139
139
  case "class":
140
140
  return [code `this.${this.name} = ${variables.parameter};`];
141
141
  case "interface":
@@ -144,7 +144,7 @@ export class ShaclProperty extends AbstractProperty {
144
144
  }
145
145
  let lhs;
146
146
  const statements = [];
147
- switch (this.objectType.declarationType) {
147
+ switch (this.namedObjectType.declarationType) {
148
148
  case "class":
149
149
  lhs = `this.${this.name}`;
150
150
  break;
@@ -164,7 +164,7 @@ export class ShaclProperty extends AbstractProperty {
164
164
  code `const ${this.name} = ${this.type.fromJsonExpression({ variables: { value: code `${variables.jsonObject}["${this.name}"]` } })};`,
165
165
  ];
166
166
  }
167
- fromRdfExpression({ variables, }) {
167
+ fromRdfResourceValuesExpression({ variables, }) {
168
168
  // Assume the property has the correct range and ignore the object's RDF type.
169
169
  // This also accommodates the case where the object of a property is a dangling identifier that's not the
170
170
  // subject of any statements.
@@ -172,11 +172,11 @@ export class ShaclProperty extends AbstractProperty {
172
172
  graph: variables.graph,
173
173
  resource: variables.resource,
174
174
  propertySchema: code `${syntheticNamePrefix}schema.properties.${this.name}`,
175
- typeFromRdf: code `((resourceValues) => ${this.type.fromRdfExpression({
175
+ typeFromRdf: code `((resourceValues) => ${this.type.fromRdfResourceValuesExpression({
176
176
  variables: {
177
177
  ...variables,
178
178
  ignoreRdfType: true,
179
- propertyPath: code `${this.objectType.staticModuleName}.${syntheticNamePrefix}schema.properties.${this.name}.path`,
179
+ propertyPath: code `${this.namedObjectType.staticModuleName}.${syntheticNamePrefix}schema.properties.${this.name}.path`,
180
180
  resourceValues: code `resourceValues`,
181
181
  },
182
182
  })})`,
@@ -200,7 +200,7 @@ export class ShaclProperty extends AbstractProperty {
200
200
  ignoreRdfType: true,
201
201
  propertyName: this.name,
202
202
  propertySchema: code `${syntheticNamePrefix}schema.properties.${this.name}`,
203
- typeSparqlConstructTriples: this.type.sparqlConstructTriplesFunction,
203
+ typeSparqlConstructTriples: this.type.valueSparqlConstructTriplesFunction,
204
204
  variablePrefix: variables.variablePrefix,
205
205
  }})`);
206
206
  }
@@ -215,7 +215,7 @@ export class ShaclProperty extends AbstractProperty {
215
215
  preferredLanguages: variables.preferredLanguages,
216
216
  propertyName: this.name,
217
217
  propertySchema: code `${syntheticNamePrefix}schema.properties.${this.name}`,
218
- typeSparqlWherePatterns: this.type.sparqlWherePatternsFunction,
218
+ typeSparqlWherePatterns: this.type.valueSparqlWherePatternsFunction,
219
219
  variablePrefix: variables.variablePrefix,
220
220
  }})`,
221
221
  });
@@ -223,7 +223,7 @@ export class ShaclProperty extends AbstractProperty {
223
223
  toJsonObjectMemberExpression(parameters) {
224
224
  return Maybe.of(code `${this.name}: ${this.type.toJsonExpression(parameters)}`);
225
225
  }
226
- toRdfStatements({ variables, }) {
226
+ toRdfRdfResourceValuesStatements({ variables, }) {
227
227
  switch (this.path.termType) {
228
228
  case "NamedNode":
229
229
  break;
@@ -237,7 +237,7 @@ export class ShaclProperty extends AbstractProperty {
237
237
  }
238
238
  const propertyPath = propertyPathToCode(this.path);
239
239
  return [
240
- code `${variables.resource}.add(${propertyPath}, ${this.type.toRdfExpression({
240
+ code `${variables.resource}.add(${propertyPath}, ${this.type.toRdfResourceValuesExpression({
241
241
  variables: { ...variables, propertyPath },
242
242
  })}, ${variables.graph});`,
243
243
  ];
@@ -263,5 +263,5 @@ __decorate([
263
263
  ], ShaclProperty.prototype, "jsonSignature", null);
264
264
  __decorate([
265
265
  Memoize()
266
- ], ShaclProperty.prototype, "jsonZodSchema", null);
266
+ ], ShaclProperty.prototype, "jsonZchema", null);
267
267
  //# sourceMappingURL=ShaclProperty.js.map
@@ -0,0 +1,4 @@
1
+ import type { NamedObjectType } from "../NamedObjectType.js";
2
+ import { type Code } from "../ts-poet-wrapper.js";
3
+ export declare function identifierTypeDeclarations(this: NamedObjectType): readonly Code[];
4
+ //# sourceMappingURL=identifierTypeDeclarations.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_FocusSparqlConstructTriplesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_FocusSparqlConstructTriplesFunction.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ export const snippets_FocusSparqlConstructTriplesFunction = conditionalOutput(`${syntheticNamePrefix}FocusSparqlConstructTriplesFunction`, code `\
5
+ type ${syntheticNamePrefix}FocusSparqlConstructTriplesFunction<FilterT> =
6
+ (parameters: {
7
+ filter: FilterT | undefined;
8
+ focusIdentifier: ${imports.NamedNode} | ${imports.Variable};
9
+ ignoreRdfType: boolean;
10
+ variablePrefix: string;
11
+ }) => readonly ${imports.sparqljs}.Triple[];`);
12
+ //# sourceMappingURL=snippets_FocusSparqlConstructTriplesFunction.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_FocusSparqlWherePatternsFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_FocusSparqlWherePatternsFunction.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
5
+ export const snippets_FocusSparqlWherePatternsFunction = conditionalOutput(`${syntheticNamePrefix}FocusSparqlWherePatternsFunction`, code `\
6
+ type ${syntheticNamePrefix}FocusSparqlWherePatternsFunction<FilterT> =
7
+ (parameters: {
8
+ filter: FilterT | undefined;
9
+ focusIdentifier: ${imports.NamedNode} | ${imports.Variable};
10
+ ignoreRdfType: boolean;
11
+ preferredLanguages: readonly string[] | undefined;
12
+ variablePrefix: string;
13
+ }) => readonly ${snippets_SparqlPattern}[];`);
14
+ //# sourceMappingURL=snippets_FocusSparqlWherePatternsFunction.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_FromRdfResourceFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_FromRdfResourceFunction.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ export const snippets_FromRdfResourceFunction = conditionalOutput(`${syntheticNamePrefix}FromRdfResourceFunction`, code `\
5
+ export type ${syntheticNamePrefix}FromRdfResourceFunction<T> = (
6
+ resource: ${imports.Resource},
7
+ options?: {
8
+ context?: unknown;
9
+ graph?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>;
10
+ ignoreRdfType?: boolean;
11
+ objectSet?: ${syntheticNamePrefix}ObjectSet;
12
+ preferredLanguages?: readonly string[];
13
+ }
14
+ ) => ${imports.Either}<Error, T>`);
15
+ //# sourceMappingURL=snippets_FromRdfResourceFunction.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_FromRdfResourceValuesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_FromRdfResourceValuesFunction.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ export const snippets_FromRdfResourceValuesFunction = conditionalOutput(`${syntheticNamePrefix}FromRdfResourceValuesFunction`, code `\
5
+ export type ${syntheticNamePrefix}FromRdfResourceValuesFunction<T> = (
6
+ resourceValues: ${imports.Either}<Error, ${imports.Resource}.Values>,
7
+ options: {
8
+ context?: unknown;
9
+ graph?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>;
10
+ ignoreRdfType?: boolean;
11
+ objectSet?: ${syntheticNamePrefix}ObjectSet;
12
+ preferredLanguages?: readonly string[];
13
+ propertyPath: ${syntheticNamePrefix}PropertyPath;
14
+ resource: ${imports.Resource};
15
+ }
16
+ ) => ${imports.Either}<Error, ${imports.Resource}.Values<T>>;`);
17
+ //# sourceMappingURL=snippets_FromRdfResourceValuesFunction.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_PropertiesFromRdfResourceFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_PropertiesFromRdfResourceFunction.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ export const snippets_PropertiesFromRdfResourceFunction = conditionalOutput(`${syntheticNamePrefix}PropertiesFromRdfResourceFunction`, code `\
5
+ type ${syntheticNamePrefix}PropertiesFromRdfResourceFunction<T> = (
6
+ resource: ${imports.Resource},
7
+ options: {
8
+ context: undefined | unknown;
9
+ graph: Exclude<${imports.Quad_Graph}, ${imports.Variable}> | undefined;
10
+ ignoreRdfType: boolean;
11
+ objectSet: ${syntheticNamePrefix}ObjectSet;
12
+ preferredLanguages?: readonly string[];
13
+ }
14
+ ) => ${imports.Either}<Error, T>;`);
15
+ //# sourceMappingURL=snippets_PropertiesFromRdfResourceFunction.js.map
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Adapter between generated code and the rdfjs-resource PropertyPath.
3
+ */
4
+ export declare const snippets_PropertyPath: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
5
+ //# sourceMappingURL=snippets_PropertyPath.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ import { snippets_FromRdfResourceFunction } from "./snippets_FromRdfResourceFunction.js";
5
+ import { snippets_FromRdfResourceValuesFunction } from "./snippets_FromRdfResourceValuesFunction.js";
6
+ import { snippets_ToRdfResourceFunction } from "./snippets_ToRdfResourceFunction.js";
7
+ /**
8
+ * Adapter between generated code and the rdfjs-resource PropertyPath.
9
+ */
10
+ export const snippets_PropertyPath = conditionalOutput(`${syntheticNamePrefix}PropertyPath`, code `\
11
+ export type ${syntheticNamePrefix}PropertyPath = ${imports.RdfjsResourcePropertyPath};
12
+
13
+ export namespace ${syntheticNamePrefix}PropertyPath {
14
+ export type $Filter = object;
15
+
16
+ export function $filter(_filter: $Filter, _value: ${syntheticNamePrefix}PropertyPath): boolean {
17
+ return true;
18
+ }
19
+
20
+ export const ${syntheticNamePrefix}fromRdfResource: ${snippets_FromRdfResourceFunction}<${syntheticNamePrefix}PropertyPath> = ${imports.RdfjsResourcePropertyPath}.fromResource;
21
+
22
+ export const $fromRdfResourceValues: ${snippets_FromRdfResourceValuesFunction}<${syntheticNamePrefix}PropertyPath> = (values, options) =>
23
+ values.chain((values) =>
24
+ values.chainMap((value) =>
25
+ value
26
+ .toResource()
27
+ .chain((resource) => ${syntheticNamePrefix}fromRdfResource(resource, options)),
28
+ ),
29
+ );
30
+
31
+ export const $schema: Readonly<object> = {};
32
+
33
+ export const ${syntheticNamePrefix}toRdfResource: ${snippets_ToRdfResourceFunction}<${syntheticNamePrefix}PropertyPath> = ${imports.RdfjsResourcePropertyPath}.toResource;
34
+ }`);
35
+ //# sourceMappingURL=snippets_PropertyPath.js.map
@@ -1,10 +1,10 @@
1
- import { imports } from "../imports.js";
2
1
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
2
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
+ import { snippets_PropertyPath } from "./snippets_PropertyPath.js";
4
4
  export const snippets_ShaclPropertySchema = conditionalOutput(`${syntheticNamePrefix}ShaclPropertySchema`, code `\
5
5
  export interface ${syntheticNamePrefix}ShaclPropertySchema<TypeSchemaT = object> {
6
6
  readonly kind: "Shacl";
7
- readonly path: ${imports.PropertyPath};
7
+ readonly path: ${snippets_PropertyPath};
8
8
  readonly type: () => TypeSchemaT;
9
9
  }`);
10
10
  //# sourceMappingURL=snippets_ShaclPropertySchema.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_ToRdfResourceFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_ToRdfResourceFunction.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ export const snippets_ToRdfResourceFunction = conditionalOutput(`${syntheticNamePrefix}ToRdfResourceFunction`, code `\
5
+ export type ${syntheticNamePrefix}ToRdfResourceFunction<T> =
6
+ (value: T, options?: { graph?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>; ignoreRdfType?: boolean; resourceSet?: ${imports.ResourceSet}; }) => ${imports.Resource};`);
7
+ //# sourceMappingURL=snippets_ToRdfResourceFunction.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_ToRdfResourceValuesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_ToRdfResourceValuesFunction.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ import { snippets_PropertyPath } from "./snippets_PropertyPath.js";
5
+ export const snippets_ToRdfResourceValuesFunction = conditionalOutput(`${syntheticNamePrefix}ToRdfResourceValuesFunction`, code `\
6
+ export type ${syntheticNamePrefix}ToRdfResourceValuesFunction<T> =
7
+ (value: T,
8
+ options: {
9
+ graph?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>;
10
+ ignoreRdfType?: boolean;
11
+ propertyPath: ${snippets_PropertyPath};
12
+ resource: ${imports.Resource};
13
+ resourceSet: ${imports.ResourceSet};
14
+ }
15
+ ) => (bigint | boolean | number | string | ${imports.BlankNode} | ${imports.Literal} | ${imports.NamedNode})[];`);
16
+ //# sourceMappingURL=snippets_ToRdfResourceValuesFunction.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_ValueSparqlConstructTriplesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_ValueSparqlConstructTriplesFunction.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ export const snippets_ValueSparqlConstructTriplesFunction = conditionalOutput(`${syntheticNamePrefix}ValueSparqlConstructTriplesFunction`, code `\
5
+ type ${syntheticNamePrefix}ValueSparqlConstructTriplesFunction<FilterT, SchemaT> =
6
+ (parameters: {
7
+ filter: FilterT | undefined;
8
+ ignoreRdfType: boolean;
9
+ schema: SchemaT;
10
+ valueVariable: ${imports.Variable};
11
+ variablePrefix: string;
12
+ }) => readonly ${imports.sparqljs}.Triple[];`);
13
+ //# sourceMappingURL=snippets_ValueSparqlConstructTriplesFunction.js.map
@@ -0,0 +1,2 @@
1
+ export declare const snippets_ValueSparqlWherePatternsFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
2
+ //# sourceMappingURL=snippets_ValueSparqlWherePatternsFunction.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { imports } from "../imports.js";
2
+ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
5
+ export const snippets_ValueSparqlWherePatternsFunction = conditionalOutput(`${syntheticNamePrefix}ValueSparqlWherePatternsFunction`, code `\
6
+ type ${syntheticNamePrefix}ValueSparqlWherePatternsFunction<FilterT, SchemaT> =
7
+ (parameters: {
8
+ filter: FilterT | undefined;
9
+ ignoreRdfType: boolean;
10
+ preferredLanguages: readonly string[] | undefined;
11
+ propertyPatterns: readonly ${snippets_SparqlPattern}[];
12
+ schema: SchemaT;
13
+ valueVariable: ${imports.Variable};
14
+ variablePrefix: string;
15
+ }) => readonly ${snippets_SparqlPattern}[];`);
16
+ //# sourceMappingURL=snippets_ValueSparqlWherePatternsFunction.js.map
@@ -6,9 +6,9 @@ import { snippets_NumericFilter } from "./snippets_NumericFilter.js";
6
6
  import { snippets_NumericSchema } from "./snippets_NumericSchema.js";
7
7
  import { snippets_SparqlFilterPattern } from "./snippets_SparqlFilterPattern.js";
8
8
  import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
9
- import { snippets_SparqlWherePatternsFunctionParameters } from "./snippets_SparqlWherePatternsFunctionParameters.js";
9
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
10
10
  export const snippets_bigDecimalSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}bigDecimalSparqlWherePatterns`, code `\
11
- function ${syntheticNamePrefix}bigDecimalSparqlWherePatterns({ filter, propertyPatterns, schema, valueVariable }: ${snippets_SparqlWherePatternsFunctionParameters}<${snippets_NumericFilter}<${imports.BigDecimal}>, ${snippets_NumericSchema}<${imports.BigDecimal}>>): readonly ${snippets_SparqlPattern}[] {
11
+ const ${syntheticNamePrefix}bigDecimalSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_NumericFilter}<${imports.BigDecimal}>, ${snippets_NumericSchema}<${imports.BigDecimal}>> = ({ filter, propertyPatterns, schema, valueVariable }) => {
12
12
  const filterPatterns: ${snippets_SparqlFilterPattern}[] = [];
13
13
 
14
14
  if (filter) {
@@ -2,8 +2,8 @@ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
2
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_BlankNodeFilter } from "./snippets_BlankNodeFilter.js";
4
4
  import { snippets_BlankNodeSchema } from "./snippets_BlankNodeSchema.js";
5
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
5
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
6
6
  export const snippets_blankNodeSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}blankNodeSparqlWherePatterns`, code `\
7
- const ${syntheticNamePrefix}blankNodeSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_BlankNodeFilter}, ${snippets_BlankNodeSchema}> =
7
+ const ${syntheticNamePrefix}blankNodeSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_BlankNodeFilter}, ${snippets_BlankNodeSchema}> =
8
8
  ({ propertyPatterns }) => propertyPatterns;`);
9
9
  //# sourceMappingURL=snippets_blankNodeSparqlWherePatterns.js.map
@@ -1,5 +1,5 @@
1
- import { code, conditionalOutput } from "ts-poet";
2
1
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
+ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_EqualsResult } from "./snippets_EqualsResult.js";
4
4
  export const snippets_booleanEquals = conditionalOutput(`${syntheticNamePrefix}booleanEquals`, code `\
5
5
  /**
@@ -3,11 +3,11 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_BooleanFilter } from "./snippets_BooleanFilter.js";
4
4
  import { snippets_BooleanSchema } from "./snippets_BooleanSchema.js";
5
5
  import { snippets_SparqlFilterPattern } from "./snippets_SparqlFilterPattern.js";
6
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
7
6
  import { snippets_sparqlValueInPattern } from "./snippets_sparqlValueInPattern.js";
8
7
  import { snippets_termSchemaSparqlPatterns } from "./snippets_termSchemaSparqlPatterns.js";
8
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
9
9
  export const snippets_booleanSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}booleanSparqlWherePatterns`, code `\
10
- const ${syntheticNamePrefix}booleanSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_BooleanFilter}, ${snippets_BooleanSchema}> =
10
+ const ${syntheticNamePrefix}booleanSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_BooleanFilter}, ${snippets_BooleanSchema}> =
11
11
  ({ filter, valueVariable, ...otherParameters }) => {
12
12
  const filterPatterns: ${snippets_SparqlFilterPattern}[] = [];
13
13
 
@@ -5,10 +5,10 @@ import { snippets_DateSchema } from "./snippets_DateSchema.js";
5
5
  import { snippets_literalFactory } from "./snippets_literalFactory.js";
6
6
  import { snippets_RdfVocabularies } from "./snippets_RdfVocabularies.js";
7
7
  import { snippets_SparqlFilterPattern } from "./snippets_SparqlFilterPattern.js";
8
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
9
8
  import { snippets_termSchemaSparqlPatterns } from "./snippets_termSchemaSparqlPatterns.js";
9
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
10
10
  export const snippets_dateSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}dateSparqlWherePatterns`, code `\
11
- const ${syntheticNamePrefix}dateSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_DateFilter}, ${snippets_DateSchema}> =
11
+ const ${syntheticNamePrefix}dateSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_DateFilter}, ${snippets_DateSchema}> =
12
12
  ({ filter, schema, valueVariable, ...otherParameters }) => {
13
13
  const filterPatterns: ${snippets_SparqlFilterPattern}[] = [];
14
14
 
@@ -2,9 +2,9 @@ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
2
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_DefaultValueSchema } from "./snippets_DefaultValueSchema.js";
4
4
  import { snippets_liftSparqlPatterns } from "./snippets_liftSparqlPatterns.js";
5
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
5
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
6
6
  export const snippets_defaultValueSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}defaultValueSparqlWherePatterns`, code `\
7
- function ${syntheticNamePrefix}defaultValueSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_SparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_SparqlWherePatternsFunction}<ItemFilterT, ${snippets_DefaultValueSchema}<ItemSchemaT>> {
7
+ function ${syntheticNamePrefix}defaultValueSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_ValueSparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlWherePatternsFunction}<ItemFilterT, ${snippets_DefaultValueSchema}<ItemSchemaT>> {
8
8
  return ({ schema, ...otherParameters }) => {
9
9
  const [itemSparqlWherePatterns, liftSparqlPatterns] = ${snippets_liftSparqlPatterns}(itemSparqlWherePatternsFunction({ ...otherParameters, schema: schema.item() }));
10
10
  return [{ patterns: itemSparqlWherePatterns.concat(), type: "optional" }, ...liftSparqlPatterns];
@@ -2,7 +2,7 @@ import { imports } from "../imports.js";
2
2
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
3
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
4
  export const snippets_fromRdfLanguageIn = conditionalOutput(`${syntheticNamePrefix}fromRdfLanguageIn`, code `\
5
- function ${syntheticNamePrefix}fromRdfLanguageIn( values: ${imports.Resource}.Values, languageIn: readonly string[]): ${imports.Either}<Error, ${imports.Resource}.Values> {
5
+ function ${syntheticNamePrefix}fromRdfLanguageIn(values: ${imports.Resource}.Values, languageIn: readonly string[]): ${imports.Either}<Error, ${imports.Resource}.Values> {
6
6
  return values.chainMap(value => value.toLiteral().chain(literal =>
7
7
  languageIn.includes(literal.language) ?
8
8
  ${imports.Right}(value) :