@shaclmate/compiler 4.0.93 → 4.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +28 -17
- package/dist/generators/ts/AbstractLazyType.js +61 -23
- 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 +10 -24
- package/dist/generators/ts/LazyOptionType.js +5 -26
- package/dist/generators/ts/LazySetType.d.ts +7 -2
- package/dist/generators/ts/LazySetType.js +5 -25
- package/dist/generators/ts/LazyType.d.ts +7 -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_fromRdfResourceValuesFunction.js +57 -0
- 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 +1507 -253
- package/dist/input/input.shaclmate.js +1226 -402
- 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_fromRdfResourceValuesFunctionExpression.js +0 -22
- 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
|
@@ -8,14 +8,47 @@ import { Maybe } from "purify-ts";
|
|
|
8
8
|
import { invariant } from "ts-invariant";
|
|
9
9
|
import { Memoize } from "typescript-memoize";
|
|
10
10
|
import { AbstractIdentifierType } from "./AbstractIdentifierType.js";
|
|
11
|
+
import { InlineCallable } from "./InlineCallable.js";
|
|
12
|
+
import { ReferenceCallable } from "./ReferenceCallable.js";
|
|
11
13
|
import { arrayOf, code, joinCode, literalOf, } from "./ts-poet-wrapper.js";
|
|
12
14
|
export class IriType extends AbstractIdentifierType {
|
|
13
|
-
filterFunction =
|
|
15
|
+
filterFunction = new ReferenceCallable(this.reusables.snippets.filterIri);
|
|
14
16
|
filterType = code `${this.reusables.snippets.IriFilter}`;
|
|
15
17
|
kind = "Iri";
|
|
16
18
|
nodeKinds = nodeKinds;
|
|
17
19
|
schemaType = code `${this.reusables.snippets.IriSchema}<${this.valueTypeExpression}>`;
|
|
18
|
-
valueSparqlWherePatternsFunction =
|
|
20
|
+
valueSparqlWherePatternsFunction = new ReferenceCallable(this.reusables.snippets.iriSparqlWherePatterns);
|
|
21
|
+
get fromJsonValueFunction() {
|
|
22
|
+
return new ReferenceCallable(code `${this.reusables.snippets.iriFromJsonString}<${this.valueTypeExpression}>`);
|
|
23
|
+
}
|
|
24
|
+
get fromJsonObjectFunction() {
|
|
25
|
+
return new ReferenceCallable(code `${this.reusables.snippets.iriFromJsonObject}<${this.valueTypeExpression}>`);
|
|
26
|
+
}
|
|
27
|
+
get toJsonValueFunction() {
|
|
28
|
+
return new ReferenceCallable(code `${this.reusables.snippets.iriToJsonString}<${this.valueTypeExpression}>`);
|
|
29
|
+
}
|
|
30
|
+
get toJsonObjectFunction() {
|
|
31
|
+
return new ReferenceCallable(code `${this.reusables.snippets.iriToJsonObject}<${this.valueTypeExpression}>`);
|
|
32
|
+
}
|
|
33
|
+
get jsonValueType() {
|
|
34
|
+
if (this.in_.length === 0) {
|
|
35
|
+
return super.jsonValueType;
|
|
36
|
+
}
|
|
37
|
+
return this.jsonTypeFactory.createJsonStringType({
|
|
38
|
+
in_: this.in_.map((in_) => in_.value),
|
|
39
|
+
inReference: this.name.isJust() && this.configuration.features.has("Object.schema")
|
|
40
|
+
? code `${this.name.extract()}.schema.in.map(_ => _.value)`
|
|
41
|
+
: undefined,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
get jsonObjectType() {
|
|
45
|
+
if (this.in_.length === 0) {
|
|
46
|
+
return super.jsonObjectType;
|
|
47
|
+
}
|
|
48
|
+
return this.jsonTypeFactory.createJsonObjectType({
|
|
49
|
+
"@id": { type: this.jsonValueType },
|
|
50
|
+
});
|
|
51
|
+
}
|
|
19
52
|
get conversionFunction() {
|
|
20
53
|
invariant(this.jsTypes.length === 1);
|
|
21
54
|
return Maybe.of({
|
|
@@ -37,13 +70,13 @@ export class IriType extends AbstractIdentifierType {
|
|
|
37
70
|
});
|
|
38
71
|
}
|
|
39
72
|
get fromRdfResourceValuesFunction() {
|
|
40
|
-
return code `${this.reusables.snippets.iriFromRdfResourceValues}<${this.valueTypeExpression}
|
|
73
|
+
return new ReferenceCallable(code `${this.reusables.snippets.iriFromRdfResourceValues}<${this.valueTypeExpression}>`);
|
|
41
74
|
}
|
|
42
75
|
get parseFunction() {
|
|
43
76
|
if (this.in_.length > 0) {
|
|
44
|
-
return code `(identifier: string) => ${this.reusables.snippets.parseIri}(identifier).chain((identifier) => { switch (identifier.value) { ${joinCode(this.in_.map((iri) => code `case "${iri.value}": return ${this.reusables.imports.Right}(identifier as ${this.expression});`))} default: return ${this.reusables.imports.Left}(new Error("expected NamedNode identifier to be one of ${this.in_.map((iri) => iri.value).join(" ")}")); } })
|
|
77
|
+
return new InlineCallable(code `(identifier: string) => ${this.reusables.snippets.parseIri}(identifier).chain((identifier) => { switch (identifier.value) { ${joinCode(this.in_.map((iri) => code `case "${iri.value}": return ${this.reusables.imports.Right}(identifier as ${this.expression});`))} default: return ${this.reusables.imports.Left}(new Error("expected NamedNode identifier to be one of ${this.in_.map((iri) => iri.value).join(" ")}")); } })`);
|
|
45
78
|
}
|
|
46
|
-
return
|
|
79
|
+
return new ReferenceCallable(this.reusables.snippets.parseIri);
|
|
47
80
|
}
|
|
48
81
|
get inlineExpression() {
|
|
49
82
|
if (this.in_.length > 0) {
|
|
@@ -87,42 +120,25 @@ export class IriType extends AbstractIdentifierType {
|
|
|
87
120
|
.map((name) => code `${name}["value"]`)
|
|
88
121
|
.orDefaultLazy(() => this.inlineValueTypeExpression);
|
|
89
122
|
}
|
|
90
|
-
fromJsonExpression({ variables, }) {
|
|
91
|
-
return code `${this.reusables.imports.Either}.of<Error, ${this.expression}>(${this.reusables.imports.dataFactory}.namedNode(${variables.value}["@id"]))`;
|
|
92
|
-
}
|
|
93
|
-
jsonSchema({ includeDiscriminantProperty, }) {
|
|
94
|
-
let idSchema;
|
|
95
|
-
if (this.in_.length > 0) {
|
|
96
|
-
const name = this.name.extract();
|
|
97
|
-
if (name && this.configuration.features.has("Object.schema")) {
|
|
98
|
-
// Reuse the type from schema to cut down code
|
|
99
|
-
idSchema = code `${this.reusables.imports.z}.enum(${name}.schema.in.map(_ => _.value))`;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
idSchema = code `${this.reusables.imports.z}.enum(${arrayOf(...this.in_.map((iri) => iri.value))})`;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
idSchema = code `${this.reusables.imports.z}.string().min(1)`;
|
|
107
|
-
}
|
|
108
|
-
const discriminantProperty = includeDiscriminantProperty
|
|
109
|
-
? code `, termType: ${this.reusables.imports.z}.literal("NamedNode")`
|
|
110
|
-
: "";
|
|
111
|
-
return code `${this.reusables.imports.z}.object({ "@id": ${idSchema}${discriminantProperty} })`;
|
|
112
|
-
}
|
|
113
|
-
jsonType(parameters) {
|
|
114
|
-
const discriminantProperty = parameters?.includeDiscriminantProperty
|
|
115
|
-
? `, readonly termType: "NamedNode"`
|
|
116
|
-
: "";
|
|
117
|
-
return new AbstractIdentifierType.JsonType(code `{ readonly "@id": ${this.valueTypeExpression}${discriminantProperty} }`);
|
|
118
|
-
}
|
|
119
|
-
toJsonExpression({ includeDiscriminantProperty, variables, }) {
|
|
120
|
-
const discriminantProperty = includeDiscriminantProperty
|
|
121
|
-
? code `, termType: ${variables.value}.termType`
|
|
122
|
-
: "";
|
|
123
|
-
return code `{ "@id": ${variables.value}.value${discriminantProperty} }`;
|
|
124
|
-
}
|
|
125
123
|
}
|
|
124
|
+
__decorate([
|
|
125
|
+
Memoize()
|
|
126
|
+
], IriType.prototype, "fromJsonValueFunction", null);
|
|
127
|
+
__decorate([
|
|
128
|
+
Memoize()
|
|
129
|
+
], IriType.prototype, "fromJsonObjectFunction", null);
|
|
130
|
+
__decorate([
|
|
131
|
+
Memoize()
|
|
132
|
+
], IriType.prototype, "toJsonValueFunction", null);
|
|
133
|
+
__decorate([
|
|
134
|
+
Memoize()
|
|
135
|
+
], IriType.prototype, "toJsonObjectFunction", null);
|
|
136
|
+
__decorate([
|
|
137
|
+
Memoize()
|
|
138
|
+
], IriType.prototype, "jsonValueType", null);
|
|
139
|
+
__decorate([
|
|
140
|
+
Memoize()
|
|
141
|
+
], IriType.prototype, "jsonObjectType", null);
|
|
126
142
|
__decorate([
|
|
127
143
|
Memoize()
|
|
128
144
|
], IriType.prototype, "conversionFunction", null);
|
|
@@ -141,8 +157,5 @@ __decorate([
|
|
|
141
157
|
__decorate([
|
|
142
158
|
Memoize()
|
|
143
159
|
], IriType.prototype, "valueTypeExpression", null);
|
|
144
|
-
__decorate([
|
|
145
|
-
Memoize()
|
|
146
|
-
], IriType.prototype, "jsonType", null);
|
|
147
160
|
const nodeKinds = new Set(["IRI"]);
|
|
148
161
|
//# sourceMappingURL=IriType.js.map
|
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
import type { Literal } from "@rdfjs/types";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
3
|
import { AbstractLiteralType } from "./AbstractLiteralType.js";
|
|
4
|
+
import { ReferenceCallable } from "./ReferenceCallable.js";
|
|
4
5
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
5
6
|
export declare class LangStringType extends AbstractLiteralType {
|
|
6
7
|
private readonly languageIn;
|
|
7
8
|
protected readonly inlineExpression: Code;
|
|
8
9
|
readonly conversionFunction: Maybe<AbstractLiteralType.ConversionFunction>;
|
|
9
|
-
readonly filterFunction:
|
|
10
|
+
readonly filterFunction: ReferenceCallable;
|
|
10
11
|
readonly filterType: Code;
|
|
11
|
-
readonly
|
|
12
|
+
readonly fromJsonObjectFunction: ReferenceCallable;
|
|
13
|
+
readonly fromJsonValueFunction: ReferenceCallable;
|
|
14
|
+
readonly fromRdfResourceValuesFunction: ReferenceCallable;
|
|
12
15
|
readonly jsTypes: readonly [{
|
|
13
16
|
readonly instanceof: "Object";
|
|
14
17
|
readonly typeof: "object";
|
|
15
18
|
}];
|
|
19
|
+
readonly jsonObjectType: AbstractLiteralType["jsonObjectType"];
|
|
20
|
+
readonly jsonValueType: AbstractLiteralType["jsonValueType"];
|
|
16
21
|
readonly kind = "LangString";
|
|
17
22
|
readonly schemaType: Code;
|
|
18
|
-
readonly
|
|
23
|
+
readonly toJsonObjectFunction: ReferenceCallable;
|
|
24
|
+
readonly toJsonValueFunction: ReferenceCallable;
|
|
25
|
+
readonly valueSparqlWherePatternsFunction: ReferenceCallable;
|
|
19
26
|
constructor({ languageIn, ...superParameters }: {
|
|
20
27
|
languageIn: readonly string[];
|
|
21
28
|
} & ConstructorParameters<typeof AbstractLiteralType>[0]);
|
|
29
|
+
get discriminatedType(): Maybe<AbstractLiteralType.DiscriminatedType>;
|
|
22
30
|
get graphqlType(): AbstractLiteralType.GraphqlType;
|
|
23
31
|
protected get schemaInitializers(): readonly Code[];
|
|
24
|
-
fromJsonExpression({ variables, }: Parameters<AbstractLiteralType["fromJsonExpression"]>[0]): Code;
|
|
25
32
|
graphqlResolveExpression(_parameters: Parameters<AbstractLiteralType["graphqlResolveExpression"]>[0]): Code;
|
|
26
|
-
|
|
27
|
-
jsonType(parameters?: Parameters<AbstractLiteralType["jsonType"]>[0]): AbstractLiteralType.JsonType;
|
|
33
|
+
toLoggableExpression({ variables, }: Parameters<AbstractLiteralType["toLoggableExpression"]>[0]): Code;
|
|
28
34
|
valueExpression(literal: Literal): Code;
|
|
29
|
-
toJsonExpression({ includeDiscriminantProperty, variables, }: Parameters<AbstractLiteralType["toJsonExpression"]>[0]): Code;
|
|
30
35
|
}
|
|
31
36
|
//# sourceMappingURL=LangStringType.d.ts.map
|
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
};
|
|
1
7
|
import { Maybe } from "purify-ts";
|
|
8
|
+
import { Memoize } from "typescript-memoize";
|
|
2
9
|
import { AbstractLiteralType } from "./AbstractLiteralType.js";
|
|
10
|
+
import { ReferenceCallable } from "./ReferenceCallable.js";
|
|
3
11
|
import { arrayOf, code } from "./ts-poet-wrapper.js";
|
|
4
12
|
export class LangStringType extends AbstractLiteralType {
|
|
5
13
|
languageIn;
|
|
@@ -13,19 +21,40 @@ export class LangStringType extends AbstractLiteralType {
|
|
|
13
21
|
},
|
|
14
22
|
],
|
|
15
23
|
});
|
|
16
|
-
filterFunction =
|
|
24
|
+
filterFunction = new ReferenceCallable(this.reusables.snippets.filterLiteral);
|
|
17
25
|
filterType = code `${this.reusables.snippets.LiteralFilter}`;
|
|
18
|
-
|
|
26
|
+
fromJsonObjectFunction = new ReferenceCallable(this.reusables.snippets.langStringFromJsonObject);
|
|
27
|
+
fromJsonValueFunction = this.fromJsonObjectFunction;
|
|
28
|
+
fromRdfResourceValuesFunction = new ReferenceCallable(this.reusables.snippets.langStringFromRdfResourceValues);
|
|
19
29
|
jsTypes = [
|
|
20
30
|
{ instanceof: "Object", typeof: "object" },
|
|
21
31
|
];
|
|
32
|
+
jsonObjectType = this.jsonTypeFactory.createJsonObjectType({
|
|
33
|
+
"@language": {
|
|
34
|
+
type: this.jsonTypeFactory.createJsonStringType({ minLength: 1n }),
|
|
35
|
+
},
|
|
36
|
+
"@value": { type: this.jsonTypeFactory.createJsonStringType() },
|
|
37
|
+
}, { snippet: this.reusables.snippets.LangStringJsonObject });
|
|
38
|
+
jsonValueType = this.jsonObjectType;
|
|
22
39
|
kind = "LangString";
|
|
23
40
|
schemaType = code `${this.reusables.snippets.LangStringSchema}`;
|
|
24
|
-
|
|
41
|
+
toJsonObjectFunction = new ReferenceCallable(this.reusables.snippets.langStringToJsonObject);
|
|
42
|
+
toJsonValueFunction = this.toJsonObjectFunction;
|
|
43
|
+
valueSparqlWherePatternsFunction = new ReferenceCallable(this.reusables.snippets.langStringSparqlWherePatterns);
|
|
25
44
|
constructor({ languageIn, ...superParameters }) {
|
|
26
45
|
super(superParameters);
|
|
27
46
|
this.languageIn = languageIn;
|
|
28
47
|
}
|
|
48
|
+
get discriminatedType() {
|
|
49
|
+
return Maybe.of({
|
|
50
|
+
discriminantProperty: {
|
|
51
|
+
jsonName: "termType",
|
|
52
|
+
name: "termType",
|
|
53
|
+
values: [...this.termTypes],
|
|
54
|
+
},
|
|
55
|
+
expression: this.expression,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
29
58
|
get graphqlType() {
|
|
30
59
|
throw new Error("not implemented");
|
|
31
60
|
}
|
|
@@ -36,29 +65,17 @@ export class LangStringType extends AbstractLiteralType {
|
|
|
36
65
|
}
|
|
37
66
|
return initializers;
|
|
38
67
|
}
|
|
39
|
-
fromJsonExpression({ variables, }) {
|
|
40
|
-
return code `${this.reusables.imports.Either}.of<Error, ${this.expression}>(${this.reusables.imports.dataFactory}.literal(${variables.value}["@value"], ${variables.value}["@language"]))`;
|
|
41
|
-
}
|
|
42
68
|
graphqlResolveExpression(_parameters) {
|
|
43
69
|
throw new Error("not implemented");
|
|
44
70
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
? code `, termType: ${this.reusables.imports.z}.literal("Literal")`
|
|
48
|
-
: "";
|
|
49
|
-
return code `${this.reusables.imports.z}.object({ "@language": ${this.reusables.imports.z}.string()${discriminantProperty}, "@value": ${this.reusables.imports.z}.string() })`;
|
|
50
|
-
}
|
|
51
|
-
jsonType(parameters) {
|
|
52
|
-
const discriminantProperty = parameters?.includeDiscriminantProperty
|
|
53
|
-
? `, readonly termType: "Literal"`
|
|
54
|
-
: "";
|
|
55
|
-
return new AbstractLiteralType.JsonType(code `{ readonly "@language": string${discriminantProperty}, readonly "@value": string }`);
|
|
71
|
+
toLoggableExpression({ variables, }) {
|
|
72
|
+
return code `\`\${JSON.stringify(${variables.value}.value)}@\${${variables.value}.language}\``;
|
|
56
73
|
}
|
|
57
74
|
valueExpression(literal) {
|
|
58
75
|
return this.rdfjsTermExpression(literal);
|
|
59
76
|
}
|
|
60
|
-
toJsonExpression({ includeDiscriminantProperty, variables, }) {
|
|
61
|
-
return code `{ "@language": ${variables.value}.language${includeDiscriminantProperty ? `, "termType": "Literal" as const` : ""}, "@value": ${variables.value}.value }`;
|
|
62
|
-
}
|
|
63
77
|
}
|
|
78
|
+
__decorate([
|
|
79
|
+
Memoize()
|
|
80
|
+
], LangStringType.prototype, "discriminatedType", null);
|
|
64
81
|
//# sourceMappingURL=LangStringType.js.map
|
|
@@ -2,26 +2,10 @@ import { Maybe } from "purify-ts";
|
|
|
2
2
|
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
3
3
|
import type { OptionType } from "./OptionType.js";
|
|
4
4
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} & {
|
|
10
|
-
name: Maybe<string>;
|
|
11
|
-
comment: Maybe<string>;
|
|
12
|
-
configuration: import("./TsGenerator.js").TsGenerator.Configuration;
|
|
13
|
-
label: Maybe<string>;
|
|
14
|
-
logger: import("@rdfx/logger").Logger;
|
|
15
|
-
reusables: import("./Reusables.js").Reusables;
|
|
16
|
-
shapeIdentifier: import("@rdfjs/types").BlankNode | import("@rdfjs/types").NamedNode;
|
|
17
|
-
}) => AbstractLazyType<OptionType<AbstractLazyType.ItemTypeConstraint>, OptionType<AbstractLazyType.ItemTypeConstraint>>) & {
|
|
18
|
-
readonly GraphqlType: typeof import("./_AbstractType/AbstractType_GraphqlType.js").AbstractType_GraphqlType;
|
|
19
|
-
readonly JsonType: typeof import("./_AbstractType/AbstractType_JsonType.js").AbstractType_JsonType;
|
|
20
|
-
ConversionFunction: typeof import("./AbstractType.js").AbstractType.ConversionFunction;
|
|
21
|
-
readonly JsType: typeof import("./_AbstractType/AbstractType_JsType.js").AbstractType_JsType;
|
|
22
|
-
};
|
|
23
|
-
export declare class LazyOptionType extends Super {
|
|
24
|
-
readonly graphqlArgs: Super["graphqlArgs"];
|
|
5
|
+
export declare class LazyOptionType extends AbstractLazyType<OptionType<AbstractLazyType.ItemTypeConstraint>, OptionType<AbstractLazyType.ItemTypeConstraint>> {
|
|
6
|
+
protected readonly partialItemType: AbstractLazyType.ItemTypeConstraint;
|
|
7
|
+
protected readonly resolveItemType: AbstractLazyType.ItemTypeConstraint;
|
|
8
|
+
readonly graphqlArgs: AbstractLazyType<OptionType<AbstractLazyType.ItemTypeConstraint>, OptionType<AbstractLazyType.ItemTypeConstraint>>["graphqlArgs"];
|
|
25
9
|
readonly kind = "LazyOption";
|
|
26
10
|
get conversionFunction(): Maybe<AbstractLazyType.ConversionFunction>;
|
|
27
11
|
protected get runtimeClass(): {
|
|
@@ -29,9 +13,11 @@ export declare class LazyOptionType extends Super {
|
|
|
29
13
|
partialPropertyName: string;
|
|
30
14
|
rawName: Code;
|
|
31
15
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
protected objectSetResolverFunctionExpressions({ variables, }: {
|
|
17
|
+
variables: {
|
|
18
|
+
objectSet: Code;
|
|
19
|
+
};
|
|
20
|
+
}): Code;
|
|
21
|
+
graphqlResolveExpression({ variables, }: Parameters<AbstractLazyType<OptionType<AbstractLazyType.ItemTypeConstraint>, OptionType<AbstractLazyType.ItemTypeConstraint>>["graphqlResolveExpression"]>[0]): Code;
|
|
35
22
|
}
|
|
36
|
-
export {};
|
|
37
23
|
//# sourceMappingURL=LazyOptionType.d.ts.map
|
|
@@ -9,8 +9,9 @@ import { invariant } from "ts-invariant";
|
|
|
9
9
|
import { Memoize } from "typescript-memoize";
|
|
10
10
|
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
11
11
|
import { code } from "./ts-poet-wrapper.js";
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
export class LazyOptionType extends AbstractLazyType {
|
|
13
|
+
partialItemType = this.partialType.itemType;
|
|
14
|
+
resolveItemType = this.resolveType.itemType;
|
|
14
15
|
graphqlArgs = Maybe.empty();
|
|
15
16
|
kind = "LazyOption";
|
|
16
17
|
get conversionFunction() {
|
|
@@ -23,7 +24,6 @@ ${this.reusables.snippets.convertToLazyOption}<
|
|
|
23
24
|
${this.partialType.itemType.expression},
|
|
24
25
|
${this.resolveType.itemType.expression},
|
|
25
26
|
>(
|
|
26
|
-
${this.partialType.itemType.typeGuardFunction.unsafeCoerce()},
|
|
27
27
|
${this.resolveToPartialFunction({ partialType: this.partialType.itemType, resolveType: this.resolveType.itemType })}
|
|
28
28
|
)`,
|
|
29
29
|
sourceTypes: [
|
|
@@ -31,18 +31,10 @@ ${this.reusables.snippets.convertToLazyOption}<
|
|
|
31
31
|
expression: this.expression,
|
|
32
32
|
jsType: this.jsTypes[0],
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
expression: this.partialType.expression,
|
|
36
|
-
jsType: this.partialType.jsTypes[0],
|
|
37
|
-
},
|
|
38
34
|
{
|
|
39
35
|
expression: this.resolveType.expression,
|
|
40
36
|
jsType: this.resolveType.jsTypes[0],
|
|
41
37
|
},
|
|
42
|
-
{
|
|
43
|
-
expression: this.partialType.itemType.expression,
|
|
44
|
-
jsType: this.resolveType.itemType.jsTypes[0],
|
|
45
|
-
},
|
|
46
38
|
{
|
|
47
39
|
expression: this.resolveType.itemType.expression,
|
|
48
40
|
jsType: this.resolveType.itemType.jsTypes[0],
|
|
@@ -61,18 +53,8 @@ ${this.reusables.snippets.convertToLazyOption}<
|
|
|
61
53
|
rawName: code `${this.reusables.snippets.LazyOption}`,
|
|
62
54
|
};
|
|
63
55
|
}
|
|
64
|
-
|
|
65
|
-
return code
|
|
66
|
-
}
|
|
67
|
-
get fromRdfResourceValuesFunction() {
|
|
68
|
-
return code `\
|
|
69
|
-
(
|
|
70
|
-
(
|
|
71
|
-
(values, { objectSet, schema, ...otherOptions }) =>
|
|
72
|
-
${this.partialType.fromRdfResourceValuesFunction}(values, { ...otherOptions, objectSet, schema: schema.partialType })
|
|
73
|
-
.map(values => values.map(${this.runtimeClass.partialPropertyName} => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}, resolver: (partial, options) => objectSet.${this.resolveType.itemType.objectSetMethodNames.object}(partial.${this.configuration.syntheticNamePrefix}identifier(), options) })))
|
|
74
|
-
) satisfies ${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.expression}, ${this.schemaType}>
|
|
75
|
-
)`;
|
|
56
|
+
objectSetResolverFunctionExpressions({ variables, }) {
|
|
57
|
+
return code `(partial, options) => ${variables.objectSet}.${this.resolveItemType.objectSetMethodNames.object}(partial.${this.partialItemType.identifierProperty.unsafeCoerce().name}(), options)`;
|
|
76
58
|
}
|
|
77
59
|
graphqlResolveExpression({ variables, }) {
|
|
78
60
|
return code `${variables.value}.resolve().then(either => either.unsafeCoerce().extractNullable())`;
|
|
@@ -84,7 +66,4 @@ __decorate([
|
|
|
84
66
|
__decorate([
|
|
85
67
|
Memoize()
|
|
86
68
|
], LazyOptionType.prototype, "runtimeClass", null);
|
|
87
|
-
__decorate([
|
|
88
|
-
Memoize()
|
|
89
|
-
], LazyOptionType.prototype, "fromRdfResourceValuesFunction", null);
|
|
90
69
|
//# sourceMappingURL=LazyOptionType.js.map
|
|
@@ -3,16 +3,21 @@ import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
|
3
3
|
import type { SetType } from "./SetType.js";
|
|
4
4
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
5
5
|
export declare class LazySetType extends AbstractLazyType<SetType<AbstractLazyType.ItemTypeConstraint>, SetType<AbstractLazyType.ItemTypeConstraint>> {
|
|
6
|
+
protected readonly partialItemType: AbstractLazyType.ItemTypeConstraint;
|
|
7
|
+
protected readonly resolveItemType: AbstractLazyType.ItemTypeConstraint;
|
|
6
8
|
readonly graphqlArgs: Super["graphqlArgs"];
|
|
7
9
|
readonly kind = "LazySet";
|
|
8
10
|
get conversionFunction(): Maybe<AbstractLazyType.ConversionFunction>;
|
|
11
|
+
protected objectSetResolverFunctionExpressions({ variables, }: {
|
|
12
|
+
variables: {
|
|
13
|
+
objectSet: Code;
|
|
14
|
+
};
|
|
15
|
+
}): Code;
|
|
9
16
|
protected get runtimeClass(): {
|
|
10
17
|
name: Code;
|
|
11
18
|
partialPropertyName: string;
|
|
12
19
|
rawName: Code;
|
|
13
20
|
};
|
|
14
|
-
fromJsonExpression(parameters: Parameters<Super["fromJsonExpression"]>[0]): Code;
|
|
15
|
-
get fromRdfResourceValuesFunction(): Code;
|
|
16
21
|
graphqlResolveExpression({ variables, }: Parameters<Super["graphqlResolveExpression"]>[0]): Code;
|
|
17
22
|
}
|
|
18
23
|
type Super = AbstractLazyType<SetType<AbstractLazyType.ItemTypeConstraint>, SetType<AbstractLazyType.ItemTypeConstraint>>;
|
|
@@ -10,6 +10,8 @@ import { Memoize } from "typescript-memoize";
|
|
|
10
10
|
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
11
11
|
import { code } from "./ts-poet-wrapper.js";
|
|
12
12
|
export class LazySetType extends AbstractLazyType {
|
|
13
|
+
partialItemType = this.partialType.itemType;
|
|
14
|
+
resolveItemType = this.resolveType.itemType;
|
|
13
15
|
graphqlArgs = Maybe.of({
|
|
14
16
|
limit: {
|
|
15
17
|
type: code `${this.reusables.imports.GraphQLInt}`,
|
|
@@ -28,7 +30,6 @@ ${this.reusables.snippets.convertToLazySet}<
|
|
|
28
30
|
${this.partialType.itemType.expression},
|
|
29
31
|
${this.resolveType.itemType.expression}
|
|
30
32
|
>(
|
|
31
|
-
${this.partialType.itemType.typeGuardFunction.unsafeCoerce()},
|
|
32
33
|
${this.resolveToPartialFunction({ partialType: this.partialType.itemType, resolveType: this.resolveType.itemType })}
|
|
33
34
|
)`,
|
|
34
35
|
sourceTypes: [
|
|
@@ -36,18 +37,10 @@ ${this.reusables.snippets.convertToLazySet}<
|
|
|
36
37
|
expression: this.expression,
|
|
37
38
|
jsType: this.jsTypes[0],
|
|
38
39
|
},
|
|
39
|
-
{
|
|
40
|
-
expression: this.partialType.expression,
|
|
41
|
-
jsType: this.partialType.jsTypes[0],
|
|
42
|
-
},
|
|
43
40
|
{
|
|
44
41
|
expression: this.resolveType.expression,
|
|
45
42
|
jsType: this.resolveType.jsTypes[0],
|
|
46
43
|
},
|
|
47
|
-
{
|
|
48
|
-
expression: this.partialType.itemType.expression,
|
|
49
|
-
jsType: this.partialType.itemType.jsTypes[0],
|
|
50
|
-
},
|
|
51
44
|
{
|
|
52
45
|
expression: this.resolveType.itemType.expression,
|
|
53
46
|
jsType: this.resolveType.itemType.jsTypes[0],
|
|
@@ -59,6 +52,9 @@ ${this.reusables.snippets.convertToLazySet}<
|
|
|
59
52
|
],
|
|
60
53
|
});
|
|
61
54
|
}
|
|
55
|
+
objectSetResolverFunctionExpressions({ variables, }) {
|
|
56
|
+
return code `(partials, options) => ${variables.objectSet}.${this.resolveType.itemType.objectSetMethodNames.objects}({ identifiers: partials.map(partial => partial.${this.partialItemType.identifierProperty.unsafeCoerce().name}()), ...options })`;
|
|
57
|
+
}
|
|
62
58
|
get runtimeClass() {
|
|
63
59
|
return {
|
|
64
60
|
name: code `${this.reusables.snippets.LazySet}<${this.partialType.itemType.expression}, ${this.resolveType.itemType.expression}>`,
|
|
@@ -66,19 +62,6 @@ ${this.reusables.snippets.convertToLazySet}<
|
|
|
66
62
|
rawName: code `${this.reusables.snippets.LazySet}`,
|
|
67
63
|
};
|
|
68
64
|
}
|
|
69
|
-
fromJsonExpression(parameters) {
|
|
70
|
-
return code `${this.partialType.fromJsonExpression(parameters)}.map(partials => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}: partials, resolver: () => Promise.resolve(${this.reusables.imports.Left}(new Error("unable to resolve partials deserialized from JSON"))) }))`;
|
|
71
|
-
}
|
|
72
|
-
get fromRdfResourceValuesFunction() {
|
|
73
|
-
return code `\
|
|
74
|
-
(
|
|
75
|
-
(
|
|
76
|
-
(values, { objectSet, schema, ...otherOptions }) =>
|
|
77
|
-
${this.partialType.fromRdfResourceValuesFunction}(values, { ...otherOptions, objectSet, schema: schema.partialType })
|
|
78
|
-
.map(values => values.map(${this.runtimeClass.partialPropertyName} => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}, resolver: (partials, options) => objectSet.${this.resolveType.itemType.objectSetMethodNames.objects}({ identifiers: partials.map(partial => partial.${this.configuration.syntheticNamePrefix}identifier()), ...options }) })))
|
|
79
|
-
) satisfies ${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.expression}, ${this.schemaType}>
|
|
80
|
-
)`;
|
|
81
|
-
}
|
|
82
65
|
graphqlResolveExpression({ variables, }) {
|
|
83
66
|
return code `(${variables.value}.resolve({ limit: ${variables.args}.limit, offset: ${variables.args}.offset })).then(either => either.unsafeCoerce())`;
|
|
84
67
|
}
|
|
@@ -89,7 +72,4 @@ __decorate([
|
|
|
89
72
|
__decorate([
|
|
90
73
|
Memoize()
|
|
91
74
|
], LazySetType.prototype, "runtimeClass", null);
|
|
92
|
-
__decorate([
|
|
93
|
-
Memoize()
|
|
94
|
-
], LazySetType.prototype, "fromRdfResourceValuesFunction", null);
|
|
95
75
|
//# sourceMappingURL=LazySetType.js.map
|
|
@@ -2,6 +2,8 @@ import { Maybe } from "purify-ts";
|
|
|
2
2
|
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
3
3
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
4
4
|
export declare class LazyType extends AbstractLazyType<AbstractLazyType.ItemTypeConstraint, AbstractLazyType.ItemTypeConstraint> {
|
|
5
|
+
protected readonly partialItemType: AbstractLazyType.ItemTypeConstraint;
|
|
6
|
+
protected readonly resolveItemType: AbstractLazyType.ItemTypeConstraint;
|
|
5
7
|
readonly graphqlArgs: Super["graphqlArgs"];
|
|
6
8
|
readonly kind = "Lazy";
|
|
7
9
|
get conversionFunction(): Maybe<AbstractLazyType.ConversionFunction>;
|
|
@@ -10,9 +12,12 @@ export declare class LazyType extends AbstractLazyType<AbstractLazyType.ItemType
|
|
|
10
12
|
partialPropertyName: string;
|
|
11
13
|
rawName: Code;
|
|
12
14
|
};
|
|
13
|
-
fromJsonExpression(parameters: Parameters<Super["fromJsonExpression"]>[0]): Code;
|
|
14
|
-
get fromRdfResourceValuesFunction(): Code;
|
|
15
15
|
graphqlResolveExpression({ variables, }: Parameters<Super["graphqlResolveExpression"]>[0]): Code;
|
|
16
|
+
protected objectSetResolverFunctionExpressions({ variables, }: {
|
|
17
|
+
variables: {
|
|
18
|
+
objectSet: Code;
|
|
19
|
+
};
|
|
20
|
+
}): Code;
|
|
16
21
|
}
|
|
17
22
|
type Super = AbstractLazyType<AbstractLazyType.ItemTypeConstraint, AbstractLazyType.ItemTypeConstraint>;
|
|
18
23
|
export {};
|
|
@@ -10,6 +10,8 @@ import { Memoize } from "typescript-memoize";
|
|
|
10
10
|
import { AbstractLazyType } from "./AbstractLazyType.js";
|
|
11
11
|
import { code } from "./ts-poet-wrapper.js";
|
|
12
12
|
export class LazyType extends AbstractLazyType {
|
|
13
|
+
partialItemType = this.partialType;
|
|
14
|
+
resolveItemType = this.resolveType;
|
|
13
15
|
graphqlArgs = Maybe.empty();
|
|
14
16
|
kind = "Lazy";
|
|
15
17
|
get conversionFunction() {
|
|
@@ -21,7 +23,6 @@ ${this.reusables.snippets.convertToLazy}<
|
|
|
21
23
|
${this.partialType.expression},
|
|
22
24
|
${this.resolveType.expression}
|
|
23
25
|
>(
|
|
24
|
-
${this.partialType.typeGuardFunction.unsafeCoerce()},
|
|
25
26
|
${this.resolveToPartialFunction({ partialType: this.partialType, resolveType: this.resolveType })}
|
|
26
27
|
)`,
|
|
27
28
|
sourceTypes: [
|
|
@@ -29,10 +30,6 @@ ${this.reusables.snippets.convertToLazy}<
|
|
|
29
30
|
expression: this.expression,
|
|
30
31
|
jsType: this.jsTypes[0],
|
|
31
32
|
},
|
|
32
|
-
{
|
|
33
|
-
expression: this.partialType.expression,
|
|
34
|
-
jsType: this.partialType.jsTypes[0],
|
|
35
|
-
},
|
|
36
33
|
{
|
|
37
34
|
expression: this.resolveType.expression,
|
|
38
35
|
jsType: this.resolveType.jsTypes[0],
|
|
@@ -47,22 +44,12 @@ ${this.reusables.snippets.convertToLazy}<
|
|
|
47
44
|
rawName: code `${this.reusables.snippets.Lazy}`,
|
|
48
45
|
};
|
|
49
46
|
}
|
|
50
|
-
fromJsonExpression(parameters) {
|
|
51
|
-
return code `${this.partialType.fromJsonExpression(parameters)}.map(partial => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}: partial, resolver: (partial) => Promise.resolve(${this.reusables.imports.Left}(new Error(\`unable to resolve \${partial} deserialized from JSON\`))) }))`;
|
|
52
|
-
}
|
|
53
|
-
get fromRdfResourceValuesFunction() {
|
|
54
|
-
return code `\
|
|
55
|
-
(
|
|
56
|
-
(
|
|
57
|
-
(values, { objectSet, schema, ...otherOptions }) =>
|
|
58
|
-
${this.partialType.fromRdfResourceValuesFunction}(values, { ...otherOptions, objectSet, schema: schema.partialType })
|
|
59
|
-
.map(values => values.map(${this.runtimeClass.partialPropertyName} => new ${this.runtimeClass.name}({ ${this.runtimeClass.partialPropertyName}, resolver: (partial, options) => objectSet.${this.resolveType.objectSetMethodNames.object}(partial.${this.configuration.syntheticNamePrefix}identifier(), options) })))
|
|
60
|
-
) satisfies ${this.reusables.snippets.FromRdfResourceValuesFunction}<${this.expression}, ${this.schemaType}>
|
|
61
|
-
)`;
|
|
62
|
-
}
|
|
63
47
|
graphqlResolveExpression({ variables, }) {
|
|
64
48
|
return code `${variables.value}.resolve().then(either => either.unsafeCoerce())`;
|
|
65
49
|
}
|
|
50
|
+
objectSetResolverFunctionExpressions({ variables, }) {
|
|
51
|
+
return code `(partial, options) => ${variables.objectSet}.${this.resolveItemType.objectSetMethodNames.object}(partial.${this.partialItemType.identifierProperty.unsafeCoerce().name}(), options)`;
|
|
52
|
+
}
|
|
66
53
|
}
|
|
67
54
|
__decorate([
|
|
68
55
|
Memoize()
|
|
@@ -70,7 +57,4 @@ __decorate([
|
|
|
70
57
|
__decorate([
|
|
71
58
|
Memoize()
|
|
72
59
|
], LazyType.prototype, "runtimeClass", null);
|
|
73
|
-
__decorate([
|
|
74
|
-
Memoize()
|
|
75
|
-
], LazyType.prototype, "fromRdfResourceValuesFunction", null);
|
|
76
60
|
//# sourceMappingURL=LazyType.js.map
|
|
@@ -5,6 +5,7 @@ import type { BigDecimalType } from "./BigDecimalType.js";
|
|
|
5
5
|
import type { BigIntType } from "./BigIntType.js";
|
|
6
6
|
import type { BlankNodeType } from "./BlankNodeType.js";
|
|
7
7
|
import type { BooleanType } from "./BooleanType.js";
|
|
8
|
+
import type { Callable } from "./Callable.js";
|
|
8
9
|
import type { DateTimeType } from "./DateTimeType.js";
|
|
9
10
|
import type { DateType } from "./DateType.js";
|
|
10
11
|
import type { DiscriminatedUnionType } from "./DiscriminatedUnionType.js";
|
|
@@ -15,6 +16,7 @@ import type { IriType } from "./IriType.js";
|
|
|
15
16
|
import type { LangStringType } from "./LangStringType.js";
|
|
16
17
|
import type { LiteralType } from "./LiteralType.js";
|
|
17
18
|
import type { ObjectDiscriminatedUnionType } from "./ObjectDiscriminatedUnionType.js";
|
|
19
|
+
import type { ObjectIntersectionType } from "./ObjectIntersectionType.js";
|
|
18
20
|
import type { ObjectType } from "./ObjectType.js";
|
|
19
21
|
import type { StringType } from "./StringType.js";
|
|
20
22
|
import type { TermType } from "./TermType.js";
|
|
@@ -32,19 +34,22 @@ export declare class ListType<ItemTypeT extends ListType.ItemType> extends Abstr
|
|
|
32
34
|
identifierNodeKind: ListType<ItemTypeT>["identifierNodeKind"];
|
|
33
35
|
toRdfTypes: readonly NamedNode[];
|
|
34
36
|
} & ConstructorParameters<typeof AbstractCollectionType<ItemTypeT>>[0]);
|
|
37
|
+
get jsonValueType(): AbstractCollectionType<ItemTypeT>["jsonValueType"];
|
|
35
38
|
get conversionFunction(): Maybe<AbstractCollectionType.ConversionFunction>;
|
|
36
|
-
get
|
|
39
|
+
get jsonObjectType(): AbstractCollectionType<ItemTypeT>["jsonObjectType"];
|
|
40
|
+
get fromJsonValueFunction(): AbstractCollectionType<ItemTypeT>["fromJsonValueFunction"];
|
|
41
|
+
get fromJsonObjectFunction(): AbstractCollectionType<ItemTypeT>["fromJsonObjectFunction"];
|
|
42
|
+
get fromRdfResourceValuesFunction(): Callable;
|
|
43
|
+
get toJsonValueFunction(): AbstractCollectionType<ItemTypeT>["toJsonValueFunction"];
|
|
44
|
+
get toJsonObjectFunction(): AbstractCollectionType<ItemTypeT>["toJsonObjectFunction"];
|
|
37
45
|
get toRdfResourceValueTypes(): AbstractCollectionType<ItemTypeT>["toRdfResourceValueTypes"];
|
|
38
|
-
get valueSparqlConstructTriplesFunction():
|
|
39
|
-
get valueSparqlWherePatternsFunction():
|
|
40
|
-
fromJsonExpression({ variables, }: Parameters<AbstractCollectionType<ItemTypeT>["fromJsonExpression"]>[0]): Code;
|
|
41
|
-
jsonSchema(parameters: Parameters<AbstractCollectionType<ItemTypeT>["jsonSchema"]>[0]): Code;
|
|
42
|
-
jsonType(): AbstractCollectionType.JsonType;
|
|
46
|
+
get valueSparqlConstructTriplesFunction(): Callable;
|
|
47
|
+
get valueSparqlWherePatternsFunction(): Callable;
|
|
43
48
|
toRdfResourceValuesExpression({ variables, }: Parameters<AbstractCollectionType<ItemTypeT>["toRdfResourceValuesExpression"]>[0]): Code;
|
|
44
49
|
toStringExpression({ variables, }: Parameters<AbstractCollectionType<ItemTypeT>["toStringExpression"]>[0]): Code;
|
|
45
50
|
}
|
|
46
51
|
export declare namespace ListType {
|
|
47
|
-
type ItemType = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DiscriminatedUnionType | FloatType | IdentifierType | IntType | IriType | LangStringType | ListType<ListType.ItemType> | LiteralType | ObjectDiscriminatedUnionType | ObjectType | StringType | TermType;
|
|
52
|
+
type ItemType = BigDecimalType | BigIntType | BlankNodeType | BooleanType | DateTimeType | DateType | DiscriminatedUnionType | FloatType | IdentifierType | IntType | IriType | LangStringType | ListType<ListType.ItemType> | LiteralType | ObjectDiscriminatedUnionType | ObjectIntersectionType | ObjectType | StringType | TermType;
|
|
48
53
|
function isItemType(type: Type): type is ItemType;
|
|
49
54
|
}
|
|
50
55
|
//# sourceMappingURL=ListType.d.ts.map
|