@shaclmate/compiler 4.0.94 → 4.0.96
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/Eithers.d.ts +2 -1
- package/dist/Eithers.js +15 -0
- package/dist/ShapesGraphToAstTransformer.js +10 -0
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.d.ts +2 -2
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.js +2 -1
- package/dist/_ShapesGraphToAstTransformer/isNodeShape.d.ts +3 -0
- package/dist/_ShapesGraphToAstTransformer/isNodeShape.js +4 -0
- package/dist/_ShapesGraphToAstTransformer/isPropertyShape.d.ts +3 -0
- package/dist/_ShapesGraphToAstTransformer/isPropertyShape.js +4 -0
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.d.ts +2 -1
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +4 -3
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +7 -3
- package/dist/_ShapesGraphToAstTransformer/shapeOntology.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.js +34 -16
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +3 -2
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +3 -3
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.js +86 -65
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +1 -1
- package/dist/ast/AbstractCollectionType.d.ts +2 -2
- package/dist/ast/AbstractConstruct.d.ts +25 -0
- package/dist/ast/AbstractConstruct.js +38 -0
- package/dist/ast/AbstractContainerType.d.ts +2 -2
- package/dist/ast/AbstractLazyType.d.ts +14 -36
- package/dist/ast/AbstractTermType.d.ts +2 -2
- package/dist/ast/AbstractType.d.ts +7 -17
- package/dist/ast/AbstractType.js +6 -22
- package/dist/ast/Ast.d.ts +2 -0
- package/dist/ast/DefaultValueType.d.ts +2 -2
- package/dist/ast/DiscriminatedUnionType.d.ts +2 -2
- package/dist/ast/DiscriminatedUnionType.js +3 -1
- package/dist/ast/LiteralType.d.ts +2 -2
- package/dist/ast/Operation.d.ts +67 -0
- package/dist/ast/Operation.js +32 -0
- package/dist/ast/Service.d.ts +17 -0
- package/dist/ast/Service.js +17 -0
- package/dist/ast/SetType.d.ts +2 -2
- package/dist/ast/StructCompoundType.d.ts +1 -1
- package/dist/ast/StructCompoundType.js +5 -5
- package/dist/ast/StructType.d.ts +64 -32
- package/dist/ast/StructType.js +62 -29
- package/dist/ast/index.d.ts +2 -0
- package/dist/ast/index.js +2 -0
- package/dist/generators/transformAstToLabeledPropertyGraph.js +13 -10
- package/dist/generators/ts/AbstractCallable.d.ts +20 -0
- package/dist/generators/ts/AbstractCallable.js +9 -0
- package/dist/generators/ts/AbstractCollectionType.d.ts +7 -9
- package/dist/generators/ts/AbstractCollectionType.js +11 -11
- package/dist/generators/ts/AbstractCompoundType.d.ts +18 -0
- package/dist/generators/ts/AbstractCompoundType.js +33 -0
- package/dist/generators/ts/AbstractConstruct.d.ts +31 -0
- package/dist/generators/ts/AbstractConstruct.js +31 -0
- package/dist/generators/ts/AbstractContainerType.d.ts +7 -4
- package/dist/generators/ts/AbstractContainerType.js +5 -2
- package/dist/generators/ts/AbstractDateType.d.ts +8 -5
- package/dist/generators/ts/AbstractDateType.js +22 -8
- package/dist/generators/ts/AbstractDiscriminatedUnionType.d.ts +43 -45
- package/dist/generators/ts/AbstractDiscriminatedUnionType.js +100 -258
- package/dist/generators/ts/AbstractIdentifierType.d.ts +8 -3
- package/dist/generators/ts/AbstractIdentifierType.js +34 -5
- package/dist/generators/ts/AbstractIntersectionType.d.ts +48 -0
- package/dist/generators/ts/AbstractIntersectionType.js +80 -0
- package/dist/generators/ts/AbstractLazyType.d.ts +35 -17
- package/dist/generators/ts/AbstractLazyType.js +75 -24
- package/dist/generators/ts/AbstractLiteralType.d.ts +2 -2
- package/dist/generators/ts/AbstractLiteralType.js +15 -1
- package/dist/generators/ts/AbstractNumericType.d.ts +5 -4
- package/dist/generators/ts/AbstractNumericType.js +4 -6
- package/dist/generators/ts/AbstractObjectSetType.d.ts +5 -6
- package/dist/generators/ts/AbstractObjectSetType.js +10 -13
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +7 -7
- package/dist/generators/ts/AbstractPrimitiveType.js +18 -36
- package/dist/generators/ts/AbstractStructuredType.d.ts +71 -0
- package/dist/generators/ts/AbstractStructuredType.js +273 -0
- package/dist/generators/ts/AbstractTermType.d.ts +8 -10
- package/dist/generators/ts/AbstractTermType.js +6 -18
- package/dist/generators/ts/AbstractType.d.ts +54 -78
- package/dist/generators/ts/AbstractType.js +25 -29
- package/dist/generators/ts/AbstractTypedLiteralType.d.ts +5 -4
- package/dist/generators/ts/AbstractTypedLiteralType.js +14 -3
- package/dist/generators/ts/BigDecimalType.d.ts +15 -13
- package/dist/generators/ts/BigDecimalType.js +13 -29
- package/dist/generators/ts/BigIntType.d.ts +10 -8
- package/dist/generators/ts/BigIntType.js +26 -51
- package/dist/generators/ts/BlankNodeType.d.ts +12 -12
- package/dist/generators/ts/BlankNodeType.js +9 -35
- package/dist/generators/ts/BooleanType.d.ts +12 -6
- package/dist/generators/ts/BooleanType.js +21 -11
- package/dist/generators/ts/Callable.d.ts +5 -0
- package/dist/generators/ts/Callable.js +2 -0
- package/dist/generators/ts/CodeThunk.d.ts +6 -0
- package/dist/generators/ts/CodeThunk.js +8 -0
- package/dist/generators/ts/DateTimeType.d.ts +7 -4
- package/dist/generators/ts/DateTimeType.js +8 -21
- package/dist/generators/ts/DateType.d.ts +7 -4
- package/dist/generators/ts/DateType.js +8 -21
- package/dist/generators/ts/DeclaredCallable.d.ts +23 -0
- package/dist/generators/ts/DeclaredCallable.js +59 -0
- package/dist/generators/ts/DefaultValueType.d.ts +24 -23
- package/dist/generators/ts/DefaultValueType.js +29 -59
- package/dist/generators/ts/FloatType.d.ts +7 -2
- package/dist/generators/ts/FloatType.js +16 -6
- package/dist/generators/ts/GraphqlSchema.js +1 -1
- package/dist/generators/ts/IdentifierType.d.ts +13 -13
- package/dist/generators/ts/IdentifierType.js +10 -39
- package/dist/generators/ts/Imports.d.ts +8 -0
- package/dist/generators/ts/Imports.js +15 -7
- package/dist/generators/ts/InlineCallable.d.ts +18 -0
- package/dist/generators/ts/InlineCallable.js +51 -0
- package/dist/generators/ts/IntType.d.ts +6 -1
- package/dist/generators/ts/IntType.js +16 -1
- package/dist/generators/ts/IriType.d.ts +12 -8
- package/dist/generators/ts/IriType.js +56 -43
- package/dist/generators/ts/LangStringType.d.ts +12 -7
- package/dist/generators/ts/LangStringType.js +37 -20
- package/dist/generators/ts/LazyOptionType.d.ts +5 -21
- package/dist/generators/ts/LazyOptionType.js +5 -26
- package/dist/generators/ts/LazySetType.d.ts +3 -2
- package/dist/generators/ts/LazySetType.js +5 -25
- package/dist/generators/ts/LazyType.d.ts +3 -2
- package/dist/generators/ts/LazyType.js +5 -21
- package/dist/generators/ts/ListType.d.ts +12 -7
- package/dist/generators/ts/ListType.js +45 -22
- package/dist/generators/ts/LiteralType.d.ts +11 -7
- package/dist/generators/ts/LiteralType.js +31 -21
- package/dist/generators/ts/ObjectDiscriminatedUnionType.d.ts +19 -2
- package/dist/generators/ts/ObjectDiscriminatedUnionType.js +105 -41
- package/dist/generators/ts/ObjectIntersectionType.d.ts +44 -0
- package/dist/generators/ts/ObjectIntersectionType.js +204 -0
- package/dist/generators/ts/ObjectSetType.js +0 -1
- package/dist/generators/ts/ObjectType.d.ts +78 -49
- package/dist/generators/ts/ObjectType.js +235 -362
- package/dist/generators/ts/Operation.d.ts +54 -0
- package/dist/generators/ts/Operation.js +206 -0
- package/dist/generators/ts/OptionType.d.ts +15 -13
- package/dist/generators/ts/OptionType.js +43 -33
- package/dist/generators/ts/RdfjsDatasetObjectSetType.js +14 -7
- package/dist/generators/ts/ReferenceCallable.d.ts +14 -0
- package/dist/generators/ts/ReferenceCallable.js +16 -0
- package/dist/generators/ts/Service.d.ts +15 -0
- package/dist/generators/ts/Service.js +53 -0
- package/dist/generators/ts/SetType.d.ts +11 -8
- package/dist/generators/ts/SetType.js +35 -35
- package/dist/generators/ts/SnippetFactory.d.ts +1 -1
- package/dist/generators/ts/Snippets.d.ts +80 -2
- package/dist/generators/ts/Snippets.js +622 -74
- package/dist/generators/ts/SparqlObjectSetType.js +1 -4
- package/dist/generators/ts/StringType.d.ts +10 -5
- package/dist/generators/ts/StringType.js +25 -17
- package/dist/generators/ts/TermType.d.ts +13 -7
- package/dist/generators/ts/TermType.js +61 -71
- package/dist/generators/ts/TsFeature.d.ts +4 -1
- package/dist/generators/ts/TsFeature.js +51 -0
- package/dist/generators/ts/TsGenerator.d.ts +2 -1
- package/dist/generators/ts/TsGenerator.js +98 -54
- package/dist/generators/ts/Type.d.ts +2 -1
- package/dist/generators/ts/TypeFactory.d.ts +10 -7
- package/dist/generators/ts/TypeFactory.js +193 -140
- package/dist/generators/ts/UberObjectDiscriminatedUnionType.d.ts +6 -2
- package/dist/generators/ts/UberObjectDiscriminatedUnionType.js +18 -12
- package/dist/generators/ts/ZodGenerator.js +6 -14
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_Discriminant.d.ts +3 -6
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_conversionFunctionExpression.d.ts → AbstractDiscriminatedUnionType_conversionFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_conversionFunctionExpression.js → AbstractDiscriminatedUnionType_conversionFunction.js} +2 -2
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_equalsFunctionExpression.d.ts → AbstractDiscriminatedUnionType_equalsFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_equalsFunctionExpression.js → AbstractDiscriminatedUnionType_equalsFunction.js} +4 -4
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_filterFunctionExpression.d.ts → AbstractDiscriminatedUnionType_filterFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_filterFunctionExpression.js → AbstractDiscriminatedUnionType_filterFunction.js} +7 -8
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_filterTypeExpression.js +1 -2
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonObjectFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonObjectFunction.js +18 -0
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_fromRdfResourceValuesFunctionExpression.d.ts → AbstractDiscriminatedUnionType_fromRdfResourceValuesFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_fromRdfResourceValuesFunctionExpression.js → AbstractDiscriminatedUnionType_fromRdfResourceValuesFunction.js} +5 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_hashFunctionExpression.d.ts → AbstractDiscriminatedUnionType_hashFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_hashFunctionExpression.js → AbstractDiscriminatedUnionType_hashFunction.js} +4 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_inferDiscriminant.js +6 -9
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_inlineExpression.js +5 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonObjectFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonObjectFunction.js +16 -0
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toLoggableFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toLoggableFunction.js +20 -0
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_toRdfResourceValuesFunctionExpression.d.ts → AbstractDiscriminatedUnionType_toRdfResourceValuesFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toRdfResourceValuesFunction.js +18 -0
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_toStringFunctionExpression.d.ts → AbstractDiscriminatedUnionType_toStringFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_toStringFunctionExpression.js → AbstractDiscriminatedUnionType_toStringFunction.js} +3 -3
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunctionExpression.d.ts → AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunctionExpression.js → AbstractDiscriminatedUnionType_valueSparqlConstructTriplesFunction.js} +4 -4
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunctionExpression.d.ts → AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunction.d.ts} +1 -1
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/{AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunctionExpression.js → AbstractDiscriminatedUnionType_valueSparqlWherePatternsFunction.js} +4 -4
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_equalsFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_equalsFunction.js +7 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_filterFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_filterFunction.js +7 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_hashFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_hashFunction.js +8 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toLoggableFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toLoggableFunction.js +14 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toStringFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_toStringFunction.js +17 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlConstructTriplesFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlConstructTriplesFunction.js +13 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlWherePatternsFunction.d.ts +5 -0
- package/dist/generators/ts/_AbstractIntersectionType/AbstractIntersectionType_valueSparqlWherePatternsFunction.js +13 -0
- package/dist/generators/ts/_AbstractType/AbstractType_DiscriminatedType.d.ts +9 -0
- package/dist/generators/ts/_AbstractType/AbstractType_DiscriminatedType.js +2 -0
- package/dist/generators/ts/_AbstractType/AbstractType_JsonType.d.ts +196 -11
- package/dist/generators/ts/_AbstractType/AbstractType_JsonType.js +411 -17
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunction.d.ts} +3 -3
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunction.js +12 -0
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunction.d.ts} +3 -3
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunction.js +32 -0
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_fromRdfResourceFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_fromRdfResourceFunction.d.ts} +3 -3
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_fromRdfResourceFunction.js +16 -0
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_graphqlTypeVariableStatement.d.ts → ObjectDiscriminatedUnionType_graphqlTypeExpression.d.ts} +2 -2
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_graphqlTypeExpression.js +11 -0
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_schemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_schemaVariableStatement.js → ObjectDiscriminatedUnionType_schemaExpression.js} +3 -8
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_toRdfResourceFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_toRdfResourceFunction.d.ts} +3 -3
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_toRdfResourceFunction.js +17 -0
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/{ObjectDiscriminatedUnionType_typeGuardFunctionDeclaration.d.ts → ObjectDiscriminatedUnionType_typeGuardFunction.d.ts} +4 -3
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_typeGuardFunction.js +14 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__fromRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__fromRdfResourceFunction.js +16 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__toRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType__toRdfResourceFunction.js +18 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunction.js +30 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunctionParameters.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createFunctionParameters.js +25 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createUnsafeFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_createUnsafeFunction.js +10 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlConstructTriplesFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlConstructTriplesFunction.js +19 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlWherePatternsFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_focusSparqlWherePatternsFunction.js +19 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromJsonObjectFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromJsonObjectFunction.js +15 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceFunction.js +9 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceValuesFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_fromRdfResourceValuesFunction.js +8 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toJsonObjectFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toJsonObjectFunction.js +7 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceFunction.js +12 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceValuesFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_toRdfResourceValuesFunction.js +5 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_typeGuardFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectIntersectionType/ObjectIntersectionType_typeGuardFunction.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.d.ts +37 -23
- package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.js +19 -1
- package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.d.ts +15 -15
- package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.js +22 -56
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.d.ts +9 -10
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.js +40 -49
- package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.d.ts +8 -9
- package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.js +47 -14
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.d.ts +10 -10
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.js +41 -57
- package/dist/generators/ts/_ObjectType/ObjectType__fromRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_fromRdfResourceFunctionExpression.js → ObjectType__fromRdfResourceFunction.js} +14 -11
- package/dist/generators/ts/_ObjectType/ObjectType__toRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType__toRdfResourceFunction.js +32 -0
- package/dist/generators/ts/_ObjectType/ObjectType_conversionFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_conversionFunction.js +28 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunction.js +31 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionParameters.d.ts +3 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionParameters.js +29 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createUnsafeFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createUnsafeFunction.js +10 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_equalsFunctionExpression.d.ts → ObjectType_equalsFunction.d.ts} +2 -1
- package/dist/generators/ts/_ObjectType/{ObjectType_equalsFunctionExpression.js → ObjectType_equalsFunction.js} +6 -4
- package/dist/generators/ts/_ObjectType/{ObjectType_filterFunctionExpression.d.ts → ObjectType_filterFunction.d.ts} +2 -1
- package/dist/generators/ts/_ObjectType/{ObjectType_filterFunctionExpression.js → ObjectType_filterFunction.js} +5 -2
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionExpression.d.ts → ObjectType_focusSparqlConstructTriplesFunction.d.ts} +3 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionExpression.js → ObjectType_focusSparqlConstructTriplesFunction.js} +11 -4
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionExpression.d.ts → ObjectType_focusSparqlWherePatternsFunction.d.ts} +3 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionExpression.js → ObjectType_focusSparqlWherePatternsFunction.js} +11 -4
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonObjectFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonObjectFunction.js +19 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunction.js +9 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunction.js +8 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_hashFunctionExpression.d.ts → ObjectType_hashFunction.d.ts} +2 -1
- package/dist/generators/ts/_ObjectType/{ObjectType_hashFunctionExpression.js → ObjectType_hashFunction.js} +10 -14
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.d.ts +6 -2
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.js +1 -2
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunction.d.ts +20 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunction.js +39 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts → ObjectType_sparqlConstructQueryStringFunction.d.ts} +11 -4
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunction.js +11 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonObjectFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonObjectFunction.js +16 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toLoggableFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toLoggableFunction.js +11 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunction.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceValuesFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceValuesFunction.js +8 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_toStringFunctionExpression.d.ts → ObjectType_toStringFunction.d.ts} +2 -1
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunction.js +10 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunction.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunction.js +17 -0
- package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunction.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunction.js +18 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlConstructTriplesFunctionExpression.d.ts → ObjectType_valueSparqlConstructTriplesFunction.d.ts} +1 -1
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunction.js +7 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlWherePatternsFunctionExpression.d.ts → ObjectType_valueSparqlWherePatternsFunction.d.ts} +1 -1
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunction.js +9 -0
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_FilterFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FilterFunction.js +3 -0
- package/dist/generators/ts/_snippets/snippets_FromJsonObjectFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FromJsonObjectFunction.js +21 -0
- package/dist/generators/ts/_snippets/snippets_FromJsonValueFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FromJsonValueFunction.js +21 -0
- package/dist/generators/ts/_snippets/snippets_HashFunction.js +1 -1
- package/dist/generators/ts/_snippets/snippets_Hasher.js +1 -1
- package/dist/generators/ts/_snippets/snippets_IdentifierJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierJsonObject.js +12 -0
- package/dist/generators/ts/_snippets/snippets_LangStringJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LangStringJsonObject.js +14 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.js +8 -1
- package/dist/generators/ts/_snippets/snippets_LazyOption.js +17 -1
- package/dist/generators/ts/_snippets/snippets_LazySet.js +8 -1
- package/dist/generators/ts/_snippets/snippets_LiteralJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LiteralJsonObject.js +16 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_ObjectTypeGuardFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ObjectTypeGuardFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_Primitive.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_Primitive.js +4 -0
- package/dist/generators/ts/_snippets/snippets_ProblemDetailsJson.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ProblemDetailsJson.js +41 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +11 -6
- package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryFunction.js +12 -0
- package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryStringFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlConstructQueryStringFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_TermJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_TermJsonObject.js +8 -0
- package/dist/generators/ts/_snippets/snippets_ToJsonObjectFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToJsonObjectFunction.js +3 -0
- package/dist/generators/ts/_snippets/snippets_ToJsonValueFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToJsonValueFunction.js +3 -0
- package/dist/generators/ts/_snippets/snippets_ToLoggableFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToLoggableFunction.js +3 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +1 -1
- package/dist/generators/ts/_snippets/snippets_ToStringFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToStringFunction.js +3 -0
- package/dist/generators/ts/_snippets/snippets_ToStringRecordFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToStringRecordFunction.js +3 -0
- package/dist/generators/ts/_snippets/snippets_TypedLiteralJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_TypedLiteralJsonObject.js +14 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.js +1 -1
- package/dist/generators/ts/_snippets/snippets_arrayFromJsonArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_arrayFromJsonArray.js +13 -0
- package/dist/generators/ts/_snippets/snippets_arrayToJsonArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_arrayToJsonArray.js +6 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.js +3 -3
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.js +3 -2
- package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalToJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromJsonObject.js +9 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromJsonString.js +8 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.js +2 -2
- package/dist/generators/ts/_snippets/snippets_bigIntToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntToJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_bigIntToJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntToJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.js +2 -3
- package/dist/generators/ts/_snippets/snippets_blankNodeToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeToJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeToJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeToJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromJsonBoolean.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromJsonBoolean.js +6 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromJsonObject.js +9 -0
- package/dist/generators/ts/_snippets/snippets_constrainPrimitive.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_constrainPrimitive.js +12 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.js +2 -13
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.js +2 -13
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.js +2 -15
- package/dist/generators/ts/_snippets/snippets_dateFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateFromJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_dateFromJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateFromJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.js +3 -4
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +7 -6
- package/dist/generators/ts/_snippets/snippets_dateTimeFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.js +3 -4
- package/dist/generators/ts/_snippets/snippets_dateTimeToJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeToJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_dateToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateToJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_dateToJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateToJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonObject.js +9 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonValue.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromJsonValue.js +9 -0
- package/dist/generators/ts/_snippets/snippets_errorToProblemDetailsJson.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_errorToProblemDetailsJson.js +27 -0
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.js +1 -3
- package/dist/generators/ts/_snippets/snippets_filterBoolean.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterDate.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterIri.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterLiteral.js +1 -3
- package/dist/generators/ts/_snippets/snippets_filterString.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +17 -17
- package/dist/generators/ts/_snippets/snippets_floatFromJsonNumber.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_floatFromJsonNumber.js +6 -0
- package/dist/generators/ts/_snippets/snippets_floatFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_floatFromJsonObject.js +9 -0
- package/dist/generators/ts/_snippets/snippets_hashArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashBigDecimal.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashBoolean.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashDate.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashDateTime.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashMaybe.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashNumeric.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashString.js +1 -2
- package/dist/generators/ts/_snippets/snippets_hashTerm.js +1 -2
- package/dist/generators/ts/_snippets/snippets_identifierFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.js +2 -3
- package/dist/generators/ts/_snippets/snippets_identifierToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierToJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_identifierToJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierToJsonString.js +5 -0
- package/dist/generators/ts/_snippets/snippets_intFromJsonNumber.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_intFromJsonNumber.js +6 -0
- package/dist/generators/ts/_snippets/snippets_intFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_intFromJsonObject.js +9 -0
- package/dist/generators/ts/_snippets/snippets_iriFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriFromJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriFromJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriFromJsonString.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriToJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriToJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriToJsonString.js +6 -0
- package/dist/generators/ts/_snippets/snippets_langStringFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_langStringFromJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_langStringFromRdfResourceValues.js +2 -3
- package/dist/generators/ts/_snippets/snippets_langStringToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_langStringToJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_listFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listFromJsonObject.js +10 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +6 -5
- package/dist/generators/ts/_snippets/snippets_listToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listToJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_literalFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFromJsonObject.js +16 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.js +2 -3
- package/dist/generators/ts/_snippets/snippets_literalToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalToJsonObject.js +15 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromJsonObject.js +12 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromJsonValue.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromJsonValue.js +12 -0
- package/dist/generators/ts/_snippets/snippets_maybeToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeToJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_maybeToJsonValue.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeToJsonValue.js +6 -0
- package/dist/generators/ts/_snippets/snippets_missingResolver.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_missingResolver.js +3 -0
- package/dist/generators/ts/_snippets/snippets_primitiveToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_primitiveToJsonObject.js +6 -0
- package/dist/generators/ts/_snippets/snippets_primitiveToJsonValue.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_primitiveToJsonValue.js +6 -0
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.js +4 -3
- package/dist/generators/ts/_snippets/snippets_stringFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringFromJsonObject.js +9 -0
- package/dist/generators/ts/_snippets/snippets_stringFromJsonString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringFromJsonString.js +6 -0
- package/dist/generators/ts/_snippets/snippets_termFromJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termFromJsonObject.js +31 -0
- package/dist/generators/ts/_snippets/snippets_termToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termToJsonObject.js +14 -0
- package/dist/generators/ts/_snippets/snippets_typedLiteralToJsonObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_typedLiteralToJsonObject.js +5 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.js +23 -3
- package/dist/generators/ts/_snippets/snippets_zValidator.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_zValidator.js +16 -0
- package/dist/generators/ts/rdfjsTermExpression.d.ts +1 -1
- package/dist/generators/ts/rdfjsTermExpression.js +5 -54
- package/dist/input/ShapesGraph.d.ts +7 -3
- package/dist/input/ShapesGraph.js +74 -3
- package/dist/input/index.d.ts +3 -1
- package/dist/input/index.js +1 -1
- package/dist/input/input.shaclmate.d.ts +1494 -240
- package/dist/input/input.shaclmate.js +1159 -387
- package/dist/input/input.shaclmate.ttl +245 -0
- package/package.json +331 -98
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonFunctionExpression.d.ts +0 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_fromJsonFunctionExpression.js +0 -14
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonSchemaExpression.d.ts +0 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonSchemaExpression.js +0 -32
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonTypeLiteral.d.ts +0 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_jsonTypeLiteral.js +0 -26
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonFunctionExpression.d.ts +0 -5
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toJsonFunctionExpression.js +0 -10
- package/dist/generators/ts/_AbstractDiscriminatedUnionType/AbstractDiscriminatedUnionType_toRdfResourceValuesFunctionExpression.js +0 -30
- package/dist/generators/ts/_AbstractType/AbstractType_DiscriminantProperty.d.ts +0 -9
- package/dist/generators/ts/_AbstractType/AbstractType_DiscriminantProperty.js +0 -2
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlConstructTriplesFunctionDeclaration.js +0 -13
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_focusSparqlWherePatternsFunctionDeclaration.js +0 -32
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_fromRdfResourceFunctionDeclaration.js +0 -17
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_graphqlTypeVariableStatement.js +0 -16
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_identifierTypeDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_identifierTypeDeclarations.js +0 -14
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_schemaVariableStatement.d.ts +0 -4
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_toRdfResourceFunctionDeclaration.js +0 -15
- package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_typeGuardFunctionDeclaration.js +0 -16
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.js +0 -29
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.js +0 -12
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.js +0 -10
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.js +0 -22
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.js +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.js +0 -17
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +0 -10
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +0 -35
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +0 -8
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.js +0 -12
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.js +0 -26
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.js +0 -7
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.js +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunctionExpression.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_typeGuardFunctionExpression.js +0 -14
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js +0 -8
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js +0 -10
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.d.ts +0 -3
- 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 {
|
|
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
|
|
10
|
-
import {
|
|
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
|
-
*
|
|
20
|
+
* Factory for AbstractType.JsonType.
|
|
26
21
|
*/
|
|
27
|
-
readonly
|
|
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
|
|
34
|
+
* A version of this type with an intrinsic discriminant property.
|
|
40
35
|
*/
|
|
41
|
-
abstract readonly
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
*
|
|
99
|
+
* JSON object form of this type.
|
|
97
100
|
*/
|
|
98
|
-
abstract readonly
|
|
101
|
+
abstract readonly jsonObjectType: AbstractType.JsonType & {
|
|
102
|
+
readonly kind: "JsonDiscriminatedUnion" | "JsonIntersection" | "JsonObject";
|
|
103
|
+
};
|
|
99
104
|
/**
|
|
100
|
-
*
|
|
105
|
+
* JSON value form of this type. May be the same as the JSON object form.
|
|
101
106
|
*/
|
|
102
|
-
readonly
|
|
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<
|
|
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:
|
|
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:
|
|
166
|
-
constructor({
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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 {
|
|
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
|
-
*
|
|
20
|
+
* Factory for AbstractType.JsonType.
|
|
25
21
|
*/
|
|
26
|
-
|
|
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({
|
|
40
|
-
|
|
41
|
-
this.
|
|
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
|
|
93
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
16
|
-
return
|
|
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<
|
|
15
|
-
readonly filterFunction:
|
|
15
|
+
readonly conversionFunction: Maybe<AbstractTypedLiteralType.ConversionFunction>;
|
|
16
|
+
readonly filterFunction: ReferenceCallable;
|
|
16
17
|
readonly filterType: Code;
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
graphqlResolveExpression({ variables, }: Parameters<
|
|
25
|
-
|
|
26
|
-
|
|
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 =
|
|
32
|
+
filterFunction = new ReferenceCallable(this.reusables.snippets.filterBigDecimal);
|
|
39
33
|
filterType = code `${this.reusables.snippets.NumericFilter}<${this.reusables.imports.BigDecimal}>`;
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
55
|
-
return code `${
|
|
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
|
|
11
|
-
get
|
|
12
|
-
get
|
|
13
|
-
|
|
14
|
-
|
|
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
|