@shaclmate/compiler 4.0.50 → 4.0.52
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.
- package/dist/Compiler.d.ts +14 -0
- package/dist/Compiler.js +18 -0
- package/dist/Eithers.d.ts +14 -0
- package/dist/Eithers.js +67 -0
- package/dist/ShapesGraphToAstTransformer.d.ts +18 -0
- package/dist/ShapesGraphToAstTransformer.js +50 -0
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.d.ts +15 -0
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.js +51 -0
- package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.d.ts +3 -0
- package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.js +5 -0
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.d.ts +4 -0
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +24 -0
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.d.ts +9 -0
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +150 -0
- package/dist/_ShapesGraphToAstTransformer/shapeOntology.d.ts +5 -0
- package/dist/_ShapesGraphToAstTransformer/shapeOntology.js +26 -0
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.d.ts +17 -0
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.js +285 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.d.ts +10 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +92 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +11 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +149 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.d.ts +7 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.js +171 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.d.ts +12 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +110 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +11 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +46 -0
- package/dist/ast/AbstractCollectionType.d.ts +30 -0
- package/dist/ast/AbstractCollectionType.js +33 -0
- package/dist/ast/AbstractCompoundType.d.ts +45 -0
- package/dist/ast/AbstractCompoundType.js +81 -0
- package/dist/ast/AbstractContainerType.d.ts +44 -0
- package/dist/ast/AbstractContainerType.js +63 -0
- package/dist/ast/AbstractLazyType.d.ts +117 -0
- package/dist/ast/AbstractLazyType.js +40 -0
- package/dist/ast/AbstractTermType.d.ts +33 -0
- package/dist/ast/AbstractTermType.js +47 -0
- package/dist/ast/AbstractType.d.ts +55 -0
- package/dist/ast/AbstractType.js +55 -0
- package/dist/ast/Ast.d.ts +6 -0
- package/dist/ast/Ast.js +2 -0
- package/dist/ast/BlankNodeType.d.ts +11 -0
- package/dist/ast/BlankNodeType.js +17 -0
- package/dist/ast/DefaultValueType.d.ts +35 -0
- package/dist/ast/DefaultValueType.js +50 -0
- package/dist/ast/IdentifierType.d.ts +12 -0
- package/dist/ast/IdentifierType.js +20 -0
- package/dist/ast/IntersectionType.d.ts +14 -0
- package/dist/ast/IntersectionType.js +17 -0
- package/dist/ast/IriType.d.ts +10 -0
- package/dist/ast/IriType.js +10 -0
- package/dist/ast/LazyOptionType.d.ts +6 -0
- package/dist/ast/LazyOptionType.js +5 -0
- package/dist/ast/LazySetType.d.ts +6 -0
- package/dist/ast/LazySetType.js +5 -0
- package/dist/ast/LazyType.d.ts +5 -0
- package/dist/ast/LazyType.js +5 -0
- package/dist/ast/ListType.d.ts +44 -0
- package/dist/ast/ListType.js +56 -0
- package/dist/ast/LiteralType.d.ts +40 -0
- package/dist/ast/LiteralType.js +59 -0
- package/dist/ast/OptionType.d.ts +13 -0
- package/dist/ast/OptionType.js +21 -0
- package/dist/ast/SetType.d.ts +31 -0
- package/dist/ast/SetType.js +42 -0
- package/dist/ast/StructCompoundType.d.ts +12 -0
- package/dist/ast/StructCompoundType.js +87 -0
- package/dist/ast/StructIntersectionType.d.ts +4 -0
- package/dist/ast/StructIntersectionType.js +2 -0
- package/dist/ast/StructType.d.ts +178 -0
- package/dist/ast/StructType.js +314 -0
- package/dist/ast/StructUnionType.d.ts +4 -0
- package/dist/ast/StructUnionType.js +2 -0
- package/dist/ast/TermType.d.ts +14 -0
- package/dist/ast/TermType.js +16 -0
- package/dist/ast/Type.d.ts +20 -0
- package/dist/ast/Type.js +42 -0
- package/dist/ast/UnionType.d.ts +30 -0
- package/dist/ast/UnionType.js +27 -0
- package/dist/ast/equals.d.ts +12 -0
- package/dist/ast/equals.js +65 -0
- package/dist/ast/index.d.ts +21 -0
- package/dist/ast/index.js +21 -0
- package/dist/generators/AstJsonGenerator.d.ts +6 -0
- package/dist/generators/AstJsonGenerator.js +15 -0
- package/dist/generators/Cx2Generator.d.ts +10 -0
- package/dist/generators/Cx2Generator.js +140 -0
- package/dist/generators/Generator.d.ts +5 -0
- package/dist/generators/Generator.js +2 -0
- package/dist/generators/LabeledPropertyGraph.d.ts +42 -0
- package/dist/generators/LabeledPropertyGraph.js +2 -0
- package/dist/generators/index.d.ts +6 -0
- package/dist/generators/index.js +6 -0
- package/dist/generators/transformAstToLabeledPropertyGraph.d.ts +4 -0
- package/dist/generators/transformAstToLabeledPropertyGraph.js +78 -0
- package/dist/generators/ts/AbstractCollectionType.d.ts +37 -0
- package/dist/generators/ts/AbstractCollectionType.js +88 -0
- package/dist/generators/ts/AbstractContainerType.d.ts +53 -0
- package/dist/generators/ts/AbstractContainerType.js +97 -0
- package/dist/generators/ts/AbstractDateType.d.ts +23 -0
- package/dist/generators/ts/AbstractDateType.js +37 -0
- package/dist/generators/ts/AbstractIdentifierType.d.ts +21 -0
- package/dist/generators/ts/AbstractIdentifierType.js +25 -0
- package/dist/generators/ts/AbstractLazyType.d.ts +67 -0
- package/dist/generators/ts/AbstractLazyType.js +154 -0
- package/dist/generators/ts/AbstractLiteralType.d.ts +26 -0
- package/dist/generators/ts/AbstractLiteralType.js +15 -0
- package/dist/generators/ts/AbstractNumericType.d.ts +21 -0
- package/dist/generators/ts/AbstractNumericType.js +65 -0
- package/dist/generators/ts/AbstractObjectSetType.d.ts +36 -0
- package/dist/generators/ts/AbstractObjectSetType.js +44 -0
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +32 -0
- package/dist/generators/ts/AbstractPrimitiveType.js +51 -0
- package/dist/generators/ts/AbstractTermType.d.ts +50 -0
- package/dist/generators/ts/AbstractTermType.js +102 -0
- package/dist/generators/ts/AbstractType.d.ts +345 -0
- package/dist/generators/ts/AbstractType.js +135 -0
- package/dist/generators/ts/BigDecimalType.d.ts +28 -0
- package/dist/generators/ts/BigDecimalType.js +58 -0
- package/dist/generators/ts/BigIntType.d.ts +17 -0
- package/dist/generators/ts/BigIntType.js +56 -0
- package/dist/generators/ts/BlankNodeType.d.ts +22 -0
- package/dist/generators/ts/BlankNodeType.js +67 -0
- package/dist/generators/ts/BooleanType.d.ts +21 -0
- package/dist/generators/ts/BooleanType.js +53 -0
- package/dist/generators/ts/DateTimeType.d.ts +13 -0
- package/dist/generators/ts/DateTimeType.js +31 -0
- package/dist/generators/ts/DateType.d.ts +14 -0
- package/dist/generators/ts/DateType.js +32 -0
- package/dist/generators/ts/DefaultValueType.d.ts +83 -0
- package/dist/generators/ts/DefaultValueType.js +143 -0
- package/dist/generators/ts/FloatType.d.ts +13 -0
- package/dist/generators/ts/FloatType.js +30 -0
- package/dist/generators/ts/GraphqlSchema.d.ts +22 -0
- package/dist/generators/ts/GraphqlSchema.js +87 -0
- package/dist/generators/ts/IdentifierType.d.ts +23 -0
- package/dist/generators/ts/IdentifierType.js +83 -0
- package/dist/generators/ts/Imports.d.ts +40 -0
- package/dist/generators/ts/Imports.js +41 -0
- package/dist/generators/ts/IntType.d.ts +13 -0
- package/dist/generators/ts/IntType.js +30 -0
- package/dist/generators/ts/IriType.d.ts +23 -0
- package/dist/generators/ts/IriType.js +112 -0
- package/dist/generators/ts/LazyOptionType.d.ts +36 -0
- package/dist/generators/ts/LazyOptionType.js +75 -0
- package/dist/generators/ts/LazySetType.d.ts +20 -0
- package/dist/generators/ts/LazySetType.js +76 -0
- package/dist/generators/ts/LazyType.d.ts +19 -0
- package/dist/generators/ts/LazyType.js +65 -0
- package/dist/generators/ts/ListType.d.ts +49 -0
- package/dist/generators/ts/ListType.js +161 -0
- package/dist/generators/ts/LiteralType.d.ts +27 -0
- package/dist/generators/ts/LiteralType.js +71 -0
- package/dist/generators/ts/ObjectSetType.d.ts +6 -0
- package/dist/generators/ts/ObjectSetType.js +36 -0
- package/dist/generators/ts/ObjectType.d.ts +105 -0
- package/dist/generators/ts/ObjectType.js +503 -0
- package/dist/generators/ts/ObjectUnionType.d.ts +20 -0
- package/dist/generators/ts/ObjectUnionType.js +223 -0
- package/dist/generators/ts/OptionType.d.ts +39 -0
- package/dist/generators/ts/OptionType.js +157 -0
- package/dist/generators/ts/RdfjsDatasetObjectSetType.d.ts +6 -0
- package/dist/generators/ts/RdfjsDatasetObjectSetType.js +323 -0
- package/dist/generators/ts/Reusables.d.ts +13 -0
- package/dist/generators/ts/Reusables.js +15 -0
- package/dist/generators/ts/SetType.d.ts +32 -0
- package/dist/generators/ts/SetType.js +132 -0
- package/dist/generators/ts/Snippet.d.ts +3 -0
- package/dist/generators/ts/Snippet.js +2 -0
- package/dist/generators/ts/SnippetFactory.d.ts +16 -0
- package/dist/generators/ts/SnippetFactory.js +2 -0
- package/dist/generators/ts/Snippets.d.ts +180 -0
- package/dist/generators/ts/Snippets.js +1184 -0
- package/dist/generators/ts/SparqlObjectSetType.d.ts +6 -0
- package/dist/generators/ts/SparqlObjectSetType.js +241 -0
- package/dist/generators/ts/StringType.d.ts +22 -0
- package/dist/generators/ts/StringType.js +68 -0
- package/dist/generators/ts/TermType.d.ts +31 -0
- package/dist/generators/ts/TermType.js +143 -0
- package/dist/generators/ts/TsFeature.d.ts +3 -0
- package/dist/generators/ts/TsFeature.js +28 -0
- package/dist/generators/ts/TsGenerator.d.ts +30 -0
- package/dist/generators/ts/TsGenerator.js +292 -0
- package/dist/generators/ts/Type.d.ts +25 -0
- package/dist/generators/ts/Type.js +2 -0
- package/dist/generators/ts/TypeFactory.d.ts +43 -0
- package/dist/generators/ts/TypeFactory.js +540 -0
- package/dist/generators/ts/Typeof.d.ts +2 -0
- package/dist/generators/ts/Typeof.js +2 -0
- package/dist/generators/ts/UnionType.d.ts +126 -0
- package/dist/generators/ts/UnionType.js +850 -0
- package/dist/generators/ts/ZodGenerator.d.ts +11 -0
- package/dist/generators/ts/ZodGenerator.js +60 -0
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +217 -0
- package/dist/generators/ts/_ObjectType/AbstractProperty.js +37 -0
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.d.ts +45 -0
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.js +104 -0
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +43 -0
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +205 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.js +28 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.js +19 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeExpression.js +20 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionExpression.js +46 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionExpression.js +79 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.js +38 -0
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeExpression.js +26 -0
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.js +30 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.js +13 -0
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +20 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.js +10 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.js +22 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.js +17 -0
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.d.ts +11 -0
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.js +23 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +21 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +10 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +35 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +10 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +8 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.js +14 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.js +33 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.js +7 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js +8 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js +10 -0
- package/dist/generators/ts/_ObjectType/Property.d.ts +6 -0
- package/dist/generators/ts/_ObjectType/Property.js +2 -0
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +53 -0
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +284 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.js +5 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.js +6 -0
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.js +6 -0
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.js +7 -0
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_ConversionFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ConversionFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_DateFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_DateFilter.js +10 -0
- package/dist/generators/ts/_snippets/snippets_DateSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_EqualsFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_EqualsFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_EqualsResult.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_EqualsResult.js +63 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +10 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +11 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +16 -0
- package/dist/generators/ts/_snippets/snippets_HashFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_HashFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_Hasher.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_Hasher.js +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.js +7 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +7 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.js +27 -0
- package/dist/generators/ts/_snippets/snippets_IriFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IriFilter.js +6 -0
- package/dist/generators/ts/_snippets/snippets_IriSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IriSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.js +22 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.js +25 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.js +40 -0
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.js +4 -0
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +9 -0
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.js +4 -0
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.js +7 -0
- package/dist/generators/ts/_snippets/snippets_NumericFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_NumericFilter.js +10 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +6 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +46 -0
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +40 -0
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.js +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.js +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.js +30 -0
- package/dist/generators/ts/_snippets/snippets_StringFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_StringFilter.js +8 -0
- package/dist/generators/ts/_snippets/snippets_StringSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +9 -0
- package/dist/generators/ts/_snippets/snippets_TermFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_TermFilter.js +9 -0
- package/dist/generators/ts/_snippets/snippets_TermSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_TermSchema.js +9 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +11 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +16 -0
- package/dist/generators/ts/_snippets/snippets_UnwrapR.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_UnwrapR.js +4 -0
- package/dist/generators/ts/_snippets/snippets_ValidationFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ValidationFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +11 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.js +12 -0
- package/dist/generators/ts/_snippets/snippets_arrayEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_arrayEquals.js +68 -0
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.js +29 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.js +9 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +83 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +5 -0
- package/dist/generators/ts/_snippets/snippets_booleanEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanEquals.js +16 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +15 -0
- package/dist/generators/ts/_snippets/snippets_compactRecord.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_compactRecord.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.js +8 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNode.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNode.js +11 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNodeIdentifierProperty.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNodeIdentifierProperty.js +17 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifier.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifier.js +13 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifierProperty.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifierProperty.js +21 -0
- package/dist/generators/ts/_snippets/snippets_convertToIri.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIri.js +11 -0
- package/dist/generators/ts/_snippets/snippets_convertToIriIdentifierProperty.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIriIdentifierProperty.js +17 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.js +33 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.js +27 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.js +7 -0
- package/dist/generators/ts/_snippets/snippets_convertToLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLiteral.js +13 -0
- package/dist/generators/ts/_snippets/snippets_convertToMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToMaybe.js +19 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertWithDefaultValue.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertWithDefaultValue.js +11 -0
- package/dist/generators/ts/_snippets/snippets_dateEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateEquals.js +13 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +71 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.js +9 -0
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.js +19 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.js +10 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +9 -0
- package/dist/generators/ts/_snippets/snippets_ensureRdfResourceType.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ensureRdfResourceType.js +16 -0
- package/dist/generators/ts/_snippets/snippets_filterArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterArray.js +22 -0
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.js +26 -0
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.js +6 -0
- package/dist/generators/ts/_snippets/snippets_filterBoolean.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterBoolean.js +10 -0
- package/dist/generators/ts/_snippets/snippets_filterDate.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterDate.js +26 -0
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.js +14 -0
- package/dist/generators/ts/_snippets/snippets_filterIri.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterIri.js +10 -0
- package/dist/generators/ts/_snippets/snippets_filterLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterLiteral.js +6 -0
- package/dist/generators/ts/_snippets/snippets_filterMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterMaybe.js +22 -0
- package/dist/generators/ts/_snippets/snippets_filterNumeric.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterNumeric.js +26 -0
- package/dist/generators/ts/_snippets/snippets_filterString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterString.js +18 -0
- package/dist/generators/ts/_snippets/snippets_filterTerm.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +22 -0
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_hashArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashArray.js +11 -0
- package/dist/generators/ts/_snippets/snippets_hashBigDecimal.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashBigDecimal.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashBoolean.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashBoolean.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashDate.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashDate.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashDateTime.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashDateTime.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashMaybe.js +11 -0
- package/dist/generators/ts/_snippets/snippets_hashNumeric.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashNumeric.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashString.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashTerm.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashTerm.js +12 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +30 -0
- package/dist/generators/ts/_snippets/snippets_identityConversionFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identityConversionFunction.js +6 -0
- package/dist/generators/ts/_snippets/snippets_identityValidationFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identityValidationFunction.js +6 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +13 -0
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.js +15 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.js +15 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +37 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +116 -0
- package/dist/generators/ts/_snippets/snippets_literalFactory.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFactory.js +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.js +39 -0
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +5 -0
- package/dist/generators/ts/_snippets/snippets_maybeEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeEquals.js +31 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.js +11 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +6 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +21 -0
- package/dist/generators/ts/_snippets/snippets_monkeyPatchObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_monkeyPatchObject.js +16 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.js +92 -0
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +62 -0
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.js +9 -0
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.js +4 -0
- package/dist/generators/ts/_snippets/snippets_parseIri.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_parseIri.js +9 -0
- package/dist/generators/ts/_snippets/snippets_propertyEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_propertyEquals.js +11 -0
- package/dist/generators/ts/_snippets/snippets_rdfResourceIdentifierValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_rdfResourceIdentifierValues.js +12 -0
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.js +18 -0
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.js +9 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +6 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +17 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.js +17 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +90 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +86 -0
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.js +24 -0
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.js +29 -0
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +59 -0
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.js +23 -0
- package/dist/generators/ts/_snippets/snippets_strictEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_strictEquals.js +12 -0
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +39 -0
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.js +93 -0
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.js +17 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.js +60 -0
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.js +24 -0
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +5 -0
- package/dist/generators/ts/_snippets/snippets_toIsoDateString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_toIsoDateString.js +6 -0
- package/dist/generators/ts/_snippets/snippets_validateArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_validateArray.js +13 -0
- package/dist/generators/ts/_snippets/snippets_validateMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_validateMaybe.js +7 -0
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.js +9 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.js +14 -0
- package/dist/generators/ts/codeEquals.d.ts +3 -0
- package/dist/generators/ts/codeEquals.js +7 -0
- package/dist/generators/ts/rdfjsTermExpression.d.ts +11 -0
- package/dist/generators/ts/rdfjsTermExpression.js +72 -0
- package/dist/generators/ts/singleEntryRecord.d.ts +2 -0
- package/dist/generators/ts/singleEntryRecord.js +6 -0
- package/dist/generators/ts/ts-poet-wrapper.d.ts +5 -0
- package/dist/generators/ts/ts-poet-wrapper.js +13 -0
- package/dist/generators/ts/tsComment.d.ts +5 -0
- package/dist/generators/ts/tsComment.js +11 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/input/ShapesGraph.d.ts +44 -0
- package/dist/input/ShapesGraph.js +66 -0
- package/dist/input/index.d.ts +3 -0
- package/dist/input/index.js +3 -0
- package/dist/input/input.shaclmate.d.ts +4567 -0
- package/dist/input/input.shaclmate.js +3595 -0
- package/package.json +600 -600
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AbstractObjectSetType } from "./AbstractObjectSetType.js";
|
|
2
|
+
import { type Code } from "./ts-poet-wrapper.js";
|
|
3
|
+
export declare class SparqlObjectSetType extends AbstractObjectSetType {
|
|
4
|
+
get declaration(): Code;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=SparqlObjectSetType.d.ts.map
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Memoize } from "typescript-memoize";
|
|
8
|
+
import { AbstractObjectSetType } from "./AbstractObjectSetType.js";
|
|
9
|
+
import { code, joinCode } from "./ts-poet-wrapper.js";
|
|
10
|
+
export class SparqlObjectSetType extends AbstractObjectSetType {
|
|
11
|
+
get declaration() {
|
|
12
|
+
const syntheticNamePrefix = this.configuration.syntheticNamePrefix;
|
|
13
|
+
const parameters = {
|
|
14
|
+
constructObjectType: code `namedObjectType: {\
|
|
15
|
+
focusSparqlWherePatterns: ${this.reusables.snippets.FocusSparqlWherePatternsFunction}<ObjectFilterT>;
|
|
16
|
+
fromRdfResource: ${this.reusables.snippets.FromRdfResourceFunction}<ObjectT>;
|
|
17
|
+
sparqlConstructQueryString: (parameters: { filter?: ObjectFilterT; subject: ${this.reusables.imports.NamedNode} | ${this.reusables.imports.Variable}; } & Omit<${this.reusables.imports.sparqljs}.ConstructQuery, "prefixes" | "queryType" | "type"> & ${this.reusables.imports.sparqljs}.GeneratorOptions) => string;
|
|
18
|
+
}`,
|
|
19
|
+
query: code `query?: ${syntheticNamePrefix}SparqlObjectSet.Query<ObjectFilterT, ObjectIdentifierT>`,
|
|
20
|
+
selectObjectTypeType: code `namedObjectType: { focusSparqlWherePatterns: ${this.reusables.snippets.FocusSparqlWherePatternsFunction}<ObjectFilterT> }`,
|
|
21
|
+
};
|
|
22
|
+
const sparqlClientType = code `{ queryBindings: (query: string) => Promise<readonly Record<string, ${this.reusables.imports.BlankNode} | ${this.reusables.imports.Literal} | ${this.reusables.imports.NamedNode}>[]>; queryQuads: (query: string) => Promise<readonly ${this.reusables.imports.Quad}[]>; }`;
|
|
23
|
+
const typeParameters = {
|
|
24
|
+
ObjectT: code `ObjectT extends { readonly $identifier: () => ObjectIdentifierT }`,
|
|
25
|
+
ObjectFilterT: code `ObjectFilterT`,
|
|
26
|
+
ObjectIdentifierT: code `ObjectIdentifierT extends ${this.reusables.imports.BlankNode} | ${this.reusables.imports.NamedNode}`,
|
|
27
|
+
};
|
|
28
|
+
return code `\
|
|
29
|
+
export class ${syntheticNamePrefix}SparqlObjectSet implements ${syntheticNamePrefix}ObjectSet {
|
|
30
|
+
readonly #countVariable = ${this.reusables.imports.dataFactory}.variable!("count");;
|
|
31
|
+
readonly #graph?: Exclude<${this.reusables.imports.Quad_Graph}, ${this.reusables.imports.Variable}>;
|
|
32
|
+
readonly #objectVariable = ${this.reusables.imports.dataFactory}.variable!("object");
|
|
33
|
+
readonly #sparqlClient: ${sparqlClientType};
|
|
34
|
+
readonly #sparqlGenerator = new ${this.reusables.imports.sparqljs}.Generator();
|
|
35
|
+
|
|
36
|
+
constructor(sparqlClient: ${sparqlClientType}, options?: { graph?: Exclude<${this.reusables.imports.Quad_Graph}, ${this.reusables.imports.Variable}> }) {
|
|
37
|
+
this.#graph = options?.graph;
|
|
38
|
+
this.#sparqlClient = sparqlClient;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
${joinCode([...this.namedObjectTypes, ...this.namedObjectUnionTypes].flatMap((namedObjectType) => {
|
|
42
|
+
const methodSignatures = this.methodSignatures(namedObjectType, {
|
|
43
|
+
queryT: `${syntheticNamePrefix}SparqlObjectSet.Query`,
|
|
44
|
+
});
|
|
45
|
+
const runtimeObjectType = namedObjectType.expression;
|
|
46
|
+
return [
|
|
47
|
+
code `\
|
|
48
|
+
async ${methodSignatures.object.name}(${methodSignatures.object.parameters}): ${methodSignatures.object.returnType} {
|
|
49
|
+
return (await this.${methodSignatures.objects.name}({ identifiers: [identifier], preferredLanguages: options?.preferredLanguages })).map(objects => objects[0]);
|
|
50
|
+
}`,
|
|
51
|
+
code `\
|
|
52
|
+
async ${methodSignatures.objectCount.name}(${methodSignatures.objectCount.parameters}): ${methodSignatures.objectCount.returnType} {
|
|
53
|
+
return this.#objectCount<${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>(${runtimeObjectType}, query);
|
|
54
|
+
}`,
|
|
55
|
+
code `\
|
|
56
|
+
async ${methodSignatures.objectIdentifiers.name}(${methodSignatures.objectIdentifiers.parameters}): ${methodSignatures.objectIdentifiers.returnType} {
|
|
57
|
+
return this.#objectIdentifiers<${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>(${runtimeObjectType}, query);
|
|
58
|
+
}`,
|
|
59
|
+
code `\
|
|
60
|
+
async ${methodSignatures.objects.name}(${methodSignatures.objects.parameters}): ${methodSignatures.objects.returnType} {
|
|
61
|
+
return this.#objects<${namedObjectType.expression}, ${namedObjectType.filterType}, ${namedObjectType.identifierTypeAlias}>(${runtimeObjectType}, query);
|
|
62
|
+
}`,
|
|
63
|
+
];
|
|
64
|
+
}), { on: "\n\n" })}
|
|
65
|
+
|
|
66
|
+
#mapBindingsToCount(bindings: readonly Record<string, ${this.reusables.imports.BlankNode} | ${this.reusables.imports.Literal} | ${this.reusables.imports.NamedNode}>[], variable: string): ${this.reusables.imports.Either}<Error, number> {
|
|
67
|
+
if (bindings.length === 0) {
|
|
68
|
+
return ${this.reusables.imports.Left}(new Error("empty result rows"));
|
|
69
|
+
}
|
|
70
|
+
if (bindings.length > 1) {
|
|
71
|
+
return ${this.reusables.imports.Left}(new Error("more than one result row"));
|
|
72
|
+
}
|
|
73
|
+
const count = bindings[0][variable];
|
|
74
|
+
if (count === undefined) {
|
|
75
|
+
return ${this.reusables.imports.Left}(new Error("no 'count' variable in result row"));
|
|
76
|
+
}
|
|
77
|
+
if (count.termType !== "Literal") {
|
|
78
|
+
return ${this.reusables.imports.Left}(new Error("'count' variable is not a Literal"));
|
|
79
|
+
}
|
|
80
|
+
const parsedCount = Number.parseInt(count.value, 10);
|
|
81
|
+
if (Number.isNaN(parsedCount)) {
|
|
82
|
+
return ${this.reusables.imports.Left}(new Error("'count' variable is NaN"));
|
|
83
|
+
}
|
|
84
|
+
return ${this.reusables.imports.Right}(parsedCount);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
#mapBindingsToIdentifiers(bindings: readonly Record<string, ${this.reusables.imports.BlankNode} | ${this.reusables.imports.Literal} | ${this.reusables.imports.NamedNode}>[], variable: string): readonly ${this.reusables.imports.NamedNode}[] {
|
|
88
|
+
const identifiers: ${this.reusables.imports.NamedNode}[] = [];
|
|
89
|
+
for (const bindings_ of bindings) {
|
|
90
|
+
const identifier = bindings_[variable];
|
|
91
|
+
if (
|
|
92
|
+
identifier !== undefined &&
|
|
93
|
+
identifier.termType === "NamedNode"
|
|
94
|
+
) {
|
|
95
|
+
identifiers.push(identifier);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return identifiers;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async #objectIdentifiers<${typeParameters.ObjectFilterT}, ${typeParameters.ObjectIdentifierT}>(${parameters.selectObjectTypeType}, ${parameters.query}): Promise<${this.reusables.imports.Either}<Error, readonly ObjectIdentifierT[]>> {
|
|
102
|
+
if (query?.identifiers) {
|
|
103
|
+
return ${this.reusables.imports.Right}(query.identifiers);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
107
|
+
if (limit <= 0) {
|
|
108
|
+
return ${this.reusables.imports.Right}([]);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
let offset = query?.offset ?? 0;
|
|
112
|
+
if (offset < 0) {
|
|
113
|
+
offset = 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const wherePatterns = this.#wherePatterns(namedObjectType, query);
|
|
117
|
+
if (wherePatterns.length === 0) {
|
|
118
|
+
return ${this.reusables.imports.Left}(new Error("no SPARQL WHERE patterns for identifiers"));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const selectQueryString = \
|
|
122
|
+
this.#sparqlGenerator.stringify({
|
|
123
|
+
distinct: true,
|
|
124
|
+
limit: limit < Number.MAX_SAFE_INTEGER ? limit : undefined,
|
|
125
|
+
offset,
|
|
126
|
+
order: query?.order ? query.order(this.#objectVariable).concat() : [{ expression: this.#objectVariable }],
|
|
127
|
+
prefixes: {},
|
|
128
|
+
queryType: "SELECT",
|
|
129
|
+
type: "query",
|
|
130
|
+
variables: [this.#objectVariable],
|
|
131
|
+
where: wherePatterns.concat()
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
return ${this.reusables.imports.EitherAsync}(async () =>
|
|
135
|
+
this.#mapBindingsToIdentifiers(
|
|
136
|
+
await this.#sparqlClient.queryBindings(selectQueryString),
|
|
137
|
+
this.#objectVariable.value,
|
|
138
|
+
) as readonly ObjectIdentifierT[],
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async #objects<${typeParameters.ObjectT}, ${typeParameters.ObjectFilterT}, ${typeParameters.ObjectIdentifierT}>(${parameters.constructObjectType}, ${parameters.query}): Promise<${this.reusables.imports.Either}<Error, readonly ObjectT[]>> {
|
|
143
|
+
return ${this.reusables.imports.EitherAsync}(async ({ liftEither }) => {
|
|
144
|
+
const identifiers = await liftEither(await this.#objectIdentifiers<ObjectFilterT, ObjectIdentifierT>(namedObjectType, query));
|
|
145
|
+
if (identifiers.length === 0) {
|
|
146
|
+
return [];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const constructQueryString = namedObjectType.sparqlConstructQueryString({
|
|
150
|
+
subject: this.#objectVariable,
|
|
151
|
+
where: [{
|
|
152
|
+
type: "values" as const,
|
|
153
|
+
values: identifiers.map((identifier) => {
|
|
154
|
+
const valuePatternRow: ${this.reusables.imports.sparqljs}.ValuePatternRow = {};
|
|
155
|
+
valuePatternRow["?object"] = identifier as ${this.reusables.imports.NamedNode};
|
|
156
|
+
return valuePatternRow;
|
|
157
|
+
}),
|
|
158
|
+
}]
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const quads = await this.#sparqlClient.queryQuads(constructQueryString);
|
|
162
|
+
|
|
163
|
+
const dataset = ${this.reusables.imports.datasetFactory}.dataset(quads.concat());
|
|
164
|
+
const objects: ObjectT[] = [];
|
|
165
|
+
for (const identifier of identifiers) {
|
|
166
|
+
objects.push(await liftEither(namedObjectType.fromRdfResource(new ${this.reusables.imports.Resource}({ dataFactory: ${this.reusables.imports.dataFactory}, dataset: dataset, identifier: identifier as ${this.reusables.imports.NamedNode} }), { objectSet: this, preferredLanguages: query?.preferredLanguages })));
|
|
167
|
+
}
|
|
168
|
+
return objects;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async #objectCount<${typeParameters.ObjectFilterT}, ${typeParameters.ObjectIdentifierT}>(${parameters.selectObjectTypeType}, ${parameters.query}): Promise<${this.reusables.imports.Either}<Error, number>> {
|
|
173
|
+
const wherePatterns = this.#wherePatterns(namedObjectType, query);
|
|
174
|
+
if (wherePatterns.length === 0) {
|
|
175
|
+
return ${this.reusables.imports.Left}(new Error("no SPARQL WHERE patterns for count"));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const selectQueryString = \
|
|
179
|
+
this.#sparqlGenerator.stringify({
|
|
180
|
+
prefixes: {},
|
|
181
|
+
queryType: "SELECT",
|
|
182
|
+
type: "query",
|
|
183
|
+
variables: [
|
|
184
|
+
{
|
|
185
|
+
expression: {
|
|
186
|
+
aggregation: "COUNT",
|
|
187
|
+
distinct: true,
|
|
188
|
+
expression: this.#objectVariable,
|
|
189
|
+
type: "aggregate",
|
|
190
|
+
},
|
|
191
|
+
variable: this.#countVariable,
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
where: wherePatterns.concat()
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
return ${this.reusables.imports.EitherAsync}(async ({ liftEither }) =>
|
|
198
|
+
liftEither(
|
|
199
|
+
this.#mapBindingsToCount(
|
|
200
|
+
await this.#sparqlClient.queryBindings(selectQueryString),
|
|
201
|
+
this.#countVariable.value,
|
|
202
|
+
),
|
|
203
|
+
),
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
#wherePatterns<${typeParameters.ObjectFilterT}, ${typeParameters.ObjectIdentifierT}>(${parameters.selectObjectTypeType}, ${parameters.query}): readonly ${this.reusables.imports.sparqljs}.Pattern[] {
|
|
208
|
+
// Patterns should be most to least specific.
|
|
209
|
+
let patterns: ${this.reusables.imports.sparqljs}.Pattern[] = [];
|
|
210
|
+
|
|
211
|
+
if (query?.where) {
|
|
212
|
+
patterns = patterns.concat(query.where(this.#objectVariable));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
patterns = patterns.concat(namedObjectType.focusSparqlWherePatterns({ filter: query?.filter, focusIdentifier: this.#objectVariable, ignoreRdfType: false, preferredLanguages: query?.preferredLanguages, variablePrefix: this.#objectVariable.value }));
|
|
216
|
+
|
|
217
|
+
patterns = ${this.reusables.snippets.normalizeSparqlWherePatterns}(patterns).concat();
|
|
218
|
+
|
|
219
|
+
const graph = query?.graph ?? this.#graph;
|
|
220
|
+
if (graph) {
|
|
221
|
+
switch (graph.termType) {
|
|
222
|
+
case "DefaultGraph":
|
|
223
|
+
return patterns; // Patterns without a GRAPH pattern around them query the default graph
|
|
224
|
+
case "NamedNode":
|
|
225
|
+
return [{ name: graph, patterns, type: "graph" }];
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// Union of all graphs: { ... patterns covering default graph ... } UNION { GRAPH ?g { ... patterns covering named graphs ... } }
|
|
229
|
+
return [{ patterns: [{ patterns, type: "group" }, { name: ${this.reusables.imports.dataFactory}.variable!("g"), patterns, type: "graph" }], type: "union" }];
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export namespace ${syntheticNamePrefix}SparqlObjectSet {
|
|
234
|
+
export type Query<${typeParameters.ObjectFilterT}, ${typeParameters.ObjectIdentifierT}> = ${syntheticNamePrefix}ObjectSet.Query<ObjectFilterT, ObjectIdentifierT> & { readonly order?: (objectVariable: ${this.reusables.imports.Variable}) => readonly ${this.reusables.imports.sparqljs}.Ordering[]; readonly where?: (objectVariable: ${this.reusables.imports.Variable}) => readonly ${this.reusables.imports.sparqljs}.Pattern[] };
|
|
235
|
+
}`;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
__decorate([
|
|
239
|
+
Memoize()
|
|
240
|
+
], SparqlObjectSetType.prototype, "declaration", null);
|
|
241
|
+
//# sourceMappingURL=SparqlObjectSetType.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Literal } from "@rdfjs/types";
|
|
2
|
+
import { AbstractPrimitiveType } from "./AbstractPrimitiveType.js";
|
|
3
|
+
import { type Code } from "./ts-poet-wrapper.js";
|
|
4
|
+
export declare class StringType extends AbstractPrimitiveType<string> {
|
|
5
|
+
readonly filterFunction: Code;
|
|
6
|
+
readonly filterType: Code;
|
|
7
|
+
readonly graphqlType: import("./AbstractType.js").AbstractType.GraphqlType;
|
|
8
|
+
readonly hashFunction: Code;
|
|
9
|
+
readonly jsTypes: readonly [{
|
|
10
|
+
readonly typeof: "string";
|
|
11
|
+
}];
|
|
12
|
+
readonly kind = "String";
|
|
13
|
+
readonly valueSparqlWherePatternsFunction: Code;
|
|
14
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
15
|
+
get schemaType(): Code;
|
|
16
|
+
protected get inlineExpression(): Code;
|
|
17
|
+
protected get schemaInitializers(): readonly Code[];
|
|
18
|
+
jsonSchema(_parameters: Parameters<AbstractPrimitiveType<string>["jsonSchema"]>[0]): Code;
|
|
19
|
+
literalValueExpression(literal: Literal | string): Code;
|
|
20
|
+
toRdfResourceValuesExpression({ variables, }: Parameters<AbstractPrimitiveType<string>["toRdfResourceValuesExpression"]>[0]): Code;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=StringType.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { xsd } from "@tpluscode/rdf-ns-builders";
|
|
8
|
+
import { Memoize } from "typescript-memoize";
|
|
9
|
+
import { AbstractPrimitiveType } from "./AbstractPrimitiveType.js";
|
|
10
|
+
import { arrayOf, code, literalOf } from "./ts-poet-wrapper.js";
|
|
11
|
+
export class StringType extends AbstractPrimitiveType {
|
|
12
|
+
filterFunction = code `${this.reusables.snippets.filterString}`;
|
|
13
|
+
filterType = code `${this.reusables.snippets.StringFilter}`;
|
|
14
|
+
graphqlType = new AbstractPrimitiveType.GraphqlType(code `${this.reusables.imports.GraphQLString}`, this.reusables);
|
|
15
|
+
hashFunction = code `${this.reusables.snippets.hashString}`;
|
|
16
|
+
jsTypes = [
|
|
17
|
+
{
|
|
18
|
+
typeof: "string",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
kind = "String";
|
|
22
|
+
valueSparqlWherePatternsFunction = code `${this.reusables.snippets.stringSparqlWherePatterns}`;
|
|
23
|
+
get fromRdfResourceValuesFunction() {
|
|
24
|
+
return code `${this.reusables.snippets.stringFromRdfResourceValues}<${this.expression}>`;
|
|
25
|
+
}
|
|
26
|
+
get schemaType() {
|
|
27
|
+
return code `${this.reusables.snippets.StringSchema}<${this.expression}>`;
|
|
28
|
+
}
|
|
29
|
+
get inlineExpression() {
|
|
30
|
+
if (this.primitiveIn.length > 0) {
|
|
31
|
+
return code `${this.primitiveIn.map((value) => `"${value}"`).join(" | ")}`;
|
|
32
|
+
}
|
|
33
|
+
return code `string`;
|
|
34
|
+
}
|
|
35
|
+
get schemaInitializers() {
|
|
36
|
+
let initializers = super.schemaInitializers;
|
|
37
|
+
if (this.languageIn.length > 0) {
|
|
38
|
+
initializers = initializers.concat(code `languageIn: ${arrayOf(...this.languageIn)}`);
|
|
39
|
+
}
|
|
40
|
+
return initializers;
|
|
41
|
+
}
|
|
42
|
+
jsonSchema(_parameters) {
|
|
43
|
+
switch (this.primitiveIn.length) {
|
|
44
|
+
case 0:
|
|
45
|
+
return code `${this.reusables.imports.z}.string()`;
|
|
46
|
+
case 1:
|
|
47
|
+
return code `${this.reusables.imports.z}.literal(${this.primitiveIn[0]})`;
|
|
48
|
+
default:
|
|
49
|
+
return code `${this.reusables.imports.z}.enum(${arrayOf(...this.primitiveIn)})`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
literalValueExpression(literal) {
|
|
53
|
+
return code `${literalOf(typeof literal === "string" ? literal : literal.value)}`;
|
|
54
|
+
}
|
|
55
|
+
toRdfResourceValuesExpression({ variables, }) {
|
|
56
|
+
return code `[${this.reusables.snippets.literalFactory}.string(${variables.value}${!this.datatype.equals(xsd.string) ? `, ${this.rdfjsTermExpression(this.datatype)}` : ""})]`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
__decorate([
|
|
60
|
+
Memoize()
|
|
61
|
+
], StringType.prototype, "fromRdfResourceValuesFunction", null);
|
|
62
|
+
__decorate([
|
|
63
|
+
Memoize()
|
|
64
|
+
], StringType.prototype, "schemaType", null);
|
|
65
|
+
__decorate([
|
|
66
|
+
Memoize()
|
|
67
|
+
], StringType.prototype, "inlineExpression", null);
|
|
68
|
+
//# sourceMappingURL=StringType.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BlankNode, Literal, NamedNode } from "@rdfjs/types";
|
|
2
|
+
import { NodeKind } from "@shaclmate/shacl-ast";
|
|
3
|
+
import { Maybe } from "purify-ts";
|
|
4
|
+
import { AbstractTermType } from "./AbstractTermType.js";
|
|
5
|
+
import { type Code } from "./ts-poet-wrapper.js";
|
|
6
|
+
export declare class TermType<ConstantTermT extends Literal | NamedNode = Literal | NamedNode, RuntimeTermT extends BlankNode | Literal | NamedNode = BlankNode | Literal | NamedNode> extends AbstractTermType {
|
|
7
|
+
readonly conversionFunction: Maybe<AbstractTermType.ConversionFunction>;
|
|
8
|
+
readonly filterFunction: Code;
|
|
9
|
+
readonly jsTypes: readonly [{
|
|
10
|
+
readonly instanceof: "Object";
|
|
11
|
+
readonly typeof: "object";
|
|
12
|
+
}];
|
|
13
|
+
readonly kind = "Term";
|
|
14
|
+
readonly nodeKinds: ReadonlySet<NodeKind>;
|
|
15
|
+
readonly valueSparqlWherePatternsFunction: Code;
|
|
16
|
+
constructor({ nodeKinds, ...superParameters }: ConstructorParameters<typeof AbstractTermType<ConstantTermT, RuntimeTermT>>[0] & {
|
|
17
|
+
nodeKinds: ReadonlySet<NodeKind>;
|
|
18
|
+
});
|
|
19
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
20
|
+
get filterType(): Code;
|
|
21
|
+
get graphqlType(): AbstractTermType.GraphqlType;
|
|
22
|
+
get schemaType(): Code;
|
|
23
|
+
protected get inlineExpression(): Code;
|
|
24
|
+
protected get schemaInitializers(): Code[];
|
|
25
|
+
fromJsonExpression({ variables, }: Parameters<AbstractTermType["fromJsonExpression"]>[0]): Code;
|
|
26
|
+
graphqlResolveExpression(_parameters: Parameters<AbstractTermType["graphqlResolveExpression"]>[0]): Code;
|
|
27
|
+
jsonSchema(_parameters: Parameters<AbstractTermType["jsonSchema"]>[0]): Code;
|
|
28
|
+
jsonType(): AbstractTermType.JsonType;
|
|
29
|
+
toJsonExpression({ variables, }: Parameters<AbstractTermType["toJsonExpression"]>[0]): Code;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=TermType.d.ts.map
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { NodeKind } from "@shaclmate/shacl-ast";
|
|
8
|
+
import { xsd } from "@tpluscode/rdf-ns-builders";
|
|
9
|
+
import { Maybe } from "purify-ts";
|
|
10
|
+
import { invariant } from "ts-invariant";
|
|
11
|
+
import { Memoize } from "typescript-memoize";
|
|
12
|
+
import { AbstractTermType } from "./AbstractTermType.js";
|
|
13
|
+
import { arrayOf, code, joinCode } from "./ts-poet-wrapper.js";
|
|
14
|
+
export class TermType extends AbstractTermType {
|
|
15
|
+
conversionFunction = Maybe.empty();
|
|
16
|
+
filterFunction = code `${this.reusables.snippets.filterTerm}`;
|
|
17
|
+
jsTypes = [
|
|
18
|
+
{ instanceof: "Object", typeof: "object" },
|
|
19
|
+
];
|
|
20
|
+
kind = "Term";
|
|
21
|
+
nodeKinds;
|
|
22
|
+
valueSparqlWherePatternsFunction = code `${this.reusables.snippets.termSparqlWherePatterns}`;
|
|
23
|
+
constructor({ nodeKinds, ...superParameters }) {
|
|
24
|
+
super(superParameters);
|
|
25
|
+
this.nodeKinds = nodeKinds;
|
|
26
|
+
invariant(this.nodeKinds.has("Literal") &&
|
|
27
|
+
(this.nodeKinds.has("BlankNode") || this.nodeKinds.has("IRI")), "should be IdentifierType or LiteralType");
|
|
28
|
+
}
|
|
29
|
+
get fromRdfResourceValuesFunction() {
|
|
30
|
+
return code `${this.reusables.snippets.termFromRdfResourceValues}<${this.expression}>`;
|
|
31
|
+
}
|
|
32
|
+
get filterType() {
|
|
33
|
+
return code `${this.reusables.snippets.TermFilter}<${this.expression}>`;
|
|
34
|
+
}
|
|
35
|
+
get graphqlType() {
|
|
36
|
+
throw new Error("not implemented");
|
|
37
|
+
}
|
|
38
|
+
get schemaType() {
|
|
39
|
+
return code `${this.reusables.snippets.TermSchema}<${this.expression}>`;
|
|
40
|
+
}
|
|
41
|
+
get inlineExpression() {
|
|
42
|
+
return code `(${joinCode([...this.nodeKinds]
|
|
43
|
+
.map((nodeKind) => {
|
|
44
|
+
switch (nodeKind) {
|
|
45
|
+
case "BlankNode":
|
|
46
|
+
return this.reusables.imports.BlankNode;
|
|
47
|
+
case "IRI":
|
|
48
|
+
return this.reusables.imports.NamedNode;
|
|
49
|
+
case "Literal":
|
|
50
|
+
return this.reusables.imports.Literal;
|
|
51
|
+
default:
|
|
52
|
+
nodeKind;
|
|
53
|
+
throw new RangeError(nodeKind);
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
.map((import_) => code `${import_}`), { on: " | " })})`;
|
|
57
|
+
}
|
|
58
|
+
get schemaInitializers() {
|
|
59
|
+
return super.schemaInitializers.concat(code `types: ${arrayOf(...[...this.nodeKinds].map(NodeKind.toTermType))}`);
|
|
60
|
+
}
|
|
61
|
+
fromJsonExpression({ variables, }) {
|
|
62
|
+
return code `${this.reusables.imports.Either}.of<Error, ${this.expression}>(${[
|
|
63
|
+
...this.nodeKinds,
|
|
64
|
+
].reduce((expression, nodeKind) => {
|
|
65
|
+
let valueToNodeKind;
|
|
66
|
+
switch (nodeKind) {
|
|
67
|
+
case "BlankNode":
|
|
68
|
+
valueToNodeKind = code `${this.reusables.imports.dataFactory}.blankNode(${variables.value}["@id"].substring(2))`;
|
|
69
|
+
break;
|
|
70
|
+
case "IRI":
|
|
71
|
+
valueToNodeKind = code `${this.reusables.imports.dataFactory}.namedNode(${variables.value}["@id"])`;
|
|
72
|
+
break;
|
|
73
|
+
case "Literal":
|
|
74
|
+
valueToNodeKind = code `${this.reusables.imports.dataFactory}.literal(${variables.value}["@value"], ${variables.value}["@language"] !== undefined ? ${variables.value}["@language"] : (${variables.value}["@type"] !== undefined ? ${this.reusables.imports.dataFactory}.namedNode(${variables.value}["@type"]!) : undefined))`;
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
throw new RangeError(nodeKind);
|
|
78
|
+
}
|
|
79
|
+
return expression == null
|
|
80
|
+
? valueToNodeKind
|
|
81
|
+
: code `((${variables.value}.termType === "${NodeKind.toTermType(nodeKind)}") ? (${valueToNodeKind}) : (${expression}))`;
|
|
82
|
+
}, null)})`;
|
|
83
|
+
}
|
|
84
|
+
graphqlResolveExpression(_parameters) {
|
|
85
|
+
throw new Error("not implemented");
|
|
86
|
+
}
|
|
87
|
+
jsonSchema(_parameters) {
|
|
88
|
+
return code `${this.reusables.imports.z}.discriminatedUnion("termType", [${joinCode([...this.nodeKinds].map((nodeKind) => {
|
|
89
|
+
switch (nodeKind) {
|
|
90
|
+
case "BlankNode":
|
|
91
|
+
case "IRI":
|
|
92
|
+
return code `${this.reusables.imports.z}.object({ "@id": ${this.reusables.imports.z}.string().min(1), termType: ${this.reusables.imports.z}.literal("${NodeKind.toTermType(nodeKind)}") })`;
|
|
93
|
+
case "Literal":
|
|
94
|
+
return code `${this.reusables.imports.z}.object({ "@language": ${this.reusables.imports.z}.string().optional(), "@type": ${this.reusables.imports.z}.string().optional(), "@value": ${this.reusables.imports.z}.string(), termType: ${this.reusables.imports.z}.literal("Literal") })`;
|
|
95
|
+
default:
|
|
96
|
+
throw new RangeError(nodeKind);
|
|
97
|
+
}
|
|
98
|
+
}), { on: "," })}])`;
|
|
99
|
+
}
|
|
100
|
+
jsonType() {
|
|
101
|
+
return new AbstractTermType.JsonType(code `{ readonly "@id": string, readonly termType: ${[...this.nodeKinds]
|
|
102
|
+
.filter((nodeKind) => nodeKind !== "Literal")
|
|
103
|
+
.map((nodeKind) => `"${NodeKind.toTermType(nodeKind)}"`)
|
|
104
|
+
.join(" | ")} } | { readonly "@language"?: string, readonly "@type"?: string, readonly "@value": string, readonly termType: "Literal" }`);
|
|
105
|
+
}
|
|
106
|
+
toJsonExpression({ variables, }) {
|
|
107
|
+
return [...this.nodeKinds].reduce((expression, nodeKind) => {
|
|
108
|
+
let valueToNodeKind;
|
|
109
|
+
switch (nodeKind) {
|
|
110
|
+
case "BlankNode":
|
|
111
|
+
valueToNodeKind = code `{ "@id": \`_:\${${variables.value}.value}\`, termType: "${NodeKind.toTermType(nodeKind)}" as const }`;
|
|
112
|
+
break;
|
|
113
|
+
case "IRI":
|
|
114
|
+
valueToNodeKind = code `{ "@id": ${variables.value}.value, termType: "${NodeKind.toTermType(nodeKind)}" as const }`;
|
|
115
|
+
break;
|
|
116
|
+
case "Literal":
|
|
117
|
+
valueToNodeKind = code `{ "@language": ${variables.value}.language.length > 0 ? ${variables.value}.language : undefined, "@type": ${variables.value}.datatype.value !== "${xsd.string.value}" ? ${variables.value}.datatype.value : undefined, "@value": ${variables.value}.value, termType: "${NodeKind.toTermType(nodeKind)}" as const }`;
|
|
118
|
+
break;
|
|
119
|
+
default:
|
|
120
|
+
throw new RangeError(nodeKind);
|
|
121
|
+
}
|
|
122
|
+
return expression === null
|
|
123
|
+
? valueToNodeKind
|
|
124
|
+
: code `(${variables.value}.termType === "${NodeKind.toTermType(nodeKind)}") ? ${valueToNodeKind} : ${expression}`;
|
|
125
|
+
}, null);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
__decorate([
|
|
129
|
+
Memoize()
|
|
130
|
+
], TermType.prototype, "fromRdfResourceValuesFunction", null);
|
|
131
|
+
__decorate([
|
|
132
|
+
Memoize()
|
|
133
|
+
], TermType.prototype, "filterType", null);
|
|
134
|
+
__decorate([
|
|
135
|
+
Memoize()
|
|
136
|
+
], TermType.prototype, "schemaType", null);
|
|
137
|
+
__decorate([
|
|
138
|
+
Memoize()
|
|
139
|
+
], TermType.prototype, "inlineExpression", null);
|
|
140
|
+
__decorate([
|
|
141
|
+
Memoize()
|
|
142
|
+
], TermType.prototype, "jsonType", null);
|
|
143
|
+
//# sourceMappingURL=TermType.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type TsFeature = (typeof TS_FEATURES)[number];
|
|
2
|
+
export declare const TS_FEATURES: readonly ["GraphQL", "JSON", "Object.create", "Object.equals", "Object.filter", "Object.fromJson", "Object.fromRdf", "Object.hash", "Object.JSON", "Object.JSON.type", "Object.JSON.parse", "Object.JSON.schema", "Object.JSON.uiSchema", "Object.RDF", "Object.schema", "Object.SPARQL", "Object.toJson", "Object.toRdf", "Object.toString", "Object.type", "ObjectSet", "RDF", "RdfjsDatasetObjectSet", "SPARQL", "SparqlObjectSet"];
|
|
3
|
+
//# sourceMappingURL=TsFeature.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const TS_FEATURES = [
|
|
2
|
+
"GraphQL",
|
|
3
|
+
"JSON",
|
|
4
|
+
"Object.create",
|
|
5
|
+
"Object.equals",
|
|
6
|
+
"Object.filter",
|
|
7
|
+
"Object.fromJson",
|
|
8
|
+
"Object.fromRdf",
|
|
9
|
+
"Object.hash",
|
|
10
|
+
"Object.JSON",
|
|
11
|
+
"Object.JSON.type",
|
|
12
|
+
"Object.JSON.parse",
|
|
13
|
+
"Object.JSON.schema",
|
|
14
|
+
"Object.JSON.uiSchema",
|
|
15
|
+
"Object.RDF",
|
|
16
|
+
"Object.schema",
|
|
17
|
+
"Object.SPARQL",
|
|
18
|
+
"Object.toJson",
|
|
19
|
+
"Object.toRdf",
|
|
20
|
+
"Object.toString",
|
|
21
|
+
"Object.type",
|
|
22
|
+
"ObjectSet",
|
|
23
|
+
"RDF",
|
|
24
|
+
"RdfjsDatasetObjectSet",
|
|
25
|
+
"SPARQL",
|
|
26
|
+
"SparqlObjectSet",
|
|
27
|
+
];
|
|
28
|
+
//# sourceMappingURL=TsFeature.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Logger } from "ts-log";
|
|
2
|
+
import type * as ast from "../../ast/index.js";
|
|
3
|
+
import type { Generator } from "../Generator.js";
|
|
4
|
+
import type { TsFeature } from "./TsFeature.js";
|
|
5
|
+
export declare class TsGenerator implements Generator {
|
|
6
|
+
private readonly configuration?;
|
|
7
|
+
private readonly logger;
|
|
8
|
+
constructor({ configuration, logger, }: {
|
|
9
|
+
configuration?: Partial<TsGenerator.Configuration>;
|
|
10
|
+
logger: Logger;
|
|
11
|
+
});
|
|
12
|
+
generate(ast_: ast.Ast): string;
|
|
13
|
+
private objectSetTypeDeclarations;
|
|
14
|
+
/**
|
|
15
|
+
* Synthesize the $Object union.
|
|
16
|
+
*/
|
|
17
|
+
private synthesizeUberObjectUnionType;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace TsGenerator {
|
|
20
|
+
interface Configuration {
|
|
21
|
+
readonly features: ReadonlySet<TsFeature>;
|
|
22
|
+
readonly finalized: true;
|
|
23
|
+
readonly syntheticNamePrefix: string;
|
|
24
|
+
}
|
|
25
|
+
namespace Configuration {
|
|
26
|
+
const default_: Omit<Configuration, "finalized">;
|
|
27
|
+
function finalize(ast: ast.Ast, partialConfiguration?: Partial<Configuration>): Configuration;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=TsGenerator.d.ts.map
|