@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
@@ -3,10 +3,10 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_IdentifierFilter } from "./snippets_IdentifierFilter.js";
4
4
  import { snippets_IdentifierSchema } from "./snippets_IdentifierSchema.js";
5
5
  import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
6
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
7
6
  import { snippets_sparqlValueInPattern } from "./snippets_sparqlValueInPattern.js";
7
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
8
8
  export const snippets_identifierSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}identifierSparqlWherePatterns`, code `\
9
- const ${syntheticNamePrefix}identifierSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_IdentifierFilter}, ${snippets_IdentifierSchema}> =
9
+ const ${syntheticNamePrefix}identifierSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_IdentifierFilter}, ${snippets_IdentifierSchema}> =
10
10
  ({ filter, propertyPatterns, valueVariable }) => {
11
11
  const patterns: ${snippets_SparqlPattern}[] = propertyPatterns.concat();
12
12
 
@@ -3,11 +3,11 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_IriFilter } from "./snippets_IriFilter.js";
4
4
  import { snippets_IriSchema } from "./snippets_IriSchema.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_iriSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}iriSparqlWherePatterns`, code `\
10
- const ${syntheticNamePrefix}iriSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_IriFilter}, ${snippets_IriSchema}> =
10
+ const ${syntheticNamePrefix}iriSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_IriFilter}, ${snippets_IriSchema}> =
11
11
  ({ filter, valueVariable, ...otherParameters }) => {
12
12
  const filterPatterns: ${snippets_SparqlFilterPattern}[] = [];
13
13
 
@@ -4,9 +4,9 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
4
  import { snippets_CollectionFilter } from "./snippets_CollectionFilter.js";
5
5
  import { snippets_CollectionSchema } from "./snippets_CollectionSchema.js";
6
6
  import { snippets_RdfVocabularies } from "./snippets_RdfVocabularies.js";
7
- import { snippets_SparqlConstructTriplesFunction } from "./snippets_SparqlConstructTriplesFunction.js";
7
+ import { snippets_ValueSparqlConstructTriplesFunction } from "./snippets_ValueSparqlConstructTriplesFunction.js";
8
8
  export const snippets_listSparqlConstructTriples = conditionalOutput(`${syntheticNamePrefix}listSparqlConstructTriples`, code `\
9
- function ${syntheticNamePrefix}listSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets_SparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets_SparqlConstructTriplesFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
9
+ function ${syntheticNamePrefix}listSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets_ValueSparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlConstructTriplesFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
10
10
  return ({ filter, schema, valueVariable: listVariable, variablePrefix: variablePrefixPrefix }) => {
11
11
  let triples: ${imports.sparqljs}.Triple[] = [];
12
12
  const variable = (suffix: string) => ${imports.dataFactory}.variable!(\`\${variablePrefixPrefix}\${suffix}\`);
@@ -6,9 +6,9 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
6
6
  import { snippets_CollectionFilter } from "./snippets_CollectionFilter.js";
7
7
  import { snippets_CollectionSchema } from "./snippets_CollectionSchema.js";
8
8
  import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
9
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
9
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
10
10
  export const snippets_listSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}listSparqlWherePatterns`, code `\
11
- function ${syntheticNamePrefix}listSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_SparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_SparqlWherePatternsFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
11
+ function ${syntheticNamePrefix}listSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_ValueSparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlWherePatternsFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
12
12
  return (parameters) => {
13
13
  // Need to handle two cases:
14
14
  // (1) (?s, ?p, ?list) where ?list binds to rdf:nil
@@ -2,9 +2,9 @@ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
2
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_LiteralFilter } from "./snippets_LiteralFilter.js";
4
4
  import { snippets_LiteralSchema } from "./snippets_LiteralSchema.js";
5
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
6
5
  import { snippets_termFilterSparqlPatterns } from "./snippets_termFilterSparqlPatterns.js";
6
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
7
7
  export const snippets_literalSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}literalSparqlWherePatterns`, code `\
8
- const ${syntheticNamePrefix}literalSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_LiteralFilter}, ${snippets_LiteralSchema}> =
8
+ const ${syntheticNamePrefix}literalSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_LiteralFilter}, ${snippets_LiteralSchema}> =
9
9
  (parameters) => ${syntheticNamePrefix}literalSchemaSparqlPatterns({ filterPatterns: ${snippets_termFilterSparqlPatterns}(parameters), ...parameters });`);
10
10
  //# sourceMappingURL=snippets_literalSparqlWherePatterns.js.map
@@ -2,9 +2,9 @@ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
2
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_MaybeFilter } from "./snippets_MaybeFilter.js";
4
4
  import { snippets_MaybeSchema } from "./snippets_MaybeSchema.js";
5
- import { snippets_SparqlConstructTriplesFunction } from "./snippets_SparqlConstructTriplesFunction.js";
5
+ import { snippets_ValueSparqlConstructTriplesFunction } from "./snippets_ValueSparqlConstructTriplesFunction.js";
6
6
  export const snippets_maybeSparqlConstructTriples = conditionalOutput(`${syntheticNamePrefix}maybeSparqlConstructTriples`, code `\
7
- function ${syntheticNamePrefix}maybeSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets_SparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets_SparqlConstructTriplesFunction}<${snippets_MaybeFilter}<ItemFilterT>, ${snippets_MaybeSchema}<ItemSchemaT>> {
7
+ function ${syntheticNamePrefix}maybeSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets_ValueSparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlConstructTriplesFunction}<${snippets_MaybeFilter}<ItemFilterT>, ${snippets_MaybeSchema}<ItemSchemaT>> {
8
8
  return ({ filter, schema, ...otherParameters }) => itemSparqlConstructTriplesFunction({ ...otherParameters, filter: filter ?? undefined, schema: schema.item() });
9
9
  }`);
10
10
  //# sourceMappingURL=snippets_maybeSparqlConstructTriples.js.map
@@ -3,9 +3,9 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_liftSparqlPatterns } from "./snippets_liftSparqlPatterns.js";
4
4
  import { snippets_MaybeFilter } from "./snippets_MaybeFilter.js";
5
5
  import { snippets_MaybeSchema } from "./snippets_MaybeSchema.js";
6
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
6
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
7
7
  export const snippets_maybeSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}maybeSparqlWherePatterns`, code `\
8
- function ${syntheticNamePrefix}maybeSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_SparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_SparqlWherePatternsFunction}<${snippets_MaybeFilter}<ItemFilterT>, ${snippets_MaybeSchema}<ItemSchemaT>> {
8
+ function ${syntheticNamePrefix}maybeSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_ValueSparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlWherePatternsFunction}<${snippets_MaybeFilter}<ItemFilterT>, ${snippets_MaybeSchema}<ItemSchemaT>> {
9
9
  return ({ filter, schema, ...otherParameters }) => {
10
10
  if (filter === undefined) {
11
11
  // Treat the item's patterns as optional
@@ -4,12 +4,11 @@ import { snippets_literalFactory } from "./snippets_literalFactory.js";
4
4
  import { snippets_NumericFilter } from "./snippets_NumericFilter.js";
5
5
  import { snippets_NumericSchema } from "./snippets_NumericSchema.js";
6
6
  import { snippets_SparqlFilterPattern } from "./snippets_SparqlFilterPattern.js";
7
- import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
8
- import { snippets_SparqlWherePatternsFunctionParameters } from "./snippets_SparqlWherePatternsFunctionParameters.js";
9
7
  import { snippets_sparqlValueInPattern } from "./snippets_sparqlValueInPattern.js";
10
8
  import { snippets_termSchemaSparqlPatterns } from "./snippets_termSchemaSparqlPatterns.js";
9
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
11
10
  export const snippets_numericSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}numericSparqlWherePatterns`, code `\
12
- function ${syntheticNamePrefix}numericSparqlWherePatterns<T extends bigint | number>({ filter, valueVariable, ...otherParameters }: ${snippets_SparqlWherePatternsFunctionParameters}<${snippets_NumericFilter}<T>, ${snippets_NumericSchema}<T>>): readonly ${snippets_SparqlPattern}[] {
11
+ function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueVariable, ...otherParameters }: Parameters<${snippets_ValueSparqlWherePatternsFunction}<${snippets_NumericFilter}<T>, ${snippets_NumericSchema}<T>>>[0]): ReturnType<${snippets_ValueSparqlWherePatternsFunction}<${snippets_NumericFilter}<T>, ${snippets_NumericSchema}<T>>> {
13
12
  const filterPatterns: ${snippets_SparqlFilterPattern}[] = [];
14
13
 
15
14
  if (filter) {
@@ -2,9 +2,9 @@ import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
2
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_CollectionFilter } from "./snippets_CollectionFilter.js";
4
4
  import { snippets_CollectionSchema } from "./snippets_CollectionSchema.js";
5
- import { snippets_SparqlConstructTriplesFunction } from "./snippets_SparqlConstructTriplesFunction.js";
5
+ import { snippets_ValueSparqlConstructTriplesFunction } from "./snippets_ValueSparqlConstructTriplesFunction.js";
6
6
  export const snippets_setSparqlConstructTriples = conditionalOutput(`${syntheticNamePrefix}setSparqlConstructTriples`, code `\
7
- function ${syntheticNamePrefix}setSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets_SparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets_SparqlConstructTriplesFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
7
+ function ${syntheticNamePrefix}setSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets_ValueSparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlConstructTriplesFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
8
8
  return ({ schema, ...otherParameters }) => itemSparqlConstructTriplesFunction({ ...otherParameters, schema: schema.item() });
9
9
  }`);
10
10
  //# sourceMappingURL=snippets_setSparqlConstructTriples.js.map
@@ -3,9 +3,9 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_CollectionFilter } from "./snippets_CollectionFilter.js";
4
4
  import { snippets_CollectionSchema } from "./snippets_CollectionSchema.js";
5
5
  import { snippets_liftSparqlPatterns } from "./snippets_liftSparqlPatterns.js";
6
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
6
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
7
7
  export const snippets_setSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}setSparqlWherePatterns`, code `\
8
- function ${syntheticNamePrefix}setSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_SparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_SparqlWherePatternsFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
8
+ function ${syntheticNamePrefix}setSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_ValueSparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlWherePatternsFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
9
9
  return ({ filter, schema, ...otherParameters }) => {
10
10
  const itemSparqlWherePatterns = itemSparqlWherePatternsFunction({ ...otherParameters, filter, schema: schema.item() });
11
11
 
@@ -1,8 +1,9 @@
1
1
  import { imports } from "../imports.js";
2
2
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
3
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ import { snippets_PropertyPath } from "./snippets_PropertyPath.js";
4
5
  import { snippets_ShaclPropertySchema } from "./snippets_ShaclPropertySchema.js";
5
- import { snippets_SparqlConstructTriplesFunction } from "./snippets_SparqlConstructTriplesFunction.js";
6
+ import { snippets_ValueSparqlConstructTriplesFunction } from "./snippets_ValueSparqlConstructTriplesFunction.js";
6
7
  export const snippets_shaclPropertySparqlConstructTriples = conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlConstructTriples`, code `\
7
8
  function ${syntheticNamePrefix}shaclPropertySparqlConstructTriples<FilterT, TypeSchemaT>({ filter, focusIdentifier, ignoreRdfType, propertyName, propertySchema, typeSparqlConstructTriples, variablePrefix }: {
8
9
  filter: FilterT | undefined;
@@ -10,13 +11,13 @@ function ${syntheticNamePrefix}shaclPropertySparqlConstructTriples<FilterT, Type
10
11
  ignoreRdfType: boolean;
11
12
  propertySchema: ${snippets_ShaclPropertySchema}<TypeSchemaT>;
12
13
  propertyName: string;
13
- typeSparqlConstructTriples: ${snippets_SparqlConstructTriplesFunction}<FilterT, TypeSchemaT>;
14
+ typeSparqlConstructTriples: ${snippets_ValueSparqlConstructTriplesFunction}<FilterT, TypeSchemaT>;
14
15
  variablePrefix: string;
15
16
  }): readonly ${imports.sparqljs}.Triple[] {
16
17
  const propertyPathSparqlConstructTriples = ({ end, propertyPath, start, variableCounter }: {
17
18
  variableCounter: { value: number };
18
19
  end: ${imports.Literal} | ${imports.NamedNode} | ${imports.Variable};
19
- propertyPath: ${imports.PropertyPath};
20
+ propertyPath: ${snippets_PropertyPath};
20
21
  start: ${imports.NamedNode} | ${imports.Variable};
21
22
  }): readonly ${imports.sparqljs}.Triple[] => {
22
23
  switch (propertyPath.termType) {
@@ -1,10 +1,11 @@
1
1
  import { imports } from "../imports.js";
2
2
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
3
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ import { snippets_PropertyPath } from "./snippets_PropertyPath.js";
4
5
  import { snippets_ShaclPropertySchema } from "./snippets_ShaclPropertySchema.js";
5
6
  import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
6
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
7
7
  import { snippets_sparqlPropertyPath } from "./snippets_sparqlPropertyPath.js";
8
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
8
9
  export const snippets_shaclPropertySparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlWherePatterns`, code `\
9
10
  function ${syntheticNamePrefix}shaclPropertySparqlWherePatterns<FilterT, TypeSchemaT>({ filter, focusIdentifier, ignoreRdfType, preferredLanguages, propertyName, propertySchema, typeSparqlWherePatterns, variablePrefix }: {
10
11
  filter: FilterT | undefined;
@@ -13,12 +14,12 @@ function ${syntheticNamePrefix}shaclPropertySparqlWherePatterns<FilterT, TypeSch
13
14
  preferredLanguages: readonly string[] | undefined;
14
15
  propertySchema: ${snippets_ShaclPropertySchema}<TypeSchemaT>;
15
16
  propertyName: string;
16
- typeSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<FilterT, TypeSchemaT>;
17
+ typeSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<FilterT, TypeSchemaT>;
17
18
  variablePrefix: string;
18
19
  }): readonly ${snippets_SparqlPattern}[] {
19
20
  const propertyPathSparqlWherePatterns = ({ end, propertyPath, start, variableCounter }: {
20
21
  end: ${imports.Literal} | ${imports.NamedNode} | ${imports.Variable};
21
- propertyPath: ${imports.PropertyPath};
22
+ propertyPath: ${snippets_PropertyPath};
22
23
  start: ${imports.NamedNode} | ${imports.Variable};
23
24
  variableCounter: { value: number };
24
25
  }): ${snippets_SparqlPattern}[] => {
@@ -1,11 +1,12 @@
1
1
  import { imports } from "../imports.js";
2
2
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
3
3
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
4
+ import { snippets_PropertyPath } from "./snippets_PropertyPath.js";
4
5
  export const snippets_sparqlPropertyPath = conditionalOutput(`${syntheticNamePrefix}sparqlPropertyPath`, code `\
5
6
  /**
6
- * Convert a ${imports.PropertyPath} to a ${imports.sparqljs}.PropertyPath.
7
+ * Convert a ${snippets_PropertyPath} to a ${imports.sparqljs}.PropertyPath.
7
8
  */
8
- function ${syntheticNamePrefix}sparqlPropertyPath(propertyPath: ${imports.PropertyPath}): ${imports.NamedNode} | ${imports.sparqljs}.PropertyPath {
9
+ function ${syntheticNamePrefix}sparqlPropertyPath(propertyPath: ${snippets_PropertyPath}): ${imports.NamedNode} | ${imports.sparqljs}.PropertyPath {
9
10
  switch (propertyPath.termType) {
10
11
  case "AlternativePath":
11
12
  return {
@@ -3,12 +3,12 @@ import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
3
  import { snippets_literalFactory } from "./snippets_literalFactory.js";
4
4
  import { snippets_literalSchemaSparqlPatterns } from "./snippets_literalSchemaSparqlPatterns.js";
5
5
  import { snippets_SparqlFilterPattern } from "./snippets_SparqlFilterPattern.js";
6
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
7
6
  import { snippets_StringFilter } from "./snippets_StringFilter.js";
8
7
  import { snippets_StringSchema } from "./snippets_StringSchema.js";
9
8
  import { snippets_sparqlValueInPattern } from "./snippets_sparqlValueInPattern.js";
9
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
10
10
  export const snippets_stringSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}stringSparqlWherePatterns`, code `\
11
- const ${syntheticNamePrefix}stringSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_StringFilter}, ${snippets_StringSchema}> =
11
+ const ${syntheticNamePrefix}stringSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_StringFilter}, ${snippets_StringSchema}> =
12
12
  ({ filter, valueVariable, ...otherParameters }) => {
13
13
  const filterPatterns: ${snippets_SparqlFilterPattern}[] = [];
14
14
 
@@ -1,11 +1,11 @@
1
1
  import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
2
2
  import { code, conditionalOutput } from "../ts-poet-wrapper.js";
3
- import { snippets_SparqlWherePatternsFunction } from "./snippets_SparqlWherePatternsFunction.js";
4
3
  import { snippets_TermFilter } from "./snippets_TermFilter.js";
5
4
  import { snippets_TermSchema } from "./snippets_TermSchema.js";
6
5
  import { snippets_termFilterSparqlPatterns } from "./snippets_termFilterSparqlPatterns.js";
7
6
  import { snippets_termSchemaSparqlPatterns } from "./snippets_termSchemaSparqlPatterns.js";
7
+ import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
8
8
  export const snippets_termSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}termSparqlWherePatterns`, code `\
9
- const ${syntheticNamePrefix}termSparqlWherePatterns: ${snippets_SparqlWherePatternsFunction}<${snippets_TermFilter}, ${snippets_TermSchema}> =
9
+ const ${syntheticNamePrefix}termSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_TermFilter}, ${snippets_TermSchema}> =
10
10
  (parameters) => ${snippets_termSchemaSparqlPatterns}({ filterPatterns: ${snippets_termFilterSparqlPatterns}(parameters), ...parameters })`);
11
11
  //# sourceMappingURL=snippets_termSparqlWherePatterns.js.map
@@ -1,9 +1,9 @@
1
1
  import { Maybe } from "purify-ts";
2
- import type { ObjectType } from "./ObjectType.js";
3
- import type { ObjectUnionType } from "./ObjectUnionType.js";
2
+ import type { NamedObjectType } from "./NamedObjectType.js";
3
+ import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
4
4
  import { type Code } from "./ts-poet-wrapper.js";
5
5
  export declare function graphqlSchemaVariableStatement(parameters: {
6
- objectTypes: readonly ObjectType[];
7
- objectUnionTypes: ObjectUnionType[];
6
+ namedObjectTypes: readonly NamedObjectType[];
7
+ namedObjectUnionTypes: NamedObjectUnionType[];
8
8
  }): Maybe<Code>;
9
9
  //# sourceMappingURL=graphqlSchemaVariableStatement.d.ts.map
@@ -2,25 +2,25 @@ import { Maybe } from "purify-ts";
2
2
  import { imports } from "./imports.js";
3
3
  import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
4
4
  import { code } from "./ts-poet-wrapper.js";
5
- function graphqlQueryObjectType({ objectTypes, objectUnionTypes, }) {
5
+ function graphqlQueryObjectType({ namedObjectTypes, namedObjectUnionTypes, }) {
6
6
  return code `new ${imports.GraphQLObjectType}<null, { objectSet: ${syntheticNamePrefix}ObjectSet }>({ name: "Query", fields: ${[
7
- ...objectTypes,
8
- ...objectUnionTypes,
9
- ].reduce((fields, objectType) => {
10
- fields[objectType.objectSetMethodNames.object] = {
7
+ ...namedObjectTypes,
8
+ ...namedObjectUnionTypes,
9
+ ].reduce((fields, namedObjectType) => {
10
+ fields[namedObjectType.objectSetMethodNames.object] = {
11
11
  args: {
12
12
  identifier: {
13
13
  type: code `new ${imports.GraphQLNonNull}(${imports.GraphQLID})`,
14
14
  },
15
15
  },
16
16
  resolve: code `\
17
- async (_source, args: { identifier: string }, { objectSet }): Promise<${objectType.name}> =>
18
- (await ${imports.EitherAsync}<Error, ${objectType.name}>(async ({ liftEither }) =>
19
- liftEither(await objectSet.${objectType.objectSetMethodNames.object}(await liftEither(${objectType.identifierTypeAlias}.fromString(args.identifier))))
17
+ async (_source, args: { identifier: string }, { objectSet }): Promise<${namedObjectType.name}> =>
18
+ (await ${imports.EitherAsync}<Error, ${namedObjectType.name}>(async ({ liftEither }) =>
19
+ liftEither(await objectSet.${namedObjectType.objectSetMethodNames.object}(await liftEither(${namedObjectType.identifierTypeAlias}.fromString(args.identifier))))
20
20
  )).unsafeCoerce()`,
21
- type: objectType.graphqlType.name,
21
+ type: namedObjectType.graphqlType.name,
22
22
  };
23
- fields[objectType.objectSetMethodNames.objectIdentifiers] = {
23
+ fields[namedObjectType.objectSetMethodNames.objectIdentifiers] = {
24
24
  args: {
25
25
  limit: {
26
26
  type: code `${imports.GraphQLInt}`,
@@ -31,10 +31,10 @@ async (_source, args: { identifier: string }, { objectSet }): Promise<${objectTy
31
31
  },
32
32
  resolve: code `\
33
33
  async (_source, args: { limit: number | null; offset: number | null; }, { objectSet }): Promise<readonly string[]> =>
34
- (await objectSet.${objectType.objectSetMethodNames.objectIdentifiers}({ limit: args.limit !== null ? args.limit : undefined, offset: args.offset !== null ? args.offset : undefined })).unsafeCoerce().map(${objectType.identifierTypeAlias}.toString)`,
34
+ (await objectSet.${namedObjectType.objectSetMethodNames.objectIdentifiers}({ limit: args.limit !== null ? args.limit : undefined, offset: args.offset !== null ? args.offset : undefined })).unsafeCoerce().map(${namedObjectType.identifierTypeAlias}.toString)`,
35
35
  type: code `new ${imports.GraphQLNonNull}(new ${imports.GraphQLList}(${imports.GraphQLString}))`,
36
36
  };
37
- fields[objectType.objectSetMethodNames.objects] = {
37
+ fields[namedObjectType.objectSetMethodNames.objects] = {
38
38
  args: {
39
39
  identifiers: {
40
40
  type: code `new ${imports.GraphQLList}(new ${imports.GraphQLNonNull}(${imports.GraphQLID}))`,
@@ -47,36 +47,36 @@ async (_source, args: { identifier: string }, { objectSet }): Promise<${objectTy
47
47
  },
48
48
  },
49
49
  resolve: code `\
50
- async (_source, args: { identifiers: readonly string[] | null; limit: number | null; offset: number | null; }, { objectSet }): Promise<readonly ${objectType.name}[]> =>
51
- (await ${imports.EitherAsync}<Error, readonly ${objectType.name}[]>(async ({ liftEither }) => {
52
- let filter: ${objectType.filterType} | undefined;
50
+ async (_source, args: { identifiers: readonly string[] | null; limit: number | null; offset: number | null; }, { objectSet }): Promise<readonly ${namedObjectType.name}[]> =>
51
+ (await ${imports.EitherAsync}<Error, readonly ${namedObjectType.name}[]>(async ({ liftEither }) => {
52
+ let filter: ${namedObjectType.filterType} | undefined;
53
53
  if (args.identifiers) {
54
- const identifiers: ${objectType.identifierTypeAlias}[] = [];
54
+ const identifiers: ${namedObjectType.identifierTypeAlias}[] = [];
55
55
  for (const identifierArg of args.identifiers) {
56
- identifiers.push(await liftEither(${objectType.identifierTypeAlias}.fromString(identifierArg)));
56
+ identifiers.push(await liftEither(${namedObjectType.identifierTypeAlias}.fromString(identifierArg)));
57
57
  }
58
58
  filter = { ${syntheticNamePrefix}identifier: { in: identifiers } };
59
59
  }
60
- return await liftEither(await objectSet.${objectType.objectSetMethodNames.objects}({ filter, limit: args.limit !== null ? args.limit : undefined, offset: args.offset !== null ? args.offset : undefined }));
60
+ return await liftEither(await objectSet.${namedObjectType.objectSetMethodNames.objects}({ filter, limit: args.limit !== null ? args.limit : undefined, offset: args.offset !== null ? args.offset : undefined }));
61
61
  })).unsafeCoerce()`,
62
- type: code `new ${imports.GraphQLNonNull}(new ${imports.GraphQLList}(${objectType.graphqlType.name}))`,
62
+ type: code `new ${imports.GraphQLNonNull}(new ${imports.GraphQLList}(${namedObjectType.graphqlType.name}))`,
63
63
  };
64
- fields[objectType.objectSetMethodNames.objectCount] = {
64
+ fields[namedObjectType.objectSetMethodNames.objectCount] = {
65
65
  resolve: code `\
66
- async (_source, _args, { objectSet }): Promise<number> => (await objectSet.${objectType.objectSetMethodNames.objectCount}()).unsafeCoerce()`,
66
+ async (_source, _args, { objectSet }): Promise<number> => (await objectSet.${namedObjectType.objectSetMethodNames.objectCount}()).unsafeCoerce()`,
67
67
  type: code `new ${imports.GraphQLNonNull}(${imports.GraphQLInt})`,
68
68
  };
69
69
  return fields;
70
70
  }, {})} })`;
71
71
  }
72
72
  export function graphqlSchemaVariableStatement(parameters) {
73
- const objectTypes = parameters.objectTypes.filter((objectType) => objectType.features.has("graphql") && !objectType.synthetic);
74
- const objectUnionTypes = parameters.objectUnionTypes.filter((objectUnionType) => objectUnionType.features.has("graphql"));
75
- if (objectTypes.length === 0) {
73
+ const namedObjectTypes = parameters.namedObjectTypes.filter((namedObjectType) => namedObjectType.features.has("graphql") && !namedObjectType.synthetic);
74
+ const namedObjectUnionTypes = parameters.namedObjectUnionTypes.filter((namedObjectUnionType) => namedObjectUnionType.features.has("graphql"));
75
+ if (namedObjectTypes.length === 0) {
76
76
  return Maybe.empty();
77
77
  }
78
78
  return Maybe.of(code `\
79
- export const graphqlSchema = new ${imports.GraphQLSchema}({ query: ${graphqlQueryObjectType({ objectTypes, objectUnionTypes })} });
79
+ export const graphqlSchema = new ${imports.GraphQLSchema}({ query: ${graphqlQueryObjectType({ namedObjectTypes: namedObjectTypes, namedObjectUnionTypes })} });
80
80
  `);
81
81
  }
82
82
  //# sourceMappingURL=graphqlSchemaVariableStatement.js.map
@@ -25,9 +25,9 @@ export declare const imports: {
25
25
  readonly Maybe: import("ts-poet/build/Import.js").Import;
26
26
  readonly NamedNode: import("ts-poet/build/Import.js").Import;
27
27
  readonly NonEmptyList: import("ts-poet/build/Import.js").Import;
28
- readonly PropertyPath: import("ts-poet/build/Import.js").Import;
29
28
  readonly Quad: import("ts-poet/build/Import.js").Import;
30
29
  readonly Quad_Graph: import("ts-poet/build/Import.js").Import;
30
+ readonly RdfjsResourcePropertyPath: import("ts-poet/build/Import.js").Import;
31
31
  readonly Resource: import("ts-poet/build/Import.js").Import;
32
32
  readonly ResourceSet: import("ts-poet/build/Import.js").Import;
33
33
  readonly Right: import("ts-poet/build/Import.js").Import;
@@ -26,9 +26,9 @@ export const imports = {
26
26
  Maybe: imp("Maybe@purify-ts"),
27
27
  NamedNode: imp("NamedNode@@rdfjs/types"),
28
28
  NonEmptyList: imp("NonEmptyList@purify-ts"),
29
- PropertyPath: imp("PropertyPath@rdfjs-resource"),
30
29
  Quad: imp("Quad@@rdfjs/types"),
31
30
  Quad_Graph: imp("Quad_Graph@@rdfjs/types"),
31
+ RdfjsResourcePropertyPath: imp("PropertyPath:RdfjsResourcePropertyPath@rdfjs-resource"),
32
32
  Resource: imp("Resource@rdfjs-resource"),
33
33
  ResourceSet: imp("ResourceSet@rdfjs-resource"),
34
34
  Right: imp("Right@purify-ts"),
@@ -1,8 +1,8 @@
1
- import type { ObjectType } from "./ObjectType.js";
2
- import type { ObjectUnionType } from "./ObjectUnionType.js";
1
+ import type { NamedObjectType } from "./NamedObjectType.js";
2
+ import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
3
3
  import type { Code } from "./ts-poet-wrapper.js";
4
- export declare function objectSetDeclarations({ objectUnionTypes, ...parameters }: {
5
- objectTypes: readonly ObjectType[];
6
- objectUnionTypes: readonly ObjectUnionType[];
4
+ export declare function objectSetDeclarations({ namedObjectUnionTypes, ...parameters }: {
5
+ namedObjectTypes: readonly NamedObjectType[];
6
+ namedObjectUnionTypes: readonly NamedObjectUnionType[];
7
7
  }): readonly Code[];
8
8
  //# sourceMappingURL=objectSetDeclarations.d.ts.map
@@ -1,57 +1,60 @@
1
1
  import { objectSetInterfaceDeclaration } from "./objectSetInterfaceDeclaration.js";
2
2
  import { rdfjsDatasetObjectSetClassDeclaration } from "./rdfjsDatasetObjectSetClassDeclaration.js";
3
3
  import { sparqlObjectSetClassDeclaration } from "./sparqlObjectSetClassDeclaration.js";
4
- export function objectSetDeclarations({ objectUnionTypes, ...parameters }) {
5
- const objectTypes = parameters.objectTypes.filter((objectType) => !objectType.abstract && !objectType.extern && !objectType.synthetic);
6
- let objectTypesWithRdfFeatureCount = 0;
7
- let objectTypesWithSparqlFeatureCount = 0;
8
- for (const objectType of objectTypes) {
9
- if (!objectType.features.has("rdf") && !objectType.features.has("sparql")) {
4
+ export function objectSetDeclarations({ namedObjectUnionTypes, ...parameters }) {
5
+ const namedObjectTypes = parameters.namedObjectTypes.filter((namedObjectType) => !namedObjectType.abstract &&
6
+ !namedObjectType.extern &&
7
+ !namedObjectType.synthetic);
8
+ let namedObjectTypesWithRdfFeatureCount = 0;
9
+ let namedObjectTypesWithSparqlFeatureCount = 0;
10
+ for (const namedObjectType of namedObjectTypes) {
11
+ if (!namedObjectType.features.has("rdf") &&
12
+ !namedObjectType.features.has("sparql")) {
10
13
  continue;
11
14
  }
12
- if (objectType.features.has("rdf")) {
13
- objectTypesWithRdfFeatureCount++;
15
+ if (namedObjectType.features.has("rdf")) {
16
+ namedObjectTypesWithRdfFeatureCount++;
14
17
  }
15
- if (objectType.features.has("sparql")) {
16
- objectTypesWithSparqlFeatureCount++;
18
+ if (namedObjectType.features.has("sparql")) {
19
+ namedObjectTypesWithSparqlFeatureCount++;
17
20
  }
18
21
  }
19
- let objectUnionTypesWithRdfFeatureCount = 0;
20
- let objectUnionTypesWithSparqlFeatureCount = 0;
21
- for (const objectUnionType of objectUnionTypes) {
22
- if (!objectUnionType.features.has("rdf") &&
23
- !objectUnionType.features.has("sparql")) {
22
+ let namedObjectUnionTypesWithRdfFeatureCount = 0;
23
+ let namedObjectUnionTypesWithSparqlFeatureCount = 0;
24
+ for (const namedObjectUnionType of namedObjectUnionTypes) {
25
+ if (!namedObjectUnionType.features.has("rdf") &&
26
+ !namedObjectUnionType.features.has("sparql")) {
24
27
  continue;
25
28
  }
26
- if (objectUnionType.features.has("rdf")) {
27
- objectUnionTypesWithRdfFeatureCount++;
29
+ if (namedObjectUnionType.features.has("rdf")) {
30
+ namedObjectUnionTypesWithRdfFeatureCount++;
28
31
  }
29
- if (objectUnionType.features.has("sparql")) {
30
- objectUnionTypesWithSparqlFeatureCount++;
32
+ if (namedObjectUnionType.features.has("sparql")) {
33
+ namedObjectUnionTypesWithSparqlFeatureCount++;
31
34
  }
32
35
  }
33
- if (objectTypesWithRdfFeatureCount === 0 &&
34
- objectTypesWithSparqlFeatureCount === 0 &&
35
- objectUnionTypesWithRdfFeatureCount === 0 &&
36
- objectUnionTypesWithSparqlFeatureCount === 0) {
36
+ if (namedObjectTypesWithRdfFeatureCount === 0 &&
37
+ namedObjectTypesWithSparqlFeatureCount === 0 &&
38
+ namedObjectUnionTypesWithRdfFeatureCount === 0 &&
39
+ namedObjectUnionTypesWithSparqlFeatureCount === 0) {
37
40
  return [];
38
41
  }
39
42
  const declarations = [
40
43
  objectSetInterfaceDeclaration({
41
- objectTypes,
42
- objectUnionTypes,
44
+ namedObjectTypes: namedObjectTypes,
45
+ namedObjectUnionTypes,
43
46
  }),
44
47
  ];
45
- if (objectTypesWithRdfFeatureCount > 0) {
48
+ if (namedObjectTypesWithRdfFeatureCount > 0) {
46
49
  declarations.push(rdfjsDatasetObjectSetClassDeclaration({
47
- objectTypes,
48
- objectUnionTypes,
50
+ namedObjectTypes: namedObjectTypes,
51
+ namedObjectUnionTypes,
49
52
  }));
50
53
  }
51
- if (objectTypesWithSparqlFeatureCount > 0) {
54
+ if (namedObjectTypesWithSparqlFeatureCount > 0) {
52
55
  declarations.push(sparqlObjectSetClassDeclaration({
53
- objectTypes,
54
- objectUnionTypes,
56
+ namedObjectTypes: namedObjectTypes,
57
+ namedObjectUnionTypes,
55
58
  }));
56
59
  }
57
60
  return declarations;
@@ -1,8 +1,8 @@
1
- import type { ObjectType } from "./ObjectType.js";
2
- import type { ObjectUnionType } from "./ObjectUnionType.js";
1
+ import type { NamedObjectType } from "./NamedObjectType.js";
2
+ import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
3
3
  import { type Code } from "./ts-poet-wrapper.js";
4
- export declare function objectSetInterfaceDeclaration({ objectTypes, objectUnionTypes, }: {
5
- objectTypes: readonly ObjectType[];
6
- objectUnionTypes: readonly ObjectUnionType[];
4
+ export declare function objectSetInterfaceDeclaration({ namedObjectTypes, namedObjectUnionTypes, }: {
5
+ namedObjectTypes: readonly NamedObjectType[];
6
+ namedObjectUnionTypes: readonly NamedObjectUnionType[];
7
7
  }): Code;
8
8
  //# sourceMappingURL=objectSetInterfaceDeclaration.d.ts.map
@@ -2,12 +2,14 @@ import { imports } from "./imports.js";
2
2
  import { objectSetMethodSignatures } from "./objectSetMethodSignatures.js";
3
3
  import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
4
4
  import { code, joinCode } from "./ts-poet-wrapper.js";
5
- export function objectSetInterfaceDeclaration({ objectTypes, objectUnionTypes, }) {
5
+ export function objectSetInterfaceDeclaration({ namedObjectTypes, namedObjectUnionTypes, }) {
6
6
  return code `\
7
7
  export interface ${syntheticNamePrefix}ObjectSet {
8
- ${joinCode(objectTypes
9
- .flatMap((objectType) => Object.values(objectSetMethodSignatures({ objectType })))
10
- .concat(objectUnionTypes.flatMap((objectUnionType) => Object.values(objectSetMethodSignatures({ objectType: objectUnionType }))))
8
+ ${joinCode(namedObjectTypes
9
+ .flatMap((namedObjectType) => Object.values(objectSetMethodSignatures({ namedObjectType })))
10
+ .concat(namedObjectUnionTypes.flatMap((namedObjectUnionType) => Object.values(objectSetMethodSignatures({
11
+ namedObjectType: namedObjectUnionType,
12
+ }))))
11
13
  .map((methodSignature) => code `${methodSignature.name}(${methodSignature.parameters}): ${methodSignature.returnType};`), { on: "\n\n" })}
12
14
  }
13
15
 
@@ -1,15 +1,15 @@
1
- import type { ObjectType } from "./ObjectType.js";
1
+ import type { NamedObjectType } from "./NamedObjectType.js";
2
2
  import { type Code } from "./ts-poet-wrapper.js";
3
3
  export declare function objectSetMethodSignatures(parameters: {
4
- objectType: {
4
+ namedObjectType: {
5
5
  readonly filterType: Code;
6
6
  readonly identifierTypeAlias: Code;
7
- readonly objectSetMethodNames: ObjectType.ObjectSetMethodNames;
7
+ readonly objectSetMethodNames: NamedObjectType.ObjectSetMethodNames;
8
8
  readonly name: string;
9
9
  };
10
10
  parameterNamePrefix?: string;
11
11
  queryT?: string;
12
- }): Readonly<Record<keyof ObjectType.ObjectSetMethodNames, {
12
+ }): Readonly<Record<keyof NamedObjectType.ObjectSetMethodNames, {
13
13
  readonly name: string;
14
14
  readonly parameters: Code;
15
15
  readonly returnType: Code;
@@ -2,30 +2,30 @@ import { imports } from "./imports.js";
2
2
  import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
3
3
  import { code } from "./ts-poet-wrapper.js";
4
4
  export function objectSetMethodSignatures(parameters) {
5
- const { objectType } = parameters;
5
+ const { namedObjectType } = parameters;
6
6
  const parameterNamePrefix = parameters?.parameterNamePrefix ?? "";
7
7
  const queryT = parameters.queryT ?? `${syntheticNamePrefix}ObjectSet.Query`;
8
- const methodNames = objectType.objectSetMethodNames;
8
+ const methodNames = namedObjectType.objectSetMethodNames;
9
9
  return {
10
10
  object: {
11
11
  name: methodNames.object,
12
- parameters: code `${parameterNamePrefix}identifier: ${objectType.identifierTypeAlias}, options?: { preferredLanguages?: readonly string[]; }`,
13
- returnType: code `Promise<${imports.Either}<Error, ${objectType.name}>>`,
12
+ parameters: code `${parameterNamePrefix}identifier: ${namedObjectType.identifierTypeAlias}, options?: { preferredLanguages?: readonly string[]; }`,
13
+ returnType: code `Promise<${imports.Either}<Error, ${namedObjectType.name}>>`,
14
14
  },
15
15
  objectCount: {
16
16
  name: methodNames.objectCount,
17
- parameters: code `${parameterNamePrefix}query?: Pick<${queryT}<${objectType.filterType}, ${objectType.identifierTypeAlias}>, "filter">`,
17
+ parameters: code `${parameterNamePrefix}query?: Pick<${queryT}<${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>, "filter">`,
18
18
  returnType: code `Promise<${imports.Either}<Error, number>>`,
19
19
  },
20
20
  objectIdentifiers: {
21
21
  name: methodNames.objectIdentifiers,
22
- parameters: code `${parameterNamePrefix}query?: ${queryT}<${objectType.filterType}, ${objectType.identifierTypeAlias}>`,
23
- returnType: code `Promise<${imports.Either}<Error, readonly ${objectType.identifierTypeAlias}[]>>`,
22
+ parameters: code `${parameterNamePrefix}query?: ${queryT}<${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>`,
23
+ returnType: code `Promise<${imports.Either}<Error, readonly ${namedObjectType.identifierTypeAlias}[]>>`,
24
24
  },
25
25
  objects: {
26
26
  name: methodNames.objects,
27
- parameters: code `${parameterNamePrefix}query?: ${queryT}<${objectType.filterType}, ${objectType.identifierTypeAlias}>`,
28
- returnType: code `Promise<${imports.Either}<Error, readonly ${objectType.name}[]>>`,
27
+ parameters: code `${parameterNamePrefix}query?: ${queryT}<${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>`,
28
+ returnType: code `Promise<${imports.Either}<Error, readonly ${namedObjectType.name}[]>>`,
29
29
  },
30
30
  };
31
31
  }