@shaclmate/compiler 4.0.93 → 4.0.95

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 (573) hide show
  1. package/dist/Eithers.d.ts +2 -1
  2. package/dist/Eithers.js +15 -0
  3. package/dist/ShapesGraphToAstTransformer.js +10 -0
  4. package/dist/_ShapesGraphToAstTransformer/ShapeStack.d.ts +2 -2
  5. package/dist/_ShapesGraphToAstTransformer/ShapeStack.js +2 -1
  6. package/dist/_ShapesGraphToAstTransformer/isNodeShape.d.ts +3 -0
  7. package/dist/_ShapesGraphToAstTransformer/isNodeShape.js +4 -0
  8. package/dist/_ShapesGraphToAstTransformer/isPropertyShape.d.ts +3 -0
  9. package/dist/_ShapesGraphToAstTransformer/isPropertyShape.js +4 -0
  10. package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.d.ts +2 -1
  11. package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +4 -3
  12. package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.d.ts +1 -1
  13. package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +7 -3
  14. package/dist/_ShapesGraphToAstTransformer/shapeOntology.d.ts +1 -1
  15. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.d.ts +1 -1
  16. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.js +34 -16
  17. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.d.ts +1 -1
  18. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +3 -2
  19. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +1 -1
  20. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +3 -3
  21. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.d.ts +1 -1
  22. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.js +86 -65
  23. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.d.ts +1 -1
  24. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +1 -1
  25. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +1 -1
  26. package/dist/ast/AbstractCollectionType.d.ts +2 -2
  27. package/dist/ast/AbstractConstruct.d.ts +25 -0
  28. package/dist/ast/AbstractConstruct.js +38 -0
  29. package/dist/ast/AbstractContainerType.d.ts +2 -2
  30. package/dist/ast/AbstractLazyType.d.ts +14 -36
  31. package/dist/ast/AbstractTermType.d.ts +2 -2
  32. package/dist/ast/AbstractType.d.ts +7 -17
  33. package/dist/ast/AbstractType.js +6 -22
  34. package/dist/ast/Ast.d.ts +2 -0
  35. package/dist/ast/DefaultValueType.d.ts +2 -2
  36. package/dist/ast/DiscriminatedUnionType.d.ts +2 -2
  37. package/dist/ast/DiscriminatedUnionType.js +3 -1
  38. package/dist/ast/LiteralType.d.ts +2 -2
  39. package/dist/ast/Operation.d.ts +67 -0
  40. package/dist/ast/Operation.js +32 -0
  41. package/dist/ast/Service.d.ts +17 -0
  42. package/dist/ast/Service.js +17 -0
  43. package/dist/ast/SetType.d.ts +2 -2
  44. package/dist/ast/StructCompoundType.d.ts +1 -1
  45. package/dist/ast/StructCompoundType.js +5 -5
  46. package/dist/ast/StructType.d.ts +64 -32
  47. package/dist/ast/StructType.js +62 -29
  48. package/dist/ast/index.d.ts +2 -0
  49. package/dist/ast/index.js +2 -0
  50. package/dist/generators/transformAstToLabeledPropertyGraph.js +13 -10
  51. package/dist/generators/ts/AbstractCallable.d.ts +20 -0
  52. package/dist/generators/ts/AbstractCallable.js +9 -0
  53. package/dist/generators/ts/AbstractCollectionType.d.ts +7 -9
  54. package/dist/generators/ts/AbstractCollectionType.js +11 -11
  55. package/dist/generators/ts/AbstractCompoundType.d.ts +18 -0
  56. package/dist/generators/ts/AbstractCompoundType.js +33 -0
  57. package/dist/generators/ts/AbstractConstruct.d.ts +31 -0
  58. package/dist/generators/ts/AbstractConstruct.js +31 -0
  59. package/dist/generators/ts/AbstractContainerType.d.ts +7 -4
  60. package/dist/generators/ts/AbstractContainerType.js +5 -2
  61. package/dist/generators/ts/AbstractDateType.d.ts +8 -5
  62. package/dist/generators/ts/AbstractDateType.js +22 -8
  63. package/dist/generators/ts/AbstractDiscriminatedUnionType.d.ts +43 -45
  64. package/dist/generators/ts/AbstractDiscriminatedUnionType.js +100 -258
  65. package/dist/generators/ts/AbstractIdentifierType.d.ts +8 -3
  66. package/dist/generators/ts/AbstractIdentifierType.js +34 -5
  67. package/dist/generators/ts/AbstractIntersectionType.d.ts +48 -0
  68. package/dist/generators/ts/AbstractIntersectionType.js +80 -0
  69. package/dist/generators/ts/AbstractLazyType.d.ts +28 -17
  70. package/dist/generators/ts/AbstractLazyType.js +61 -23
  71. package/dist/generators/ts/AbstractLiteralType.d.ts +2 -2
  72. package/dist/generators/ts/AbstractLiteralType.js +15 -1
  73. package/dist/generators/ts/AbstractNumericType.d.ts +5 -4
  74. package/dist/generators/ts/AbstractNumericType.js +4 -6
  75. package/dist/generators/ts/AbstractObjectSetType.d.ts +5 -6
  76. package/dist/generators/ts/AbstractObjectSetType.js +10 -13
  77. package/dist/generators/ts/AbstractPrimitiveType.d.ts +7 -7
  78. package/dist/generators/ts/AbstractPrimitiveType.js +18 -36
  79. package/dist/generators/ts/AbstractStructuredType.d.ts +71 -0
  80. package/dist/generators/ts/AbstractStructuredType.js +273 -0
  81. package/dist/generators/ts/AbstractTermType.d.ts +8 -10
  82. package/dist/generators/ts/AbstractTermType.js +6 -18
  83. package/dist/generators/ts/AbstractType.d.ts +54 -78
  84. package/dist/generators/ts/AbstractType.js +25 -29
  85. package/dist/generators/ts/AbstractTypedLiteralType.d.ts +5 -4
  86. package/dist/generators/ts/AbstractTypedLiteralType.js +14 -3
  87. package/dist/generators/ts/BigDecimalType.d.ts +15 -13
  88. package/dist/generators/ts/BigDecimalType.js +13 -29
  89. package/dist/generators/ts/BigIntType.d.ts +10 -8
  90. package/dist/generators/ts/BigIntType.js +26 -51
  91. package/dist/generators/ts/BlankNodeType.d.ts +12 -12
  92. package/dist/generators/ts/BlankNodeType.js +9 -35
  93. package/dist/generators/ts/BooleanType.d.ts +12 -6
  94. package/dist/generators/ts/BooleanType.js +21 -11
  95. package/dist/generators/ts/Callable.d.ts +5 -0
  96. package/dist/generators/ts/Callable.js +2 -0
  97. package/dist/generators/ts/CodeThunk.d.ts +6 -0
  98. package/dist/generators/ts/CodeThunk.js +8 -0
  99. package/dist/generators/ts/DateTimeType.d.ts +7 -4
  100. package/dist/generators/ts/DateTimeType.js +8 -21
  101. package/dist/generators/ts/DateType.d.ts +7 -4
  102. package/dist/generators/ts/DateType.js +8 -21
  103. package/dist/generators/ts/DeclaredCallable.d.ts +23 -0
  104. package/dist/generators/ts/DeclaredCallable.js +59 -0
  105. package/dist/generators/ts/DefaultValueType.d.ts +24 -23
  106. package/dist/generators/ts/DefaultValueType.js +29 -59
  107. package/dist/generators/ts/FloatType.d.ts +7 -2
  108. package/dist/generators/ts/FloatType.js +16 -6
  109. package/dist/generators/ts/GraphqlSchema.js +1 -1
  110. package/dist/generators/ts/IdentifierType.d.ts +13 -13
  111. package/dist/generators/ts/IdentifierType.js +10 -39
  112. package/dist/generators/ts/Imports.d.ts +8 -0
  113. package/dist/generators/ts/Imports.js +15 -7
  114. package/dist/generators/ts/InlineCallable.d.ts +18 -0
  115. package/dist/generators/ts/InlineCallable.js +51 -0
  116. package/dist/generators/ts/IntType.d.ts +6 -1
  117. package/dist/generators/ts/IntType.js +16 -1
  118. package/dist/generators/ts/IriType.d.ts +12 -8
  119. package/dist/generators/ts/IriType.js +56 -43
  120. package/dist/generators/ts/LangStringType.d.ts +12 -7
  121. package/dist/generators/ts/LangStringType.js +37 -20
  122. package/dist/generators/ts/LazyOptionType.d.ts +10 -24
  123. package/dist/generators/ts/LazyOptionType.js +5 -26
  124. package/dist/generators/ts/LazySetType.d.ts +7 -2
  125. package/dist/generators/ts/LazySetType.js +5 -25
  126. package/dist/generators/ts/LazyType.d.ts +7 -2
  127. package/dist/generators/ts/LazyType.js +5 -21
  128. package/dist/generators/ts/ListType.d.ts +12 -7
  129. package/dist/generators/ts/ListType.js +45 -22
  130. package/dist/generators/ts/LiteralType.d.ts +11 -7
  131. package/dist/generators/ts/LiteralType.js +31 -21
  132. package/dist/generators/ts/ObjectDiscriminatedUnionType.d.ts +19 -2
  133. package/dist/generators/ts/ObjectDiscriminatedUnionType.js +105 -41
  134. package/dist/generators/ts/ObjectIntersectionType.d.ts +44 -0
  135. package/dist/generators/ts/ObjectIntersectionType.js +204 -0
  136. package/dist/generators/ts/ObjectSetType.js +0 -1
  137. package/dist/generators/ts/ObjectType.d.ts +78 -49
  138. package/dist/generators/ts/ObjectType.js +235 -362
  139. package/dist/generators/ts/Operation.d.ts +54 -0
  140. package/dist/generators/ts/Operation.js +206 -0
  141. package/dist/generators/ts/OptionType.d.ts +15 -13
  142. package/dist/generators/ts/OptionType.js +43 -33
  143. package/dist/generators/ts/RdfjsDatasetObjectSetType.js +14 -7
  144. package/dist/generators/ts/ReferenceCallable.d.ts +14 -0
  145. package/dist/generators/ts/ReferenceCallable.js +16 -0
  146. package/dist/generators/ts/Service.d.ts +15 -0
  147. package/dist/generators/ts/Service.js +53 -0
  148. package/dist/generators/ts/SetType.d.ts +11 -8
  149. package/dist/generators/ts/SetType.js +35 -35
  150. package/dist/generators/ts/SnippetFactory.d.ts +1 -1
  151. package/dist/generators/ts/Snippets.d.ts +80 -2
  152. package/dist/generators/ts/Snippets.js +622 -74
  153. package/dist/generators/ts/SparqlObjectSetType.js +1 -4
  154. package/dist/generators/ts/StringType.d.ts +10 -5
  155. package/dist/generators/ts/StringType.js +25 -17
  156. package/dist/generators/ts/TermType.d.ts +13 -7
  157. package/dist/generators/ts/TermType.js +61 -71
  158. package/dist/generators/ts/TsFeature.d.ts +4 -1
  159. package/dist/generators/ts/TsFeature.js +51 -0
  160. package/dist/generators/ts/TsGenerator.d.ts +2 -1
  161. package/dist/generators/ts/TsGenerator.js +98 -54
  162. package/dist/generators/ts/Type.d.ts +2 -1
  163. package/dist/generators/ts/TypeFactory.d.ts +10 -7
  164. package/dist/generators/ts/TypeFactory.js +193 -140
  165. package/dist/generators/ts/UberObjectDiscriminatedUnionType.d.ts +6 -2
  166. package/dist/generators/ts/UberObjectDiscriminatedUnionType.js +18 -12
  167. package/dist/generators/ts/ZodGenerator.js +6 -14
  168. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_Discriminant.d.ts +3 -6
  169. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_conversionFunctionExpression.d.ts → AbstractDiscriminatedUnionType_conversionFunction.d.ts} +1 -1
  170. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_conversionFunctionExpression.js → AbstractDiscriminatedUnionType_conversionFunction.js} +2 -2
  171. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_equalsFunctionExpression.d.ts → AbstractDiscriminatedUnionType_equalsFunction.d.ts} +1 -1
  172. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_equalsFunctionExpression.js → AbstractDiscriminatedUnionType_equalsFunction.js} +4 -4
  173. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_filterFunctionExpression.d.ts → AbstractDiscriminatedUnionType_filterFunction.d.ts} +1 -1
  174. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_filterFunctionExpression.js → AbstractDiscriminatedUnionType_filterFunction.js} +7 -8
  175. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_filterTypeExpression.js +1 -2
  176. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonObjectFunction.d.ts +5 -0
  177. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonObjectFunction.js +18 -0
  178. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_fromRdfResourceValuesFunctionExpression.d.ts → AbstractDiscriminatedUnionType_fromRdfResourceValuesFunction.d.ts} +1 -1
  179. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromRdfResourceValuesFunction.js +57 -0
  180. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_hashFunctionExpression.d.ts → AbstractDiscriminatedUnionType_hashFunction.d.ts} +1 -1
  181. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_hashFunctionExpression.js → AbstractDiscriminatedUnionType_hashFunction.js} +4 -5
  182. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_inferDiscriminant.js +6 -9
  183. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_inlineExpression.js +5 -5
  184. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonObjectFunction.d.ts +5 -0
  185. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonObjectFunction.js +16 -0
  186. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toLoggableFunction.d.ts +5 -0
  187. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toLoggableFunction.js +20 -0
  188. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_toRdfResourceValuesFunctionExpression.d.ts → AbstractDiscriminatedUnionType_toRdfResourceValuesFunction.d.ts} +1 -1
  189. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toRdfResourceValuesFunction.js +18 -0
  190. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_toStringFunctionExpression.d.ts → AbstractDiscriminatedUnionType_toStringFunction.d.ts} +1 -1
  191. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_toStringFunctionExpression.js → AbstractDiscriminatedUnionType_toStringFunction.js} +3 -3
  192. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunctionExpression.d.ts → AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunction.d.ts} +1 -1
  193. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunctionExpression.js → AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunction.js} +4 -4
  194. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunctionExpression.d.ts → AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunction.d.ts} +1 -1
  195. package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunctionExpression.js → AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunction.js} +4 -4
  196. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_equalsFunction.d.ts +5 -0
  197. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_equalsFunction.js +7 -0
  198. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_filterFunction.d.ts +5 -0
  199. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_filterFunction.js +7 -0
  200. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_hashFunction.d.ts +5 -0
  201. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_hashFunction.js +8 -0
  202. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toLoggableFunction.d.ts +5 -0
  203. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toLoggableFunction.js +14 -0
  204. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toStringFunction.d.ts +5 -0
  205. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toStringFunction.js +17 -0
  206. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlConstructTriplesFunction.d.ts +5 -0
  207. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlConstructTriplesFunction.js +13 -0
  208. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlWherePatternsFunction.d.ts +5 -0
  209. package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlWherePatternsFunction.js +13 -0
  210. package/dist/generators/ts/_AbstractType/AbstractType_DiscriminatedType.d.ts +9 -0
  211. package/dist/generators/ts/_AbstractType/AbstractType_DiscriminatedType.js +2 -0
  212. package/dist/generators/ts/_AbstractType/AbstractType_JsonType.d.ts +196 -11
  213. package/dist/generators/ts/_AbstractType/AbstractType_JsonType.js +411 -17
  214. package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunction.d.ts} +3 -3
  215. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunction.js +12 -0
  216. package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunction.d.ts} +3 -3
  217. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunction.js +32 -0
  218. package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_fromRdfResourceFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_fromRdfResourceFunction.d.ts} +3 -3
  219. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_fromRdfResourceFunction.js +16 -0
  220. package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_graphqlTypeVariableStatement.d.ts → ObjectDiscriminatedUnionType_graphqlTypeExpression.d.ts} +2 -2
  221. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_graphqlTypeExpression.js +11 -0
  222. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_schemaExpression.d.ts +4 -0
  223. package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_schemaVariableStatement.js → ObjectDiscriminatedUnionType_schemaExpression.js} +3 -8
  224. package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_toRdfResourceFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_toRdfResourceFunction.d.ts} +3 -3
  225. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_toRdfResourceFunction.js +17 -0
  226. package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_typeGuardFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_typeGuardFunction.d.ts} +4 -3
  227. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_typeGuardFunction.js +14 -0
  228. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__fromRdfResourceFunction.d.ts +4 -0
  229. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__fromRdfResourceFunction.js +16 -0
  230. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__toRdfResourceFunction.d.ts +4 -0
  231. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__toRdfResourceFunction.js +18 -0
  232. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunction.d.ts +4 -0
  233. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunction.js +30 -0
  234. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunctionParameters.d.ts +4 -0
  235. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunctionParameters.js +25 -0
  236. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createUnsafeFunction.d.ts +4 -0
  237. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createUnsafeFunction.js +10 -0
  238. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlConstructTriplesFunction.d.ts +4 -0
  239. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlConstructTriplesFunction.js +19 -0
  240. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlWherePatternsFunction.d.ts +4 -0
  241. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlWherePatternsFunction.js +19 -0
  242. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromJsonObjectFunction.d.ts +5 -0
  243. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromJsonObjectFunction.js +15 -0
  244. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceFunction.d.ts +4 -0
  245. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceFunction.js +9 -0
  246. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceValuesFunction.d.ts +5 -0
  247. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceValuesFunction.js +8 -0
  248. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toJsonObjectFunction.d.ts +4 -0
  249. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toJsonObjectFunction.js +7 -0
  250. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceFunction.d.ts +4 -0
  251. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceFunction.js +12 -0
  252. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceValuesFunction.d.ts +4 -0
  253. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceValuesFunction.js +5 -0
  254. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_typeGuardFunction.d.ts +5 -0
  255. package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_typeGuardFunction.js +18 -0
  256. package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.d.ts +37 -23
  257. package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.js +19 -1
  258. package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.d.ts +15 -15
  259. package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.js +22 -56
  260. package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.d.ts +9 -10
  261. package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.js +40 -49
  262. package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.d.ts +8 -9
  263. package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.js +47 -14
  264. package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.d.ts +10 -10
  265. package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.js +41 -57
  266. package/dist/generators/ts/_ObjectType/ObjectType__fromRdfResourceFunction.d.ts +4 -0
  267. package/dist/generators/ts/_ObjectType/{ObjectType_fromRdfResourceFunctionExpression.js → ObjectType__fromRdfResourceFunction.js} +14 -11
  268. package/dist/generators/ts/_ObjectType/ObjectType__toRdfResourceFunction.d.ts +4 -0
  269. package/dist/generators/ts/_ObjectType/ObjectType__toRdfResourceFunction.js +32 -0
  270. package/dist/generators/ts/_ObjectType/ObjectType_conversionFunction.d.ts +5 -0
  271. package/dist/generators/ts/_ObjectType/ObjectType_conversionFunction.js +28 -0
  272. package/dist/generators/ts/_ObjectType/ObjectType_createFunction.d.ts +4 -0
  273. package/dist/generators/ts/_ObjectType/ObjectType_createFunction.js +31 -0
  274. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionParameters.d.ts +3 -0
  275. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionParameters.js +29 -0
  276. package/dist/generators/ts/_ObjectType/ObjectType_createUnsafeFunction.d.ts +4 -0
  277. package/dist/generators/ts/_ObjectType/ObjectType_createUnsafeFunction.js +10 -0
  278. package/dist/generators/ts/_ObjectType/{ObjectType_equalsFunctionExpression.d.ts → ObjectType_equalsFunction.d.ts} +2 -1
  279. package/dist/generators/ts/_ObjectType/{ObjectType_equalsFunctionExpression.js → ObjectType_equalsFunction.js} +6 -4
  280. package/dist/generators/ts/_ObjectType/{ObjectType_filterFunctionExpression.d.ts → ObjectType_filterFunction.d.ts} +2 -1
  281. package/dist/generators/ts/_ObjectType/{ObjectType_filterFunctionExpression.js → ObjectType_filterFunction.js} +5 -2
  282. package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionExpression.d.ts → ObjectType_focusSparqlConstructTriplesFunction.d.ts} +3 -3
  283. package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionExpression.js → ObjectType_focusSparqlConstructTriplesFunction.js} +11 -4
  284. package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionExpression.d.ts → ObjectType_focusSparqlWherePatternsFunction.d.ts} +3 -3
  285. package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionExpression.js → ObjectType_focusSparqlWherePatternsFunction.js} +11 -4
  286. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonObjectFunction.d.ts +5 -0
  287. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonObjectFunction.js +19 -0
  288. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunction.d.ts +4 -0
  289. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunction.js +9 -0
  290. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunction.d.ts +5 -0
  291. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunction.js +8 -0
  292. package/dist/generators/ts/_ObjectType/{ObjectType_hashFunctionExpression.d.ts → ObjectType_hashFunction.d.ts} +2 -1
  293. package/dist/generators/ts/_ObjectType/{ObjectType_hashFunctionExpression.js → ObjectType_hashFunction.js} +10 -14
  294. package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.d.ts +6 -2
  295. package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.js +1 -2
  296. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunction.d.ts +20 -0
  297. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunction.js +39 -0
  298. package/dist/generators/ts/_ObjectType/{ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts → ObjectType_sparqlConstructQueryStringFunction.d.ts} +11 -4
  299. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunction.js +11 -0
  300. package/dist/generators/ts/_ObjectType/ObjectType_toJsonObjectFunction.d.ts +5 -0
  301. package/dist/generators/ts/_ObjectType/ObjectType_toJsonObjectFunction.js +16 -0
  302. package/dist/generators/ts/_ObjectType/ObjectType_toLoggableFunction.d.ts +5 -0
  303. package/dist/generators/ts/_ObjectType/ObjectType_toLoggableFunction.js +11 -0
  304. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunction.d.ts +4 -0
  305. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunction.js +12 -0
  306. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceValuesFunction.d.ts +5 -0
  307. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceValuesFunction.js +8 -0
  308. package/dist/generators/ts/_ObjectType/{ObjectType_toStringFunctionExpression.d.ts → ObjectType_toStringFunction.d.ts} +2 -1
  309. package/dist/generators/ts/_ObjectType/ObjectType_toStringFunction.js +10 -0
  310. package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunction.d.ts +4 -0
  311. package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunction.js +17 -0
  312. package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunction.d.ts +5 -0
  313. package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunction.js +18 -0
  314. package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlConstructTriplesFunctionExpression.d.ts → ObjectType_valueSparqlConstructTriplesFunction.d.ts} +1 -1
  315. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunction.js +7 -0
  316. package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlWherePatternsFunctionExpression.d.ts → ObjectType_valueSparqlWherePatternsFunction.d.ts} +1 -1
  317. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunction.js +9 -0
  318. package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +1 -0
  319. package/dist/generators/ts/_snippets/snippets_DateSchema.js +1 -0
  320. package/dist/generators/ts/_snippets/snippets_FilterFunction.d.ts +3 -0
  321. package/dist/generators/ts/_snippets/snippets_FilterFunction.js +3 -0
  322. package/dist/generators/ts/_snippets/snippets_FromJsonObjectFunction.d.ts +3 -0
  323. package/dist/generators/ts/_snippets/snippets_FromJsonObjectFunction.js +21 -0
  324. package/dist/generators/ts/_snippets/snippets_FromJsonValueFunction.d.ts +3 -0
  325. package/dist/generators/ts/_snippets/snippets_FromJsonValueFunction.js +21 -0
  326. package/dist/generators/ts/_snippets/snippets_HashFunction.js +1 -1
  327. package/dist/generators/ts/_snippets/snippets_Hasher.js +1 -1
  328. package/dist/generators/ts/_snippets/snippets_IdentifierJsonObject.d.ts +3 -0
  329. package/dist/generators/ts/_snippets/snippets_IdentifierJsonObject.js +12 -0
  330. package/dist/generators/ts/_snippets/snippets_LangStringJsonObject.d.ts +3 -0
  331. package/dist/generators/ts/_snippets/snippets_LangStringJsonObject.js +14 -0
  332. package/dist/generators/ts/_snippets/snippets_Lazy.js +8 -1
  333. package/dist/generators/ts/_snippets/snippets_LazyOption.js +17 -1
  334. package/dist/generators/ts/_snippets/snippets_LazySet.js +8 -1
  335. package/dist/generators/ts/_snippets/snippets_LiteralJsonObject.d.ts +3 -0
  336. package/dist/generators/ts/_snippets/snippets_LiteralJsonObject.js +16 -0
  337. package/dist/generators/ts/_snippets/snippets_NumericSchema.js +1 -0
  338. package/dist/generators/ts/_snippets/snippets_ObjectTypeGuardFunction.d.ts +3 -0
  339. package/dist/generators/ts/_snippets/snippets_ObjectTypeGuardFunction.js +4 -0
  340. package/dist/generators/ts/_snippets/snippets_Primitive.d.ts +3 -0
  341. package/dist/generators/ts/_snippets/snippets_Primitive.js +4 -0
  342. package/dist/generators/ts/_snippets/snippets_ProblemDetailsJson.d.ts +3 -0
  343. package/dist/generators/ts/_snippets/snippets_ProblemDetailsJson.js +41 -0
  344. package/dist/generators/ts/_snippets/snippets_PropertyPath.js +11 -6
  345. package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryFunction.d.ts +3 -0
  346. package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryFunction.js +12 -0
  347. package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryStringFunction.d.ts +3 -0
  348. package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryStringFunction.js +13 -0
  349. package/dist/generators/ts/_snippets/snippets_StringSchema.js +1 -0
  350. package/dist/generators/ts/_snippets/snippets_TermJsonObject.d.ts +3 -0
  351. package/dist/generators/ts/_snippets/snippets_TermJsonObject.js +8 -0
  352. package/dist/generators/ts/_snippets/snippets_ToJsonObjectFunction.d.ts +3 -0
  353. package/dist/generators/ts/_snippets/snippets_ToJsonObjectFunction.js +3 -0
  354. package/dist/generators/ts/_snippets/snippets_ToJsonValueFunction.d.ts +3 -0
  355. package/dist/generators/ts/_snippets/snippets_ToJsonValueFunction.js +3 -0
  356. package/dist/generators/ts/_snippets/snippets_ToLoggableFunction.d.ts +3 -0
  357. package/dist/generators/ts/_snippets/snippets_ToLoggableFunction.js +3 -0
  358. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +1 -1
  359. package/dist/generators/ts/_snippets/snippets_ToStringFunction.d.ts +3 -0
  360. package/dist/generators/ts/_snippets/snippets_ToStringFunction.js +3 -0
  361. package/dist/generators/ts/_snippets/snippets_ToStringRecordFunction.d.ts +3 -0
  362. package/dist/generators/ts/_snippets/snippets_ToStringRecordFunction.js +3 -0
  363. package/dist/generators/ts/_snippets/snippets_TypedLiteralJsonObject.d.ts +3 -0
  364. package/dist/generators/ts/_snippets/snippets_TypedLiteralJsonObject.js +14 -0
  365. package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.js +1 -1
  366. package/dist/generators/ts/_snippets/snippets_arrayFromJsonArray.d.ts +3 -0
  367. package/dist/generators/ts/_snippets/snippets_arrayFromJsonArray.js +13 -0
  368. package/dist/generators/ts/_snippets/snippets_arrayToJsonArray.d.ts +3 -0
  369. package/dist/generators/ts/_snippets/snippets_arrayToJsonArray.js +6 -0
  370. package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonObject.d.ts +3 -0
  371. package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonObject.js +5 -0
  372. package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonString.d.ts +3 -0
  373. package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonString.js +5 -0
  374. package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.js +3 -3
  375. package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.js +3 -2
  376. package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonObject.d.ts +3 -0
  377. package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonObject.js +6 -0
  378. package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonString.d.ts +3 -0
  379. package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonString.js +5 -0
  380. package/dist/generators/ts/_snippets/snippets_bigIntFromJsonObject.d.ts +3 -0
  381. package/dist/generators/ts/_snippets/snippets_bigIntFromJsonObject.js +9 -0
  382. package/dist/generators/ts/_snippets/snippets_bigIntFromJsonString.d.ts +3 -0
  383. package/dist/generators/ts/_snippets/snippets_bigIntFromJsonString.js +8 -0
  384. package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.js +2 -2
  385. package/dist/generators/ts/_snippets/snippets_bigIntToJsonObject.d.ts +3 -0
  386. package/dist/generators/ts/_snippets/snippets_bigIntToJsonObject.js +6 -0
  387. package/dist/generators/ts/_snippets/snippets_bigIntToJsonString.d.ts +3 -0
  388. package/dist/generators/ts/_snippets/snippets_bigIntToJsonString.js +5 -0
  389. package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonObject.d.ts +3 -0
  390. package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonObject.js +5 -0
  391. package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonString.d.ts +3 -0
  392. package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonString.js +5 -0
  393. package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.js +2 -3
  394. package/dist/generators/ts/_snippets/snippets_blankNodeToJsonObject.d.ts +3 -0
  395. package/dist/generators/ts/_snippets/snippets_blankNodeToJsonObject.js +5 -0
  396. package/dist/generators/ts/_snippets/snippets_blankNodeToJsonString.d.ts +3 -0
  397. package/dist/generators/ts/_snippets/snippets_blankNodeToJsonString.js +5 -0
  398. package/dist/generators/ts/_snippets/snippets_booleanFromJsonBoolean.d.ts +3 -0
  399. package/dist/generators/ts/_snippets/snippets_booleanFromJsonBoolean.js +6 -0
  400. package/dist/generators/ts/_snippets/snippets_booleanFromJsonObject.d.ts +3 -0
  401. package/dist/generators/ts/_snippets/snippets_booleanFromJsonObject.js +9 -0
  402. package/dist/generators/ts/_snippets/snippets_constrainPrimitive.d.ts +3 -0
  403. package/dist/generators/ts/_snippets/snippets_constrainPrimitive.js +12 -0
  404. package/dist/generators/ts/_snippets/snippets_convertToLazy.js +2 -13
  405. package/dist/generators/ts/_snippets/snippets_convertToLazyOption.js +2 -13
  406. package/dist/generators/ts/_snippets/snippets_convertToLazySet.js +2 -15
  407. package/dist/generators/ts/_snippets/snippets_dateFromJsonObject.d.ts +3 -0
  408. package/dist/generators/ts/_snippets/snippets_dateFromJsonObject.js +5 -0
  409. package/dist/generators/ts/_snippets/snippets_dateFromJsonString.d.ts +3 -0
  410. package/dist/generators/ts/_snippets/snippets_dateFromJsonString.js +5 -0
  411. package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.js +3 -4
  412. package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +7 -6
  413. package/dist/generators/ts/_snippets/snippets_dateTimeFromJsonObject.d.ts +3 -0
  414. package/dist/generators/ts/_snippets/snippets_dateTimeFromJsonObject.js +5 -0
  415. package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.js +3 -4
  416. package/dist/generators/ts/_snippets/snippets_dateTimeToJsonString.d.ts +3 -0
  417. package/dist/generators/ts/_snippets/snippets_dateTimeToJsonString.js +5 -0
  418. package/dist/generators/ts/_snippets/snippets_dateToJsonObject.d.ts +3 -0
  419. package/dist/generators/ts/_snippets/snippets_dateToJsonObject.js +6 -0
  420. package/dist/generators/ts/_snippets/snippets_dateToJsonString.d.ts +3 -0
  421. package/dist/generators/ts/_snippets/snippets_dateToJsonString.js +5 -0
  422. package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonObject.d.ts +3 -0
  423. package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonObject.js +9 -0
  424. package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonValue.d.ts +3 -0
  425. package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonValue.js +9 -0
  426. package/dist/generators/ts/_snippets/snippets_errorToProblemDetailsJson.d.ts +3 -0
  427. package/dist/generators/ts/_snippets/snippets_errorToProblemDetailsJson.js +27 -0
  428. package/dist/generators/ts/_snippets/snippets_filterBigDecimal.js +1 -1
  429. package/dist/generators/ts/_snippets/snippets_filterBlankNode.js +1 -3
  430. package/dist/generators/ts/_snippets/snippets_filterBoolean.js +1 -1
  431. package/dist/generators/ts/_snippets/snippets_filterDate.js +1 -1
  432. package/dist/generators/ts/_snippets/snippets_filterIdentifier.js +1 -1
  433. package/dist/generators/ts/_snippets/snippets_filterIri.js +1 -1
  434. package/dist/generators/ts/_snippets/snippets_filterLiteral.js +1 -3
  435. package/dist/generators/ts/_snippets/snippets_filterString.js +1 -1
  436. package/dist/generators/ts/_snippets/snippets_filterTerm.js +17 -17
  437. package/dist/generators/ts/_snippets/snippets_floatFromJsonNumber.d.ts +3 -0
  438. package/dist/generators/ts/_snippets/snippets_floatFromJsonNumber.js +6 -0
  439. package/dist/generators/ts/_snippets/snippets_floatFromJsonObject.d.ts +3 -0
  440. package/dist/generators/ts/_snippets/snippets_floatFromJsonObject.js +9 -0
  441. package/dist/generators/ts/_snippets/snippets_hashArray.js +1 -2
  442. package/dist/generators/ts/_snippets/snippets_hashBigDecimal.js +1 -2
  443. package/dist/generators/ts/_snippets/snippets_hashBoolean.js +1 -2
  444. package/dist/generators/ts/_snippets/snippets_hashDate.js +1 -2
  445. package/dist/generators/ts/_snippets/snippets_hashDateTime.js +1 -2
  446. package/dist/generators/ts/_snippets/snippets_hashMaybe.js +1 -2
  447. package/dist/generators/ts/_snippets/snippets_hashNumeric.js +1 -2
  448. package/dist/generators/ts/_snippets/snippets_hashString.js +1 -2
  449. package/dist/generators/ts/_snippets/snippets_hashTerm.js +1 -2
  450. package/dist/generators/ts/_snippets/snippets_identifierFromJsonObject.d.ts +3 -0
  451. package/dist/generators/ts/_snippets/snippets_identifierFromJsonObject.js +5 -0
  452. package/dist/generators/ts/_snippets/snippets_identifierFromJsonString.d.ts +3 -0
  453. package/dist/generators/ts/_snippets/snippets_identifierFromJsonString.js +5 -0
  454. package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.js +2 -3
  455. package/dist/generators/ts/_snippets/snippets_identifierToJsonObject.d.ts +3 -0
  456. package/dist/generators/ts/_snippets/snippets_identifierToJsonObject.js +5 -0
  457. package/dist/generators/ts/_snippets/snippets_identifierToJsonString.d.ts +3 -0
  458. package/dist/generators/ts/_snippets/snippets_identifierToJsonString.js +5 -0
  459. package/dist/generators/ts/_snippets/snippets_intFromJsonNumber.d.ts +3 -0
  460. package/dist/generators/ts/_snippets/snippets_intFromJsonNumber.js +6 -0
  461. package/dist/generators/ts/_snippets/snippets_intFromJsonObject.d.ts +3 -0
  462. package/dist/generators/ts/_snippets/snippets_intFromJsonObject.js +9 -0
  463. package/dist/generators/ts/_snippets/snippets_iriFromJsonObject.d.ts +3 -0
  464. package/dist/generators/ts/_snippets/snippets_iriFromJsonObject.js +6 -0
  465. package/dist/generators/ts/_snippets/snippets_iriFromJsonString.d.ts +3 -0
  466. package/dist/generators/ts/_snippets/snippets_iriFromJsonString.js +6 -0
  467. package/dist/generators/ts/_snippets/snippets_iriToJsonObject.d.ts +3 -0
  468. package/dist/generators/ts/_snippets/snippets_iriToJsonObject.js +6 -0
  469. package/dist/generators/ts/_snippets/snippets_iriToJsonString.d.ts +3 -0
  470. package/dist/generators/ts/_snippets/snippets_iriToJsonString.js +6 -0
  471. package/dist/generators/ts/_snippets/snippets_langStringFromJsonObject.d.ts +3 -0
  472. package/dist/generators/ts/_snippets/snippets_langStringFromJsonObject.js +5 -0
  473. package/dist/generators/ts/_snippets/snippets_langStringFromRdfResourceValues.js +2 -3
  474. package/dist/generators/ts/_snippets/snippets_langStringToJsonObject.d.ts +3 -0
  475. package/dist/generators/ts/_snippets/snippets_langStringToJsonObject.js +5 -0
  476. package/dist/generators/ts/_snippets/snippets_listFromJsonObject.d.ts +3 -0
  477. package/dist/generators/ts/_snippets/snippets_listFromJsonObject.js +10 -0
  478. package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +6 -5
  479. package/dist/generators/ts/_snippets/snippets_listToJsonObject.d.ts +3 -0
  480. package/dist/generators/ts/_snippets/snippets_listToJsonObject.js +6 -0
  481. package/dist/generators/ts/_snippets/snippets_literalFromJsonObject.d.ts +3 -0
  482. package/dist/generators/ts/_snippets/snippets_literalFromJsonObject.js +16 -0
  483. package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.js +2 -3
  484. package/dist/generators/ts/_snippets/snippets_literalToJsonObject.d.ts +3 -0
  485. package/dist/generators/ts/_snippets/snippets_literalToJsonObject.js +15 -0
  486. package/dist/generators/ts/_snippets/snippets_maybeFromJsonObject.d.ts +3 -0
  487. package/dist/generators/ts/_snippets/snippets_maybeFromJsonObject.js +12 -0
  488. package/dist/generators/ts/_snippets/snippets_maybeFromJsonValue.d.ts +3 -0
  489. package/dist/generators/ts/_snippets/snippets_maybeFromJsonValue.js +12 -0
  490. package/dist/generators/ts/_snippets/snippets_maybeToJsonObject.d.ts +3 -0
  491. package/dist/generators/ts/_snippets/snippets_maybeToJsonObject.js +6 -0
  492. package/dist/generators/ts/_snippets/snippets_maybeToJsonValue.d.ts +3 -0
  493. package/dist/generators/ts/_snippets/snippets_maybeToJsonValue.js +6 -0
  494. package/dist/generators/ts/_snippets/snippets_missingResolver.d.ts +3 -0
  495. package/dist/generators/ts/_snippets/snippets_missingResolver.js +3 -0
  496. package/dist/generators/ts/_snippets/snippets_primitiveToJsonObject.d.ts +3 -0
  497. package/dist/generators/ts/_snippets/snippets_primitiveToJsonObject.js +6 -0
  498. package/dist/generators/ts/_snippets/snippets_primitiveToJsonValue.d.ts +3 -0
  499. package/dist/generators/ts/_snippets/snippets_primitiveToJsonValue.js +6 -0
  500. package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.js +4 -3
  501. package/dist/generators/ts/_snippets/snippets_stringFromJsonObject.d.ts +3 -0
  502. package/dist/generators/ts/_snippets/snippets_stringFromJsonObject.js +9 -0
  503. package/dist/generators/ts/_snippets/snippets_stringFromJsonString.d.ts +3 -0
  504. package/dist/generators/ts/_snippets/snippets_stringFromJsonString.js +6 -0
  505. package/dist/generators/ts/_snippets/snippets_termFromJsonObject.d.ts +3 -0
  506. package/dist/generators/ts/_snippets/snippets_termFromJsonObject.js +31 -0
  507. package/dist/generators/ts/_snippets/snippets_termToJsonObject.d.ts +3 -0
  508. package/dist/generators/ts/_snippets/snippets_termToJsonObject.js +14 -0
  509. package/dist/generators/ts/_snippets/snippets_typedLiteralToJsonObject.d.ts +3 -0
  510. package/dist/generators/ts/_snippets/snippets_typedLiteralToJsonObject.js +5 -0
  511. package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.js +23 -3
  512. package/dist/generators/ts/_snippets/snippets_zValidator.d.ts +3 -0
  513. package/dist/generators/ts/_snippets/snippets_zValidator.js +16 -0
  514. package/dist/generators/ts/rdfjsTermExpression.d.ts +1 -1
  515. package/dist/generators/ts/rdfjsTermExpression.js +5 -54
  516. package/dist/input/ShapesGraph.d.ts +7 -3
  517. package/dist/input/ShapesGraph.js +74 -3
  518. package/dist/input/index.d.ts +3 -1
  519. package/dist/input/index.js +1 -1
  520. package/dist/input/input.shaclmate.d.ts +1507 -253
  521. package/dist/input/input.shaclmate.js +1226 -402
  522. package/dist/input/input.shaclmate.ttl +245 -0
  523. package/package.json +331 -98
  524. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonFunctionExpression.d.ts +0 -5
  525. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonFunctionExpression.js +0 -14
  526. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromRdfResourceValuesFunctionExpression.js +0 -22
  527. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonSchemaExpression.d.ts +0 -5
  528. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonSchemaExpression.js +0 -32
  529. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonTypeLiteral.d.ts +0 -5
  530. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonTypeLiteral.js +0 -26
  531. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonFunctionExpression.d.ts +0 -5
  532. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonFunctionExpression.js +0 -10
  533. package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toRdfResourceValuesFunctionExpression.js +0 -30
  534. package/dist/generators/ts/_AbstractType/AbstractType_DiscriminantProperty.d.ts +0 -9
  535. package/dist/generators/ts/_AbstractType/AbstractType_DiscriminantProperty.js +0 -2
  536. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunctionDeclaration.js +0 -13
  537. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunctionDeclaration.js +0 -32
  538. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_fromRdfResourceFunctionDeclaration.js +0 -17
  539. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_graphqlTypeVariableStatement.js +0 -16
  540. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_identifierTypeDeclarations.d.ts +0 -4
  541. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_identifierTypeDeclarations.js +0 -14
  542. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_schemaVariableStatement.d.ts +0 -4
  543. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_toRdfResourceFunctionDeclaration.js +0 -15
  544. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_typeGuardFunctionDeclaration.js +0 -16
  545. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.d.ts +0 -4
  546. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.js +0 -29
  547. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.d.ts +0 -4
  548. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.js +0 -12
  549. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.d.ts +0 -4
  550. package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +0 -4
  551. package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.js +0 -10
  552. package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.d.ts +0 -4
  553. package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.js +0 -22
  554. package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.d.ts +0 -4
  555. package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.js +0 -5
  556. package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.d.ts +0 -4
  557. package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.js +0 -17
  558. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +0 -10
  559. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +0 -35
  560. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +0 -8
  561. package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.d.ts +0 -4
  562. package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.js +0 -12
  563. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.d.ts +0 -4
  564. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.js +0 -26
  565. package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.js +0 -7
  566. package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.d.ts +0 -4
  567. package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.js +0 -5
  568. package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunctionExpression.d.ts +0 -5
  569. package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunctionExpression.js +0 -14
  570. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js +0 -8
  571. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js +0 -10
  572. package/dist/generators/ts/_snippets/snippets_RdfVocabularies.d.ts +0 -3
  573. package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +0 -42
@@ -1,30 +1,25 @@
1
1
  import type { BlankNode, NamedNode } from "@rdfjs/types";
2
- import type { Logger } from "@rdfx/logger";
3
2
  import { Maybe } from "purify-ts";
4
3
  import { AbstractType_ConversionFunction } from "./_AbstractType/AbstractType_ConversionFunction.js";
5
- import type { AbstractType_DiscriminantProperty } from "./_AbstractType/AbstractType_DiscriminantProperty.js";
4
+ import type { AbstractType_DiscriminatedType } from "./_AbstractType/AbstractType_DiscriminatedType.js";
6
5
  import { AbstractType_GraphqlType } from "./_AbstractType/AbstractType_GraphqlType.js";
7
- import { AbstractType_JsonType } from "./_AbstractType/AbstractType_JsonType.js";
6
+ import type { AbstractType_JsonType, AbstractType_JsonTypeFactory } from "./_AbstractType/AbstractType_JsonType.js";
8
7
  import { AbstractType_JsType } from "./_AbstractType/AbstractType_JsType.js";
9
- import type { Reusables } from "./Reusables.js";
10
- import { rdfjsTermExpression } from "./rdfjsTermExpression.js";
11
- import type { TsGenerator } from "./TsGenerator.js";
8
+ import { AbstractConstruct } from "./AbstractConstruct.js";
9
+ import type { Callable } from "./Callable.js";
12
10
  import { type Code } from "./ts-poet-wrapper.js";
13
11
  /**
14
12
  * Abstract base class all types.
15
13
  */
16
- export declare abstract class AbstractType {
17
- protected readonly configuration: TsGenerator.Configuration;
14
+ export declare abstract class AbstractType extends AbstractConstruct {
18
15
  /**
19
16
  * Inline TypeScript type expression.
20
17
  */
21
18
  protected abstract readonly inlineExpression: Code;
22
- protected readonly logger: Logger;
23
- protected readonly reusables: Reusables;
24
19
  /**
25
- * Comment from rdfs:comment.
20
+ * Factory for AbstractType.JsonType.
26
21
  */
27
- readonly comment: Maybe<string>;
22
+ protected readonly jsonTypeFactory: AbstractType.JsonTypeFactory;
28
23
  /**
29
24
  * Function that takes a value of one or more source types to this type and returns Either<Error, ThisType>.
30
25
  *
@@ -36,23 +31,31 @@ export declare abstract class AbstractType {
36
31
  */
37
32
  abstract readonly conversionFunction: Maybe<AbstractType.ConversionFunction>;
38
33
  /**
39
- * A property that discriminates sub-types of this type e.g., termType on RDF/JS terms.
34
+ * A version of this type with an intrinsic discriminant property.
40
35
  */
41
- abstract readonly discriminantProperty: Maybe<AbstractType.DiscriminantProperty>;
36
+ abstract readonly discriminatedType: Maybe<AbstractType.DiscriminatedType>;
42
37
  /**
43
38
  * A function (reference or literal) that compares two property values of this type, returning a
44
39
  * $EqualsResult.
45
40
  */
46
- abstract readonly equalsFunction: Code;
41
+ abstract readonly equalsFunction: Callable;
47
42
  /**
48
43
  * A function (reference or literal) that takes a filter of filterType (below) and a value of this type
49
44
  * and returns true if the value passes the filter.
50
45
  */
51
- abstract readonly filterFunction: Code;
46
+ abstract readonly filterFunction: Callable;
52
47
  /**
53
48
  * Composite type for filtering instances of this type e.g., SomeObject.Filter with filters for each property.
54
49
  */
55
50
  abstract readonly filterType: Code;
51
+ /**
52
+ * A function (reference or literal) that converts an instance of jsonObjectType to an Either<Error, ThisType>.
53
+ */
54
+ abstract readonly fromJsonObjectFunction: Callable;
55
+ /**
56
+ * A function (reference or literal) that converts an instance of jsonValueType to an Either<Error, ThisType>.
57
+ */
58
+ abstract readonly fromJsonValueFunction: Callable;
56
59
  /**
57
60
  * A FromRdfResourceValuesFunction (reference or literal) that converts a Either<Error, rdfjsResource.Resource.Values> to a
58
61
  * Either<Error, rdfjsResource.Resource.Values<this type>>.
@@ -73,7 +76,7 @@ export declare abstract class AbstractType {
73
76
  * preferredLanguages: the preferred languages array (e.g., ["en"]) passed to Object.fromRdf
74
77
  * propertyPath: the PropertyPath of the object's property
75
78
  */
76
- abstract readonly fromRdfResourceValuesFunction: Code;
79
+ abstract readonly fromRdfResourceValuesFunction: Callable;
77
80
  /**
78
81
  * Declarations for GraphQL arguments to pass to this the graphqlResolveExpression.
79
82
  */
@@ -87,19 +90,25 @@ export declare abstract class AbstractType {
87
90
  /**
88
91
  * A function (reference or literal) that takes a Hasher and a value of this type, calls hasher.update on the value, and returns the Hasher.
89
92
  */
90
- abstract readonly hashFunction: Code;
93
+ abstract readonly hashFunction: Callable;
91
94
  /**
92
95
  * JavaScript type(s) the type.
93
96
  */
94
97
  abstract readonly jsTypes: readonly AbstractType.JsType[];
95
98
  /**
96
- * Type discriminant.
99
+ * JSON object form of this type.
97
100
  */
98
- abstract readonly kind: string;
101
+ abstract readonly jsonObjectType: AbstractType.JsonType & {
102
+ readonly kind: "JsonDiscriminatedUnion" | "JsonIntersection" | "JsonObject";
103
+ };
99
104
  /**
100
- * Label from rdfs:label.
105
+ * JSON value form of this type. May be the same as the JSON object form.
101
106
  */
102
- readonly label: Maybe<string>;
107
+ abstract readonly jsonValueType: AbstractType.JsonType;
108
+ /**
109
+ * Type discriminant.
110
+ */
111
+ abstract readonly kind: string;
103
112
  /**
104
113
  * Is a value of this type mutable?
105
114
  */
@@ -124,6 +133,14 @@ export declare abstract class AbstractType {
124
133
  * Identifier of the shape this type was derived from.
125
134
  */
126
135
  readonly shapeIdentifier: BlankNode | NamedNode;
136
+ /**
137
+ * A function (reference or literal) that converts an instance of this type to the jsonObjectType.
138
+ */
139
+ abstract readonly toJsonObjectFunction: Callable;
140
+ /**
141
+ * A function (reference or literal) that converts an instance of this type to the jsonValueType.
142
+ */
143
+ abstract readonly toJsonValueFunction: Callable;
127
144
  /**
128
145
  * The type(s) of the array elements produced by the toRdfResourceValuesExpression.
129
146
  */
@@ -139,7 +156,7 @@ export declare abstract class AbstractType {
139
156
  *
140
157
  * If unspecified, uses an identity function (i.e., function identity(schema: unknown, value: ThisType): Either<Error, ThisType>).
141
158
  */
142
- abstract readonly validationFunction: Maybe<Code>;
159
+ abstract readonly validationFunction: Maybe<Callable>;
143
160
  /**
144
161
  * A ValueSparqlConstructTriplesFunction (reference or literal) that returns an array of sparqljs.Triple's for a property value of this type.
145
162
  *
@@ -150,7 +167,7 @@ export declare abstract class AbstractType {
150
167
  * - valueVariable: rdfjs.Variable of the value of this type
151
168
  * - variablePrefix: string prefix to use for new variables
152
169
  */
153
- abstract readonly valueSparqlConstructTriplesFunction: Code;
170
+ abstract readonly valueSparqlConstructTriplesFunction: Callable;
154
171
  /**
155
172
  * A ValueSparqlWherePatternsFunction (reference or literal) that returns an array of SparqlPattern's for a property value of this type.
156
173
  *
@@ -162,38 +179,29 @@ export declare abstract class AbstractType {
162
179
  * - valueVariable: rdfjs.Variable of the value of this type
163
180
  * - variablePrefix: string prefix to use for new variables
164
181
  */
165
- abstract readonly valueSparqlWherePatternsFunction: Code;
166
- constructor({ comment, configuration, label, logger, name, reusables, shapeIdentifier, }: {
182
+ abstract readonly valueSparqlWherePatternsFunction: Callable;
183
+ constructor({ jsonTypeFactory, name, shapeIdentifier, ...superParameters }: {
184
+ jsonTypeFactory: AbstractType.JsonTypeFactory;
167
185
  name: Maybe<string>;
168
- comment: Maybe<string>;
169
- configuration: TsGenerator.Configuration;
170
- label: Maybe<string>;
171
- logger: Logger;
172
- reusables: Reusables;
173
186
  shapeIdentifier: BlankNode | NamedNode;
174
- });
187
+ } & ConstructorParameters<typeof AbstractConstruct>[0]);
175
188
  /**
176
189
  * The declaration of named types.
177
190
  */
178
191
  get declaration(): Maybe<Code>;
192
+ /**
193
+ * Expression of this type. If the type has a name it will be that name (a reference). Otherwise it will be the .inlineExpression.
194
+ */
179
195
  get expression(): Code;
180
196
  /**
181
197
  * TypeScript object describing this type, for runtime use.
182
198
  */
183
199
  get schema(): Code;
184
- protected get schemaExpression(): Code;
200
+ get schemaVariable(): Maybe<Code>;
185
201
  /**
186
202
  * Helper to compose the result of schema along the type hierarchy.
187
203
  */
188
204
  protected get schemaInitializers(): readonly Code[];
189
- /**
190
- * An expression that converts this type's JSON type to an Either<Error, ThisType>.
191
- */
192
- abstract fromJsonExpression(parameters: {
193
- variables: {
194
- value: Code;
195
- };
196
- }): Code;
197
205
  /**
198
206
  * An expression that resolves a value of this type in the GraphQL server.
199
207
  */
@@ -204,38 +212,9 @@ export declare abstract class AbstractType {
204
212
  };
205
213
  }): Code;
206
214
  /**
207
- * Zod schema for the JSON type of this type.
208
- *
209
- * This method is called in two contexts:
210
- * "property": from a ShaclProperty, while generating the z.object properties of an ObjectType
211
- * "type": from another Type e.g., an OptionType or DiscriminatedUnionType
212
- *
213
- * z.lazy() should only be returned for "property".
215
+ * An expression that converts a value of this type to a value that can be logged.
214
216
  */
215
- abstract jsonSchema(parameters: {
216
- includeDiscriminantProperty?: boolean;
217
- context: "property" | "type";
218
- }): Code;
219
- /**
220
- * JSON-compatible version of the type.
221
- */
222
- abstract jsonType(parameters?: {
223
- includeDiscriminantProperty?: boolean;
224
- }): AbstractType.JsonType;
225
- /**
226
- * Element object for a JSON Forms UI schema.
227
- */
228
- abstract jsonUiSchemaElement(parameters: {
229
- variables: {
230
- scopePrefix: Code;
231
- };
232
- }): Maybe<Code>;
233
- /**
234
- * An expression that converts a value of this type to a JSON-LD compatible value. It can assume the presence
235
- * of the correct JSON-LD context.
236
- */
237
- abstract toJsonExpression(parameters: {
238
- includeDiscriminantProperty?: boolean;
217
+ abstract toLoggableExpression(parameters: {
239
218
  variables: {
240
219
  value: Code;
241
220
  };
@@ -268,7 +247,7 @@ export declare abstract class AbstractType {
268
247
  value: Code;
269
248
  };
270
249
  }): Code;
271
- protected readonly rdfjsTermExpression: (parameters: Parameters<typeof rdfjsTermExpression>[0]) => Code;
250
+ protected schemaExpression(): Code;
272
251
  protected staticModuleDeclarations(_name: string): Record<string, Code>;
273
252
  }
274
253
  export declare namespace AbstractType {
@@ -277,15 +256,12 @@ export declare namespace AbstractType {
277
256
  const SourceType: typeof AbstractType_ConversionFunction.SourceType;
278
257
  type SourceType = AbstractType_ConversionFunction.SourceType;
279
258
  }
280
- type DiscriminantProperty = AbstractType_DiscriminantProperty;
281
- namespace DiscriminantProperty {
282
- type Value = AbstractType_DiscriminantProperty.Value;
283
- }
259
+ type DiscriminatedType = AbstractType_DiscriminatedType;
284
260
  const GraphqlType: typeof AbstractType_GraphqlType;
285
261
  type GraphqlType = AbstractType_GraphqlType;
286
262
  type JsType = AbstractType_JsType;
287
263
  const JsType: typeof AbstractType_JsType;
288
- const JsonType: typeof AbstractType_JsonType;
289
264
  type JsonType = AbstractType_JsonType;
265
+ type JsonTypeFactory = AbstractType_JsonTypeFactory;
290
266
  }
291
267
  //# sourceMappingURL=AbstractType.d.ts.map
@@ -8,26 +8,18 @@ import { Maybe } from "purify-ts";
8
8
  import { Memoize } from "typescript-memoize";
9
9
  import { AbstractType_ConversionFunction } from "./_AbstractType/AbstractType_ConversionFunction.js";
10
10
  import { AbstractType_GraphqlType } from "./_AbstractType/AbstractType_GraphqlType.js";
11
- import { AbstractType_JsonType } from "./_AbstractType/AbstractType_JsonType.js";
12
11
  import { AbstractType_JsType } from "./_AbstractType/AbstractType_JsType.js";
13
- import { rdfjsTermExpression } from "./rdfjsTermExpression.js";
12
+ import { AbstractConstruct } from "./AbstractConstruct.js";
14
13
  import { code, def, joinCode, literalOf, } from "./ts-poet-wrapper.js";
15
14
  import { tsComment } from "./tsComment.js";
16
15
  /**
17
16
  * Abstract base class all types.
18
17
  */
19
- export class AbstractType {
20
- configuration;
21
- logger;
22
- reusables;
18
+ export class AbstractType extends AbstractConstruct {
23
19
  /**
24
- * Comment from rdfs:comment.
20
+ * Factory for AbstractType.JsonType.
25
21
  */
26
- comment;
27
- /**
28
- * Label from rdfs:label.
29
- */
30
- label;
22
+ jsonTypeFactory;
31
23
  /**
32
24
  * Name for this type.
33
25
  */
@@ -36,18 +28,10 @@ export class AbstractType {
36
28
  * Identifier of the shape this type was derived from.
37
29
  */
38
30
  shapeIdentifier;
39
- constructor({ comment, configuration, label, logger, name, reusables, shapeIdentifier, }) {
40
- this.comment = comment;
41
- this.configuration = configuration;
42
- this.label = label;
43
- this.logger = logger;
31
+ constructor({ jsonTypeFactory, name, shapeIdentifier, ...superParameters }) {
32
+ super(superParameters);
33
+ this.jsonTypeFactory = jsonTypeFactory;
44
34
  this.name = name;
45
- this.reusables = reusables;
46
- this.rdfjsTermExpression = rdfjsTermExpression.bind({
47
- imports: this.reusables.imports,
48
- logger: this.logger,
49
- snippets: this.reusables.snippets,
50
- });
51
35
  this.shapeIdentifier = shapeIdentifier;
52
36
  }
53
37
  /**
@@ -76,6 +60,9 @@ ${joinCode(staticModuleDeclarations
76
60
  }
77
61
  return Maybe.of(joinCode(declarations, { on: "\n\n" }));
78
62
  }
63
+ /**
64
+ * Expression of this type. If the type has a name it will be that name (a reference). Otherwise it will be the .inlineExpression.
65
+ */
79
66
  get expression() {
80
67
  return this.name
81
68
  .map((name) => code `${name}`)
@@ -87,10 +74,13 @@ ${joinCode(staticModuleDeclarations
87
74
  get schema() {
88
75
  return this.name
89
76
  .map((name) => code `${name}.schema`)
90
- .orDefaultLazy(() => this.schemaExpression);
77
+ .orDefaultLazy(() => this.schemaExpression());
91
78
  }
92
- get schemaExpression() {
93
- return code `{ ${joinCode(this.schemaInitializers.concat(), { on: ", " })} }`;
79
+ get schemaVariable() {
80
+ if (!this.configuration.features.has("Object.schema")) {
81
+ return Maybe.empty();
82
+ }
83
+ return this.name.map((name) => code `${name}.schema`);
94
84
  }
95
85
  /**
96
86
  * Helper to compose the result of schema along the type hierarchy.
@@ -98,12 +88,16 @@ ${joinCode(staticModuleDeclarations
98
88
  get schemaInitializers() {
99
89
  return [code `kind: ${literalOf(this.kind)} as const`];
100
90
  }
101
- rdfjsTermExpression;
91
+ schemaExpression() {
92
+ return code `{ ${joinCode(this.schemaInitializers.concat(), { on: ", " })} }`;
93
+ }
102
94
  staticModuleDeclarations(_name) {
103
95
  const staticModuleDeclarations = {};
104
96
  if (this.configuration.features.has("Object.schema")) {
105
97
  staticModuleDeclarations["schema"] =
106
- code `export const schema = ${this.schemaExpression}`;
98
+ code `export const schema = ${this.schemaExpression()}`;
99
+ staticModuleDeclarations["Schema"] =
100
+ code `export type Schema = typeof schema;`;
107
101
  }
108
102
  return staticModuleDeclarations;
109
103
  }
@@ -117,6 +111,9 @@ __decorate([
117
111
  __decorate([
118
112
  Memoize()
119
113
  ], AbstractType.prototype, "schema", null);
114
+ __decorate([
115
+ Memoize()
116
+ ], AbstractType.prototype, "schemaVariable", null);
120
117
  __decorate([
121
118
  Memoize()
122
119
  ], AbstractType.prototype, "schemaExpression", null);
@@ -127,6 +124,5 @@ __decorate([
127
124
  })(ConversionFunction = AbstractType.ConversionFunction || (AbstractType.ConversionFunction = {}));
128
125
  AbstractType.GraphqlType = AbstractType_GraphqlType;
129
126
  AbstractType.JsType = AbstractType_JsType;
130
- AbstractType.JsonType = AbstractType_JsonType;
131
127
  })(AbstractType || (AbstractType = {}));
132
128
  //# sourceMappingURL=AbstractType.js.map
@@ -2,7 +2,7 @@ import type { Literal, NamedNode } from "@rdfjs/types";
2
2
  import { Maybe } from "purify-ts";
3
3
  import { AbstractLiteralType } from "./AbstractLiteralType.js";
4
4
  import { AbstractTermType } from "./AbstractTermType.js";
5
- import type { Code } from "./ts-poet-wrapper.js";
5
+ import { type Code } from "./ts-poet-wrapper.js";
6
6
  /**
7
7
  * Abstract base class of all types that are typed literals in RDF. In RDF every literal is either
8
8
  * - a language-tagged string literal (datatype = rdf:langString, language = not empty)
@@ -10,20 +10,21 @@ import type { Code } from "./ts-poet-wrapper.js";
10
10
  */
11
11
  export declare abstract class AbstractTypedLiteralType<ValueT> extends AbstractLiteralType {
12
12
  readonly datatype: NamedNode;
13
+ readonly discriminatedType: Maybe<AbstractTypedLiteralType.DiscriminatedType>;
14
+ readonly jsonObjectType: AbstractTermType<Literal, Literal>["jsonObjectType"];
13
15
  constructor({ datatype, ...superParameters }: {
14
16
  datatype: NamedNode;
15
17
  } & ConstructorParameters<typeof AbstractLiteralType>[0]);
16
- get discriminantProperty(): Maybe<AbstractLiteralType.DiscriminantProperty>;
18
+ protected get schemaInitializers(): readonly Code[];
17
19
  graphqlResolveExpression({ variables, }: Parameters<AbstractLiteralType["graphqlResolveExpression"]>[0]): Code;
18
20
  abstract valueExpression(literal: Literal | ValueT): Code;
19
21
  }
20
22
  export declare namespace AbstractTypedLiteralType {
21
23
  type ConversionFunction = AbstractTermType.ConversionFunction;
22
- type DiscriminantProperty = AbstractTermType.DiscriminantProperty;
24
+ type DiscriminatedType = AbstractTermType.DiscriminatedType;
23
25
  const GraphqlType: typeof import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
24
26
  type GraphqlType = AbstractTermType.GraphqlType;
25
27
  type JsType = AbstractTermType.JsType;
26
- const JsonType: typeof import("./_AbstractType/AbstractType_JsonType.js").AbstractType_JsonType;
27
28
  type JsonType = AbstractTermType.JsonType;
28
29
  }
29
30
  //# sourceMappingURL=AbstractTypedLiteralType.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { Maybe } from "purify-ts";
2
2
  import { AbstractLiteralType } from "./AbstractLiteralType.js";
3
3
  import { AbstractTermType } from "./AbstractTermType.js";
4
+ import { code } from "./ts-poet-wrapper.js";
4
5
  /**
5
6
  * Abstract base class of all types that are typed literals in RDF. In RDF every literal is either
6
7
  * - a language-tagged string literal (datatype = rdf:langString, language = not empty)
@@ -8,12 +9,23 @@ import { AbstractTermType } from "./AbstractTermType.js";
8
9
  */
9
10
  export class AbstractTypedLiteralType extends AbstractLiteralType {
10
11
  datatype;
12
+ discriminatedType = Maybe.empty();
13
+ jsonObjectType = this.jsonTypeFactory.createJsonObjectType({
14
+ "@type": {
15
+ type: this.jsonTypeFactory.createJsonStringType(),
16
+ },
17
+ "@value": {
18
+ type: this.jsonTypeFactory.createJsonStringType(),
19
+ },
20
+ }, {
21
+ snippet: this.reusables.snippets.TypedLiteralJsonObject,
22
+ });
11
23
  constructor({ datatype, ...superParameters }) {
12
24
  super(superParameters);
13
25
  this.datatype = datatype;
14
26
  }
15
- get discriminantProperty() {
16
- return Maybe.empty();
27
+ get schemaInitializers() {
28
+ return super.schemaInitializers.concat(code `datatype: ${this.rdfjsTermExpression(this.datatype)}`);
17
29
  }
18
30
  graphqlResolveExpression({ variables, }) {
19
31
  return variables.value;
@@ -21,6 +33,5 @@ export class AbstractTypedLiteralType extends AbstractLiteralType {
21
33
  }
22
34
  (function (AbstractTypedLiteralType) {
23
35
  AbstractTypedLiteralType.GraphqlType = AbstractTermType.GraphqlType;
24
- AbstractTypedLiteralType.JsonType = AbstractTermType.JsonType;
25
36
  })(AbstractTypedLiteralType || (AbstractTypedLiteralType = {}));
26
37
  //# sourceMappingURL=AbstractTypedLiteralType.js.map
@@ -1,31 +1,33 @@
1
1
  import type { Literal } from "@rdfjs/types";
2
2
  import type { Decimal } from "decimal.js";
3
3
  import { Maybe } from "purify-ts";
4
- import { AbstractLiteralType } from "./AbstractLiteralType.js";
5
4
  import { AbstractTypedLiteralType } from "./AbstractTypedLiteralType.js";
5
+ import { ReferenceCallable } from "./ReferenceCallable.js";
6
6
  import { type Code } from "./ts-poet-wrapper.js";
7
7
  export declare class BigDecimalType extends AbstractTypedLiteralType<Decimal> {
8
8
  protected readonly inlineExpression: Code;
9
+ readonly jsonValueType: AbstractTypedLiteralType.JsonType;
9
10
  readonly jsTypes: readonly [{
10
11
  readonly className: Code;
11
12
  readonly instanceof: "class";
12
13
  readonly typeof: "object";
13
14
  }];
14
- readonly conversionFunction: Maybe<AbstractLiteralType.ConversionFunction>;
15
- readonly filterFunction: Code;
15
+ readonly conversionFunction: Maybe<AbstractTypedLiteralType.ConversionFunction>;
16
+ readonly filterFunction: ReferenceCallable;
16
17
  readonly filterType: Code;
17
- readonly fromRdfResourceValuesFunction: Code;
18
- readonly hashFunction: Code;
18
+ readonly fromJsonValueFunction: ReferenceCallable;
19
+ readonly fromJsonObjectFunction: ReferenceCallable;
20
+ readonly fromRdfResourceValuesFunction: ReferenceCallable;
21
+ readonly graphqlType: import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
22
+ readonly hashFunction: ReferenceCallable;
19
23
  readonly kind = "BigDecimal";
20
24
  readonly schemaType: Code;
21
- readonly valueSparqlWherePatternsFunction: Code;
22
- get graphqlType(): import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
23
- fromJsonExpression({ variables, }: Parameters<AbstractLiteralType["fromJsonExpression"]>[0]): Code;
24
- graphqlResolveExpression({ variables, }: Parameters<AbstractLiteralType["graphqlResolveExpression"]>[0]): Code;
25
- jsonSchema(): Code;
26
- jsonType(): AbstractLiteralType.JsonType;
27
- toJsonExpression({ variables, }: Parameters<AbstractTypedLiteralType<Decimal>["toJsonExpression"]>[0]): Code;
28
- toRdfResourceValuesExpression({ variables, }: Parameters<AbstractLiteralType["toRdfResourceValuesExpression"]>[0]): Code;
25
+ readonly toJsonValueFunction: ReferenceCallable;
26
+ readonly toJsonObjectFunction: ReferenceCallable;
27
+ readonly valueSparqlWherePatternsFunction: ReferenceCallable;
28
+ graphqlResolveExpression({ variables, }: Parameters<AbstractTypedLiteralType<Decimal>["graphqlResolveExpression"]>[0]): Code;
29
+ toLoggableExpression({ variables, }: Parameters<AbstractTypedLiteralType<Decimal>["toLoggableExpression"]>[0]): Code;
30
+ toRdfResourceValuesExpression({ variables, }: Parameters<AbstractTypedLiteralType<Decimal>["toRdfResourceValuesExpression"]>[0]): Code;
29
31
  valueExpression(literal: Literal): Code;
30
32
  }
31
33
  //# sourceMappingURL=BigDecimalType.d.ts.map
@@ -1,16 +1,10 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
1
  import { Maybe } from "purify-ts";
8
- import { Memoize } from "typescript-memoize";
9
- import { AbstractLiteralType } from "./AbstractLiteralType.js";
10
2
  import { AbstractTypedLiteralType } from "./AbstractTypedLiteralType.js";
3
+ import { ReferenceCallable } from "./ReferenceCallable.js";
11
4
  import { code, literalOf } from "./ts-poet-wrapper.js";
12
5
  export class BigDecimalType extends AbstractTypedLiteralType {
13
6
  inlineExpression = code `${this.reusables.imports.BigDecimal}`;
7
+ jsonValueType = this.jsonTypeFactory.createJsonStringType();
14
8
  jsTypes = [
15
9
  {
16
10
  className: code `${this.reusables.imports.BigDecimal}`,
@@ -35,30 +29,23 @@ export class BigDecimalType extends AbstractTypedLiteralType {
35
29
  },
36
30
  ],
37
31
  });
38
- filterFunction = code `${this.reusables.snippets.filterBigDecimal}`;
32
+ filterFunction = new ReferenceCallable(this.reusables.snippets.filterBigDecimal);
39
33
  filterType = code `${this.reusables.snippets.NumericFilter}<${this.reusables.imports.BigDecimal}>`;
40
- fromRdfResourceValuesFunction = code `${this.reusables.snippets.bigDecimalFromRdfResourceValues}`;
41
- hashFunction = code `${this.reusables.snippets.hashBigDecimal}`;
34
+ fromJsonValueFunction = new ReferenceCallable(this.reusables.snippets.bigDecimalFromJsonString);
35
+ fromJsonObjectFunction = new ReferenceCallable(this.reusables.snippets.bigDecimalFromJsonObject);
36
+ fromRdfResourceValuesFunction = new ReferenceCallable(this.reusables.snippets.bigDecimalFromRdfResourceValues);
37
+ graphqlType = new AbstractTypedLiteralType.GraphqlType(code `${this.reusables.imports.GraphQLString}`, this.reusables);
38
+ hashFunction = new ReferenceCallable(this.reusables.snippets.hashBigDecimal);
42
39
  kind = "BigDecimal";
43
40
  schemaType = code `${this.reusables.snippets.NumericSchema}<${this.reusables.imports.BigDecimal}>`;
44
- valueSparqlWherePatternsFunction = code `${this.reusables.snippets.bigDecimalSparqlWherePatterns}`;
45
- get graphqlType() {
46
- return new AbstractLiteralType.GraphqlType(code `${this.reusables.imports.GraphQLString}`, this.reusables);
47
- }
48
- fromJsonExpression({ variables, }) {
49
- return code `${this.reusables.imports.Either}.encase<Error, ${this.expression}>(() => new ${this.expression}(${variables.value}["@value"]))`;
50
- }
41
+ toJsonValueFunction = new ReferenceCallable(this.reusables.snippets.bigDecimalToJsonString);
42
+ toJsonObjectFunction = new ReferenceCallable(code `${this.reusables.snippets.bigDecimalToJsonObject}(${this.rdfjsTermExpression(this.datatype)})`);
43
+ valueSparqlWherePatternsFunction = new ReferenceCallable(this.reusables.snippets.bigDecimalSparqlWherePatterns);
51
44
  graphqlResolveExpression({ variables, }) {
52
45
  return code `${variables.value}.toFixed()`;
53
46
  }
54
- jsonSchema() {
55
- return code `${this.reusables.imports.z}.object({ "@type": ${this.reusables.imports.z}.literal(${literalOf(this.datatype.value)}), "@value": ${this.reusables.imports.z}.string() })`;
56
- }
57
- jsonType() {
58
- return new AbstractLiteralType.JsonType(code `{ readonly "@type": ${literalOf(this.datatype.value)}, readonly "@value": string }`);
59
- }
60
- toJsonExpression({ variables, }) {
61
- return code `{ "@type": ${literalOf(this.datatype.value)} as const, "@value": ${variables.value}.toFixed() }`;
47
+ toLoggableExpression({ variables, }) {
48
+ return code `${variables.value}.toFixed()`;
62
49
  }
63
50
  toRdfResourceValuesExpression({ variables, }) {
64
51
  return code `[${this.reusables.snippets.bigDecimalLiteral}(${variables.value})]`;
@@ -67,7 +54,4 @@ export class BigDecimalType extends AbstractTypedLiteralType {
67
54
  return code `new ${this.reusables.imports.BigDecimal}(${literalOf(literal.value)})`;
68
55
  }
69
56
  }
70
- __decorate([
71
- Memoize()
72
- ], BigDecimalType.prototype, "graphqlType", null);
73
57
  //# sourceMappingURL=BigDecimalType.js.map
@@ -1,20 +1,22 @@
1
1
  import type { Literal } from "@rdfjs/types";
2
2
  import { Maybe } from "purify-ts";
3
3
  import { AbstractNumericType } from "./AbstractNumericType.js";
4
+ import type { Callable } from "./Callable.js";
4
5
  import { type Code } from "./ts-poet-wrapper.js";
5
6
  export declare class BigIntType extends AbstractNumericType<bigint> {
7
+ protected readonly decodedIn: bigint[];
6
8
  readonly jsTypes: {
7
9
  readonly typeof: "bigint";
8
10
  }[];
11
+ readonly conversionFunction: Maybe<AbstractNumericType.ConversionFunction>;
12
+ readonly graphqlType: import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
13
+ readonly jsonValueType: AbstractNumericType.JsonType;
9
14
  readonly kind = "BigInt";
10
- get conversionFunction(): Maybe<AbstractNumericType.ConversionFunction>;
11
- get fromRdfResourceValuesFunction(): Code;
12
- get graphqlType(): import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
13
- private get decodedIn();
14
- fromJsonExpression({ variables, }: Parameters<AbstractNumericType<bigint>["fromJsonExpression"]>[0]): Code;
15
- jsonSchema(_parameters: Parameters<AbstractNumericType<bigint>["jsonSchema"]>[0]): Code;
16
- jsonType(): AbstractNumericType.JsonType;
17
- toJsonExpression({ variables, }: Parameters<AbstractNumericType<bigint>["toJsonExpression"]>[0]): Code;
15
+ get fromJsonObjectFunction(): Callable;
16
+ get fromJsonValueFunction(): Callable;
17
+ get fromRdfResourceValuesFunction(): Callable;
18
+ get toJsonObjectFunction(): Callable;
19
+ get toJsonValueFunction(): Callable;
18
20
  valueExpression(literal: bigint | Literal): Code;
19
21
  }
20
22
  //# sourceMappingURL=BigIntType.d.ts.map