@shaclmate/compiler 4.0.29 → 4.0.31
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/_ShapesGraphToAstTransformer/shapeAstTypeName.js +0 -4
- package/dist/generators/ts/AbstractCollectionType.js +13 -15
- package/dist/generators/ts/AbstractDateType.js +6 -8
- package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
- package/dist/generators/ts/AbstractIdentifierType.js +9 -5
- package/dist/generators/ts/AbstractLazyObjectType.d.ts +2 -3
- package/dist/generators/ts/AbstractLazyObjectType.js +2 -5
- package/dist/generators/ts/AbstractLiteralType.js +2 -3
- package/dist/generators/ts/AbstractNamedUnionType.js +39 -41
- package/dist/generators/ts/AbstractNumericType.js +8 -11
- package/dist/generators/ts/AbstractPrimitiveType.js +1 -2
- package/dist/generators/ts/AbstractTermType.js +12 -14
- package/dist/generators/ts/AbstractType.d.ts +9 -2
- package/dist/generators/ts/AbstractType.js +15 -5
- package/dist/generators/ts/AbstractUnionType.d.ts +3 -0
- package/dist/generators/ts/AbstractUnionType.js +37 -28
- package/dist/generators/ts/BigDecimalType.d.ts +3 -3
- package/dist/generators/ts/BigDecimalType.js +24 -21
- package/dist/generators/ts/BigIntType.d.ts +1 -1
- package/dist/generators/ts/BigIntType.js +9 -5
- package/dist/generators/ts/BlankNodeType.js +9 -11
- package/dist/generators/ts/BooleanType.d.ts +1 -1
- package/dist/generators/ts/BooleanType.js +13 -11
- package/dist/generators/ts/DateTimeType.d.ts +1 -1
- package/dist/generators/ts/DateTimeType.js +14 -3
- package/dist/generators/ts/DateType.d.ts +1 -1
- package/dist/generators/ts/DateType.js +14 -3
- package/dist/generators/ts/DefaultValueType.js +5 -8
- package/dist/generators/ts/FloatType.d.ts +1 -1
- package/dist/generators/ts/FloatType.js +13 -2
- package/dist/generators/ts/IdentifierType.js +9 -11
- package/dist/generators/ts/{imports.d.ts → Imports.d.ts} +3 -3
- package/dist/generators/ts/Imports.js +41 -0
- package/dist/generators/ts/IntType.d.ts +1 -1
- package/dist/generators/ts/IntType.js +13 -2
- package/dist/generators/ts/IriType.js +15 -20
- package/dist/generators/ts/LazyObjectOptionType.d.ts +8 -8
- package/dist/generators/ts/LazyObjectOptionType.js +21 -26
- package/dist/generators/ts/LazyObjectSetType.d.ts +5 -1
- package/dist/generators/ts/LazyObjectSetType.js +12 -20
- package/dist/generators/ts/LazyObjectType.d.ts +5 -1
- package/dist/generators/ts/LazyObjectType.js +20 -18
- package/dist/generators/ts/ListType.js +12 -15
- package/dist/generators/ts/LiteralType.js +8 -10
- package/dist/generators/ts/NamedObjectType.d.ts +1 -3
- package/dist/generators/ts/NamedObjectType.js +33 -32
- package/dist/generators/ts/NamedObjectUnionType.js +37 -29
- package/dist/generators/ts/OptionType.js +13 -15
- package/dist/generators/ts/Reusables.d.ts +11 -0
- package/dist/generators/ts/Reusables.js +14 -0
- package/dist/generators/ts/SetType.js +4 -6
- package/dist/generators/ts/Snippet.d.ts +3 -0
- package/dist/generators/ts/Snippet.js +2 -0
- package/dist/generators/ts/SnippetFactory.d.ts +14 -0
- package/dist/generators/ts/SnippetFactory.js +2 -0
- package/dist/generators/ts/Snippets.d.ts +126 -0
- package/dist/generators/ts/Snippets.js +825 -0
- package/dist/generators/ts/StringType.d.ts +2 -2
- package/dist/generators/ts/StringType.js +14 -12
- package/dist/generators/ts/TermType.js +14 -17
- package/dist/generators/ts/TsGenerator.d.ts +7 -1
- package/dist/generators/ts/TsGenerator.js +90 -14
- package/dist/generators/ts/TypeFactory.d.ts +4 -1
- package/dist/generators/ts/TypeFactory.js +29 -3
- package/dist/generators/ts/ZodGenerator.d.ts +1 -0
- package/dist/generators/ts/ZodGenerator.js +10 -8
- package/dist/generators/ts/_NamedObjectType/AbstractProperty.d.ts +9 -4
- package/dist/generators/ts/_NamedObjectType/AbstractProperty.js +10 -1
- package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.d.ts +2 -2
- package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.js +17 -24
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.d.ts +1 -1
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.js +10 -14
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +3 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js +7 -11
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js +11 -15
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +21 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +83 -8
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.js +1 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.js +4 -6
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js +3 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js +1 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +2 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js +4 -7
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +2 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js +14 -23
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js +4 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js +3 -5
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.d.ts +1 -1
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.js +12 -15
- package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.js +4 -5
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_DateFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_DateFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_DateSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_EqualsResult.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_EqualsResult.js +1 -3
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +2 -5
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_Hasher.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_Hasher.js +1 -2
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.js +1 -3
- package/dist/generators/ts/_snippets/snippets_IriFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IriFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_IriSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IriSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LazyObject.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LazyObject.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.js +2 -5
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_NumericFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_NumericFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_NumericSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +8 -13
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +2 -4
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.js +1 -3
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.js +1 -4
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.js +2 -4
- package/dist/generators/ts/_snippets/snippets_StringFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_StringFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_StringSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_TermFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_TermFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_TermSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_TermSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +9 -5
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +5 -6
- package/dist/generators/ts/_snippets/snippets_UnwrapR.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_UnwrapR.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +3 -6
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.js +12 -0
- package/dist/generators/ts/_snippets/snippets_arrayEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_arrayEquals.js +7 -10
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.js +1 -2
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.js +2 -5
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +11 -19
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +2 -6
- package/dist/generators/ts/_snippets/snippets_booleanEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_booleanEquals.js +4 -6
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +5 -12
- package/dist/generators/ts/_snippets/snippets_compactRecord.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_compactRecord.js +1 -2
- package/dist/generators/ts/_snippets/snippets_dateEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_dateEquals.js +4 -6
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +9 -17
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.js +1 -3
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.js +3 -5
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +3 -7
- package/dist/generators/ts/_snippets/snippets_filterArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterArray.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterBoolean.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterBoolean.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterDate.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterDate.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterIri.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterIri.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterLiteral.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterLiteral.js +3 -7
- package/dist/generators/ts/_snippets/snippets_filterMaybe.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterMaybe.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterNumeric.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterNumeric.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterString.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterString.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterTerm.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +2 -5
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +1 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.js +1 -3
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +4 -10
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +5 -12
- package/dist/generators/ts/_snippets/snippets_isReadonlyBigIntArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyBigIntArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyBooleanArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyBooleanArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyNumberArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyNumberArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyObjectArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyObjectArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyStringArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyStringArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.js +4 -7
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +6 -12
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +9 -18
- package/dist/generators/ts/_snippets/snippets_literalFactory.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_literalFactory.js +1 -3
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.js +7 -13
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +3 -8
- package/dist/generators/ts/_snippets/snippets_maybeEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_maybeEquals.js +5 -8
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +2 -6
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +4 -9
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.js +9 -14
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +9 -17
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.js +2 -5
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.js +1 -3
- package/dist/generators/ts/_snippets/snippets_parseIri.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_parseIri.js +2 -5
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +2 -6
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +3 -8
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.js +2 -5
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +4 -9
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +8 -15
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.js +5 -7
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.js +3 -6
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +3 -6
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.js +3 -7
- package/dist/generators/ts/_snippets/snippets_strictEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_strictEquals.js +4 -6
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +7 -15
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.js +4 -9
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.js +6 -11
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +3 -9
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.js +10 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.js +14 -0
- package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +2 -1
- package/dist/generators/ts/graphqlSchemaVariableStatement.js +13 -14
- package/dist/generators/ts/objectSetDeclarations.d.ts +2 -1
- package/dist/generators/ts/objectSetDeclarations.js +3 -3
- package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +2 -1
- package/dist/generators/ts/objectSetInterfaceDeclaration.js +4 -5
- package/dist/generators/ts/objectSetMethodSignatures.d.ts +2 -1
- package/dist/generators/ts/objectSetMethodSignatures.js +4 -5
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +2 -1
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +49 -51
- package/dist/generators/ts/rdfjsTermExpression.d.ts +6 -2
- package/dist/generators/ts/rdfjsTermExpression.js +13 -15
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +2 -1
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +43 -45
- package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.d.ts +2 -1
- package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.js +6 -7
- package/dist/input/ShapesGraph.d.ts +4 -4
- package/dist/input/ShapesGraph.js +4 -4
- package/dist/input/generated.d.ts +184 -267
- package/dist/input/generated.js +721 -779
- package/package.json +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.js +0 -38
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.js +0 -101
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +0 -2
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +0 -15
- package/dist/generators/ts/imports.js +0 -41
- package/dist/generators/ts/snippets.d.ts +0 -110
- package/dist/generators/ts/snippets.js +0 -217
- package/dist/generators/ts/synthesizeUberObjectUnionType.d.ts +0 -11
- package/dist/generators/ts/synthesizeUberObjectUnionType.js +0 -68
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { snippets } from "../snippets.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
4
2
|
const hasherVariable = code `_hasher`;
|
|
5
3
|
export function NamedObjectType_hashFunctionDeclarations() {
|
|
@@ -20,9 +18,9 @@ export function NamedObjectType_hashFunctionDeclarations() {
|
|
|
20
18
|
const hashShaclPropertiesStatements = [];
|
|
21
19
|
const hashStatements = [];
|
|
22
20
|
for (const parentObjectType of this.parentObjectTypes) {
|
|
23
|
-
hashShaclPropertiesStatements.push(code `${parentObjectType.name}
|
|
21
|
+
hashShaclPropertiesStatements.push(code `${parentObjectType.name}.hashShaclProperties(${this.thisVariable}, ${hasherVariable});`);
|
|
24
22
|
}
|
|
25
|
-
hashStatements.push(code `${this.name}
|
|
23
|
+
hashStatements.push(code `${this.name}.hashShaclProperties(${this.thisVariable}, ${hasherVariable});`);
|
|
26
24
|
hashShaclPropertiesStatements.push(...hashOwnShaclPropertiesStatements);
|
|
27
25
|
hashShaclPropertiesStatements.push(code `return ${hasherVariable};`);
|
|
28
26
|
hashStatements.push(...this.properties
|
|
@@ -37,11 +35,11 @@ export function NamedObjectType_hashFunctionDeclarations() {
|
|
|
37
35
|
hashStatements.push(code `return ${hasherVariable};`);
|
|
38
36
|
return [
|
|
39
37
|
code `\
|
|
40
|
-
export function
|
|
38
|
+
export function hash<HasherT extends ${this.reusables.snippets.Hasher}>(${this.thisVariable}: ${this.name}, ${hasherVariable}: HasherT): HasherT {
|
|
41
39
|
${joinCode(hashStatements)}
|
|
42
40
|
}`,
|
|
43
41
|
code `\
|
|
44
|
-
export function
|
|
42
|
+
export function hashShaclProperties<HasherT extends ${this.reusables.snippets.Hasher}>(${this.thisVariable}: ${this.name}, ${hasherVariable}: HasherT): HasherT {
|
|
45
43
|
${joinCode(hashShaclPropertiesStatements)}
|
|
46
44
|
}`,
|
|
47
45
|
];
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { imports } from "../imports.js";
|
|
3
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
4
2
|
import { code } from "../ts-poet-wrapper.js";
|
|
5
3
|
export function NamedObjectType_jsonParseFunctionDeclaration() {
|
|
6
4
|
if (!this.features.has("json")) {
|
|
7
5
|
return Maybe.empty();
|
|
8
6
|
}
|
|
9
7
|
return Maybe.of(code `\
|
|
10
|
-
export function parse(json: unknown): ${imports.Either}<Error,
|
|
8
|
+
export function parse(json: unknown): ${this.reusables.imports.Either}<Error, Json> {
|
|
11
9
|
const jsonSafeParseResult = schema().safeParse(json);
|
|
12
|
-
if (!jsonSafeParseResult.success) { return ${imports.Left}(jsonSafeParseResult.error); }
|
|
13
|
-
return ${imports.Right}(jsonSafeParseResult.data);
|
|
10
|
+
if (!jsonSafeParseResult.success) { return ${this.reusables.imports.Left}(jsonSafeParseResult.error); }
|
|
11
|
+
return ${this.reusables.imports.Right}(jsonSafeParseResult.data);
|
|
14
12
|
}`);
|
|
15
13
|
}
|
|
16
14
|
//# sourceMappingURL=NamedObjectType_jsonParseFunctionDeclaration.js.map
|
package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { imports } from "../imports.js";
|
|
3
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
4
2
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
5
3
|
export function NamedObjectType_jsonSchemaFunctionDeclaration() {
|
|
6
4
|
if (!this.features.has("json")) {
|
|
@@ -27,7 +25,7 @@ export function NamedObjectType_jsonSchemaFunctionDeclaration() {
|
|
|
27
25
|
// ${this.properties.every((property) => !property.mutable) ? `.readonly()` : ""}
|
|
28
26
|
return Maybe.of(code `\
|
|
29
27
|
export function schema() {
|
|
30
|
-
return ${imports.z}.object({${joinCode(properties, { on: "," })}}).meta(${meta}) satisfies ${imports.z}.ZodType
|
|
28
|
+
return ${this.reusables.imports.z}.object({${joinCode(properties, { on: "," })}}).meta(${meta}) satisfies ${this.reusables.imports.z}.ZodType<Json>;
|
|
31
29
|
}`);
|
|
32
30
|
}
|
|
33
31
|
//# sourceMappingURL=NamedObjectType_jsonSchemaFunctionDeclaration.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
2
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
4
3
|
export function NamedObjectType_jsonTypeAliasDeclaration() {
|
|
5
4
|
if (!this.features.has("json")) {
|
|
@@ -12,6 +11,6 @@ export function NamedObjectType_jsonTypeAliasDeclaration() {
|
|
|
12
11
|
for (const parentObjectType of this.parentObjectTypes) {
|
|
13
12
|
members.push(code `${parentObjectType.jsonType().name}`);
|
|
14
13
|
}
|
|
15
|
-
return Maybe.of(code `export type
|
|
14
|
+
return Maybe.of(code `export type Json = ${members.length > 0 ? joinCode(members, { on: " & " }) : "object"};`);
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=NamedObjectType_jsonTypeAliasDeclaration.js.map
|
package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
2
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
4
3
|
export function NamedObjectType_jsonUiSchemaFunctionDeclaration() {
|
|
5
4
|
if (!this.features.has("json")) {
|
|
@@ -7,7 +6,7 @@ export function NamedObjectType_jsonUiSchemaFunctionDeclaration() {
|
|
|
7
6
|
}
|
|
8
7
|
const variables = { scopePrefix: code `scopePrefix` };
|
|
9
8
|
const elements = this.parentObjectTypes
|
|
10
|
-
.map((parentObjectType) => code `${parentObjectType.name}
|
|
9
|
+
.map((parentObjectType) => code `${parentObjectType.name}.Json.uiSchema({ scopePrefix })`)
|
|
11
10
|
.concat(this.properties.flatMap((property) => property.jsonUiSchemaElement({ variables }).toList()));
|
|
12
11
|
return Maybe.of(code `\
|
|
13
12
|
export function uiSchema(parameters?: { scopePrefix?: string }): any {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
3
2
|
export function NamedObjectType_schemaVariableStatement() {
|
|
4
3
|
return code `\
|
|
5
|
-
export const
|
|
6
|
-
.map((parentObjectType) => code `...${parentObjectType.name}
|
|
4
|
+
export const schema = { properties: { ${joinCode(this.parentObjectTypes
|
|
5
|
+
.map((parentObjectType) => code `...${parentObjectType.name}.schema.properties`)
|
|
7
6
|
.concat(this.properties.map((property) => code `${property.name}: ${property.schema}`)), { on: ", " })} } } as const;`;
|
|
8
7
|
}
|
|
9
8
|
//# sourceMappingURL=NamedObjectType_schemaVariableStatement.js.map
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
+
import type { Reusables } from "../Reusables.js";
|
|
2
3
|
import type { TsFeature } from "../TsFeature.js";
|
|
3
4
|
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
5
|
export declare function NamedObjectType_sparqlConstructQueryFunctionDeclaration(this: {
|
|
5
6
|
readonly features: ReadonlySet<TsFeature>;
|
|
6
7
|
readonly filterType: Code;
|
|
7
8
|
readonly name: string;
|
|
9
|
+
readonly reusables: Reusables;
|
|
8
10
|
}): Maybe<Code>;
|
|
9
11
|
//# sourceMappingURL=NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { camelCase } from "change-case";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
|
-
import { imports } from "../imports.js";
|
|
4
|
-
import { snippets } from "../snippets.js";
|
|
5
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
6
3
|
import { code } from "../ts-poet-wrapper.js";
|
|
7
4
|
export function NamedObjectType_sparqlConstructQueryFunctionDeclaration() {
|
|
8
5
|
if (!this.features.has("sparql")) {
|
|
9
6
|
return Maybe.empty();
|
|
10
7
|
}
|
|
11
8
|
return Maybe.of(code `\
|
|
12
|
-
export function
|
|
9
|
+
export function sparqlConstructQuery({ filter, ignoreRdfType, preferredLanguages, prefixes, subject, ...queryParameters }: { filter?: ${this.filterType}; ignoreRdfType?: boolean; prefixes?: { [prefix: string]: string }; preferredLanguages?: readonly string[]; subject: ${this.reusables.imports.NamedNode} | ${this.reusables.imports.Variable} } & Omit<${this.reusables.imports.sparqljs}.ConstructQuery, "prefixes" | "queryType" | "type">): ${this.reusables.imports.sparqljs}.ConstructQuery {
|
|
13
10
|
const variablePrefix = subject.termType === "Variable" ? subject.value : "${camelCase(this.name)}";
|
|
14
11
|
|
|
15
12
|
return {
|
|
@@ -17,7 +14,7 @@ export function ${syntheticNamePrefix}sparqlConstructQuery({ filter, ignoreRdfTy
|
|
|
17
14
|
prefixes: prefixes ?? {},
|
|
18
15
|
queryType: "CONSTRUCT",
|
|
19
16
|
template: (queryParameters.template ?? []).concat(
|
|
20
|
-
${this.name}
|
|
17
|
+
${this.name}.focusSparqlConstructTriples({
|
|
21
18
|
filter,
|
|
22
19
|
focusIdentifier: subject,
|
|
23
20
|
ignoreRdfType: !!ignoreRdfType,
|
|
@@ -26,8 +23,8 @@ export function ${syntheticNamePrefix}sparqlConstructQuery({ filter, ignoreRdfTy
|
|
|
26
23
|
),
|
|
27
24
|
type: "query",
|
|
28
25
|
where: (queryParameters.where ?? []).concat(
|
|
29
|
-
${snippets.normalizeSparqlWherePatterns}(
|
|
30
|
-
${this.name}
|
|
26
|
+
${this.reusables.snippets.normalizeSparqlWherePatterns}(
|
|
27
|
+
${this.name}.focusSparqlWherePatterns({
|
|
31
28
|
filter,
|
|
32
29
|
focusIdentifier: subject,
|
|
33
30
|
ignoreRdfType: !!ignoreRdfType,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
+
import type { Reusables } from "../Reusables.js";
|
|
2
3
|
import type { TsFeature } from "../TsFeature.js";
|
|
3
4
|
import { type Code } from "../ts-poet-wrapper.js";
|
|
4
5
|
export declare function NamedObjectType_sparqlConstructQueryStringFunctionDeclaration(this: {
|
|
5
6
|
readonly features: ReadonlySet<TsFeature>;
|
|
6
7
|
readonly filterType: Code;
|
|
7
8
|
readonly name: string;
|
|
9
|
+
readonly reusables: Reusables;
|
|
8
10
|
}): Maybe<Code>;
|
|
9
11
|
//# sourceMappingURL=NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts.map
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { imports } from "../imports.js";
|
|
3
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
4
2
|
import { code } from "../ts-poet-wrapper.js";
|
|
5
3
|
export function NamedObjectType_sparqlConstructQueryStringFunctionDeclaration() {
|
|
6
4
|
if (!this.features.has("sparql")) {
|
|
7
5
|
return Maybe.empty();
|
|
8
6
|
}
|
|
9
7
|
return Maybe.of(code `\
|
|
10
|
-
export function
|
|
11
|
-
return new ${imports.sparqljs}.Generator(parameters).stringify(${this.name}
|
|
8
|
+
export function sparqlConstructQueryString(parameters: Parameters<typeof ${this.name}.sparqlConstructQuery>[0] & ${this.reusables.imports.sparqljs}.GeneratorOptions): string {
|
|
9
|
+
return new ${this.reusables.imports.sparqljs}.Generator(parameters).stringify(${this.name}.sparqlConstructQuery(parameters));
|
|
12
10
|
}`);
|
|
13
11
|
}
|
|
14
12
|
//# sourceMappingURL=NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
2
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
4
3
|
export function NamedObjectType_toJsonFunctionDeclaration() {
|
|
5
4
|
if (!this.features.has("json")) {
|
|
@@ -7,7 +6,7 @@ export function NamedObjectType_toJsonFunctionDeclaration() {
|
|
|
7
6
|
}
|
|
8
7
|
const jsonObjectMembers = [];
|
|
9
8
|
for (const parentObjectType of this.parentObjectTypes) {
|
|
10
|
-
jsonObjectMembers.push(code `...${parentObjectType.name}
|
|
9
|
+
jsonObjectMembers.push(code `...${parentObjectType.name}.toJson(${this.thisVariable})`);
|
|
11
10
|
}
|
|
12
11
|
if (this.properties.length > 0) {
|
|
13
12
|
jsonObjectMembers.push(...this.properties.flatMap((property) => property
|
|
@@ -34,7 +33,7 @@ export function NamedObjectType_toJsonFunctionDeclaration() {
|
|
|
34
33
|
// break;
|
|
35
34
|
// }
|
|
36
35
|
return Maybe.of(code `\
|
|
37
|
-
export function
|
|
36
|
+
export function toJson(${this.thisVariable}: ${this.name}): ${this.jsonType().name} {
|
|
38
37
|
return JSON.parse(JSON.stringify({ ${joinCode(jsonObjectMembers, { on: "," })} } satisfies ${this.jsonType().name}));
|
|
39
38
|
}`);
|
|
40
39
|
}
|
package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js
CHANGED
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
import { rdf } from "@tpluscode/rdf-ns-builders";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
|
-
import { imports } from "../imports.js";
|
|
4
|
-
import { rdfjsTermExpression } from "../rdfjsTermExpression.js";
|
|
5
|
-
import { snippets } from "../snippets.js";
|
|
6
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
7
3
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
8
4
|
export function NamedObjectType_toRdfResourceFunctionDeclaration() {
|
|
9
5
|
if (!this.features.has("rdf")) {
|
|
10
6
|
return Maybe.empty();
|
|
11
7
|
}
|
|
12
|
-
const statements =
|
|
13
|
-
code `const ${variables.resourceSet} = options?.${variables.resourceSet} ?? new ${imports.ResourceSet}({ dataFactory: ${imports.dataFactory}, dataset: ${imports.datasetFactory}.dataset() });`,
|
|
14
|
-
];
|
|
15
|
-
if (this.parentObjectTypes.length > 0) {
|
|
16
|
-
statements.push(code `const ${variables.resource} = ${this.parentObjectTypes[0].name}.${syntheticNamePrefix}toRdfResource(${this.thisVariable}, { ${variables.ignoreRdfType}: true, ${variables.graph}: options?.${variables.graph}, ${variables.resourceSet} });`);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
statements.push(code `const ${variables.resource} = ${variables.resourceSet}.resource(${this.thisVariable}.${syntheticNamePrefix}identifier());`);
|
|
20
|
-
}
|
|
8
|
+
const statements = this.parentObjectTypes.map((parentObjectType) => code `${parentObjectType.name}._toRdfResource({ ...parameters, ignoreRdfType: true });`);
|
|
21
9
|
if (this.toRdfTypes.length > 0) {
|
|
22
|
-
statements.push(code `if (
|
|
10
|
+
statements.push(code `if (!${variables.ignoreRdfType}) { ${joinCode(this.toRdfTypes.map((toRdfType) => code `${variables.resource}.add(${this.rdfjsTermExpression(rdf.type)}, ${this.reusables.imports.dataFactory}.namedNode("${toRdfType.value}"), ${variables.graph});`), { on: " " })} }`);
|
|
23
11
|
}
|
|
24
12
|
for (const property of this.properties) {
|
|
25
13
|
statements.push(...property.toRdfRdfResourceValuesStatements({
|
|
26
14
|
variables: {
|
|
27
|
-
graph:
|
|
15
|
+
graph: variables.graph,
|
|
28
16
|
resource: variables.resource,
|
|
29
17
|
resourceSet: variables.resourceSet,
|
|
30
18
|
value: property.accessExpression({
|
|
31
|
-
variables: { object:
|
|
19
|
+
variables: { object: variables.object },
|
|
32
20
|
}),
|
|
33
21
|
},
|
|
34
22
|
}));
|
|
35
23
|
}
|
|
36
24
|
statements.push(code `return ${variables.resource};`);
|
|
37
25
|
return Maybe.of(code `\
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
}
|
|
26
|
+
export const _toRdfResource: ${this.reusables.snippets._ToRdfResourceFunction}<${this.identifierTypeAlias}, ${this.name}> = (parameters) => {
|
|
27
|
+
${joinCode(statements)}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const toRdfResource = ${this.reusables.snippets.wrap_ToRdfResourceFunction}(_toRdfResource);`);
|
|
41
31
|
}
|
|
42
32
|
const variables = {
|
|
43
|
-
ignoreRdfType: code `ignoreRdfType`,
|
|
44
|
-
graph: code `graph`,
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
ignoreRdfType: code `parameters.ignoreRdfType`,
|
|
34
|
+
graph: code `parameters.graph`,
|
|
35
|
+
object: code `parameters.object`,
|
|
36
|
+
resource: code `parameters.resource`,
|
|
37
|
+
resourceSet: code `parameters.resourceSet`,
|
|
47
38
|
};
|
|
48
39
|
//# sourceMappingURL=NamedObjectType_toRdfResourceFunctionDeclaration.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { snippets } from "../snippets.js";
|
|
2
1
|
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
2
|
import { code, joinCode, literalOf } from "../ts-poet-wrapper.js";
|
|
4
3
|
export function NamedObjectType_toStringFunctionDeclarations() {
|
|
5
4
|
const propertiesToStringRecordProperties = [];
|
|
6
5
|
if (this.parentObjectTypes.length > 0) {
|
|
7
6
|
for (const parentObjectType of this.parentObjectTypes) {
|
|
8
|
-
propertiesToStringRecordProperties.push(code `...${parentObjectType.name}
|
|
7
|
+
propertiesToStringRecordProperties.push(code `...${parentObjectType.name}._propertiesToStrings(${this.thisVariable})`);
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
for (const property of this.properties) {
|
|
@@ -21,19 +20,19 @@ export function NamedObjectType_toStringFunctionDeclarations() {
|
|
|
21
20
|
propertiesToStringRecordProperties.push(code `${literalOf(property.name)}: ${propertyToStringExpression}`);
|
|
22
21
|
});
|
|
23
22
|
}
|
|
24
|
-
const propertiesToStringsReturnExpression = code `${snippets.compactRecord}({${joinCode(propertiesToStringRecordProperties, { on: "," })}})`;
|
|
23
|
+
const propertiesToStringsReturnExpression = code `${this.reusables.snippets.compactRecord}({${joinCode(propertiesToStringRecordProperties, { on: "," })}})`;
|
|
25
24
|
const toStringReturnExpression = (propertiesToStrings) => code `\`${this.name}(\${JSON.stringify(${propertiesToStrings})})\``;
|
|
26
25
|
return [
|
|
27
26
|
// Use overloads to allow the function to be attached to an instance or used freestanding
|
|
28
27
|
code `\
|
|
29
|
-
export function
|
|
28
|
+
export function _propertiesToStrings(${this.thisVariable}: ${this.name}): Record<string, string> {
|
|
30
29
|
return ${propertiesToStringsReturnExpression};
|
|
31
30
|
}`,
|
|
32
31
|
code `\
|
|
33
32
|
export function ${syntheticNamePrefix}toString(this: ${this.name}): string;
|
|
34
33
|
export function ${syntheticNamePrefix}toString(${this.thisVariable}: ${this.name}): string;
|
|
35
34
|
export function ${syntheticNamePrefix}toString(this: ${this.name} | undefined, ${this.thisVariable}?: ${this.name}): string {
|
|
36
|
-
return ${toStringReturnExpression(code
|
|
35
|
+
return ${toStringReturnExpression(code `_propertiesToStrings((${this.thisVariable} ?? this)!)`)};
|
|
37
36
|
}`,
|
|
38
37
|
];
|
|
39
38
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { snippets } from "../snippets.js";
|
|
3
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
4
2
|
import { code } from "../ts-poet-wrapper.js";
|
|
5
3
|
export function NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration() {
|
|
6
4
|
if (!this.features.has("sparql")) {
|
|
7
5
|
return Maybe.empty();
|
|
8
6
|
}
|
|
9
7
|
return Maybe.of(code `\
|
|
10
|
-
export const
|
|
11
|
-
${this.name}
|
|
8
|
+
export const valueSparqlConstructTriples: ${this.reusables.snippets.ValueSparqlConstructTriplesFunction}<${this.filterType}, ${this.schemaType}> = ({ filter, ignoreRdfType, valueVariable, variablePrefix }) =>
|
|
9
|
+
${this.name}.focusSparqlConstructTriples({ filter, focusIdentifier: valueVariable, ignoreRdfType, variablePrefix });`);
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js.map
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
|
-
import { snippets } from "../snippets.js";
|
|
3
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
4
2
|
import { code } from "../ts-poet-wrapper.js";
|
|
5
3
|
export function NamedObjectType_valueSparqlWherePatternsFunctionDeclaration() {
|
|
6
4
|
if (!this.features.has("sparql")) {
|
|
7
5
|
return Maybe.empty();
|
|
8
6
|
}
|
|
9
7
|
return Maybe.of(code `\
|
|
10
|
-
export const
|
|
11
|
-
(propertyPatterns as readonly ${snippets.SparqlPattern}[]).concat(
|
|
12
|
-
${this.name}
|
|
8
|
+
export const valueSparqlWherePatterns: ${this.reusables.snippets.ValueSparqlWherePatternsFunction}<${this.filterType}, ${this.schemaType}> = ({ filter, ignoreRdfType, preferredLanguages, propertyPatterns, valueVariable, variablePrefix }) =>
|
|
9
|
+
(propertyPatterns as readonly ${this.reusables.snippets.SparqlPattern}[]).concat(
|
|
10
|
+
${this.name}.focusSparqlWherePatterns({ filter, focusIdentifier: valueVariable, ignoreRdfType, preferredLanguages, variablePrefix })
|
|
13
11
|
);`);
|
|
14
12
|
}
|
|
15
13
|
//# sourceMappingURL=NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js.map
|
|
@@ -36,7 +36,7 @@ export declare class ShaclProperty<TypeT extends Type> extends AbstractProperty<
|
|
|
36
36
|
type: Code;
|
|
37
37
|
};
|
|
38
38
|
constructorStatements({ variables, }: Parameters<AbstractProperty<TypeT>["constructorStatements"]>[0]): readonly Code[];
|
|
39
|
-
|
|
39
|
+
fromJsonExpression({ variables, }: Parameters<AbstractProperty<TypeT>["fromJsonExpression"]>[0]): Maybe<Code>;
|
|
40
40
|
fromRdfResourceValuesExpression({ variables, }: Parameters<AbstractProperty<TypeT>["fromRdfResourceValuesExpression"]>[0]): Maybe<Code>;
|
|
41
41
|
hashStatements(parameters: Parameters<AbstractProperty<TypeT>["hashStatements"]>[0]): readonly Code[];
|
|
42
42
|
jsonUiSchemaElement({ variables, }: Parameters<AbstractProperty<TypeT>["jsonUiSchemaElement"]>[0]): Maybe<Code>;
|
|
@@ -7,9 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { Maybe } from "purify-ts";
|
|
8
8
|
import { Memoize } from "typescript-memoize";
|
|
9
9
|
import { codeEquals } from "../codeEquals.js";
|
|
10
|
-
import { rdfjsTermExpression } from "../rdfjsTermExpression.js";
|
|
11
|
-
import { snippets } from "../snippets.js";
|
|
12
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
13
10
|
import { code, joinCode, literalOf } from "../ts-poet-wrapper.js";
|
|
14
11
|
import { tsComment } from "../tsComment.js";
|
|
15
12
|
import { AbstractProperty } from "./AbstractProperty.js";
|
|
@@ -126,24 +123,24 @@ export class ShaclProperty extends AbstractProperty {
|
|
|
126
123
|
.concat(code `{ ${this.name} = (${variables.parameter}) satisfies never; }`), { on: " else " }));
|
|
127
124
|
return statements;
|
|
128
125
|
}
|
|
129
|
-
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
fromJsonExpression({ variables, }) {
|
|
127
|
+
return Maybe.of(this.type.fromJsonExpression({
|
|
128
|
+
variables: { value: code `${variables.jsonObject}["${this.name}"]` },
|
|
129
|
+
}));
|
|
133
130
|
}
|
|
134
131
|
fromRdfResourceValuesExpression({ variables, }) {
|
|
135
132
|
// Assume the property has the correct range and ignore the object's RDF type.
|
|
136
133
|
// This also accommodates the case where the object of a property is a dangling identifier that's not the
|
|
137
134
|
// subject of any statements.
|
|
138
|
-
return Maybe.of(code `${snippets.shaclPropertyFromRdf}(${{
|
|
135
|
+
return Maybe.of(code `${this.reusables.snippets.shaclPropertyFromRdf}(${{
|
|
139
136
|
graph: variables.graph,
|
|
140
137
|
resource: variables.resource,
|
|
141
|
-
propertySchema: code
|
|
138
|
+
propertySchema: code `schema.properties.${this.name}`,
|
|
142
139
|
typeFromRdf: code `((resourceValues) => ${this.type.fromRdfResourceValuesExpression({
|
|
143
140
|
variables: {
|
|
144
141
|
...variables,
|
|
145
142
|
ignoreRdfType: true,
|
|
146
|
-
propertyPath: code `${this.namedObjectType.name}
|
|
143
|
+
propertyPath: code `${this.namedObjectType.name}.schema.properties.${this.name}.path`,
|
|
147
144
|
resourceValues: code `resourceValues`,
|
|
148
145
|
},
|
|
149
146
|
})})`,
|
|
@@ -159,21 +156,21 @@ export class ShaclProperty extends AbstractProperty {
|
|
|
159
156
|
.altLazy(() => Maybe.of(code `{ ${this.label.isJust() ? `label: "${this.label.unsafeCoerce()}", ` : ""}scope: ${scope}, type: "Control" }`));
|
|
160
157
|
}
|
|
161
158
|
sparqlConstructTriplesExpression({ variables, }) {
|
|
162
|
-
return Maybe.of(code `${snippets.shaclPropertySparqlConstructTriples}(${{
|
|
159
|
+
return Maybe.of(code `${this.reusables.snippets.shaclPropertySparqlConstructTriples}(${{
|
|
163
160
|
filter: this.filterProperty
|
|
164
161
|
.map(({ name }) => code `${variables.filter}?.${name}`)
|
|
165
162
|
.extract(),
|
|
166
163
|
focusIdentifier: variables.focusIdentifier,
|
|
167
164
|
ignoreRdfType: true,
|
|
168
165
|
propertyName: this.name,
|
|
169
|
-
propertySchema: code
|
|
166
|
+
propertySchema: code `schema.properties.${this.name}`,
|
|
170
167
|
typeSparqlConstructTriples: this.type.valueSparqlConstructTriplesFunction,
|
|
171
168
|
variablePrefix: variables.variablePrefix,
|
|
172
169
|
}})`);
|
|
173
170
|
}
|
|
174
171
|
sparqlWherePatternsExpression({ variables, }) {
|
|
175
172
|
return Maybe.of({
|
|
176
|
-
patterns: code `${snippets.shaclPropertySparqlWherePatterns}(${{
|
|
173
|
+
patterns: code `${this.reusables.snippets.shaclPropertySparqlWherePatterns}(${{
|
|
177
174
|
filter: this.filterProperty
|
|
178
175
|
.map(({ name }) => code `${variables.filter}?.${name}`)
|
|
179
176
|
.extract(),
|
|
@@ -181,7 +178,7 @@ export class ShaclProperty extends AbstractProperty {
|
|
|
181
178
|
ignoreRdfType: true,
|
|
182
179
|
preferredLanguages: variables.preferredLanguages,
|
|
183
180
|
propertyName: this.name,
|
|
184
|
-
propertySchema: code
|
|
181
|
+
propertySchema: code `schema.properties.${this.name}`,
|
|
185
182
|
typeSparqlWherePatterns: this.type.valueSparqlWherePatternsFunction,
|
|
186
183
|
variablePrefix: variables.variablePrefix,
|
|
187
184
|
}})`,
|
|
@@ -226,7 +223,7 @@ export class ShaclProperty extends AbstractProperty {
|
|
|
226
223
|
case "ZeroOrOnePath":
|
|
227
224
|
return code `{ path: ${this.propertyPathToCode(propertyPath.path)}, termType: ${literalOf(propertyPath.termType)} as const }`;
|
|
228
225
|
case "NamedNode":
|
|
229
|
-
return rdfjsTermExpression(propertyPath
|
|
226
|
+
return this.rdfjsTermExpression(propertyPath);
|
|
230
227
|
}
|
|
231
228
|
}
|
|
232
229
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code } from "../ts-poet-wrapper.js";
|
|
3
2
|
export function identifierTypeDeclarations() {
|
|
4
3
|
const ancestorObjectTypeWithSameIdentifierType = this.ancestorObjectTypes.find((ancestorObjectType) => ancestorObjectType.identifierType.name === this.identifierType.name);
|
|
@@ -6,15 +5,15 @@ export function identifierTypeDeclarations() {
|
|
|
6
5
|
// This object type's identifier type has the same identifier type as an ancestor object type,
|
|
7
6
|
// so just reuse the latter.
|
|
8
7
|
return [
|
|
9
|
-
code `export type
|
|
10
|
-
code `export const
|
|
8
|
+
code `export type Identifier = ${ancestorObjectTypeWithSameIdentifierType.identifierTypeAlias};`,
|
|
9
|
+
code `export const Identifier = ${ancestorObjectTypeWithSameIdentifierType.identifierTypeAlias};`,
|
|
11
10
|
];
|
|
12
11
|
}
|
|
13
12
|
// Bespoke identifier type and associated functions
|
|
14
13
|
return [
|
|
15
|
-
code `export type
|
|
14
|
+
code `export type Identifier = ${this.identifierType.name};`,
|
|
16
15
|
code `\
|
|
17
|
-
export namespace
|
|
16
|
+
export namespace Identifier {
|
|
18
17
|
export const parse = ${this.identifierType.parseFunction};
|
|
19
18
|
export const stringify = ${this.identifierType.stringifyFunction};
|
|
20
19
|
}`,
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_BlankNodeFilter: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_BlankNodeFilter.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_BlankNodeFilter = conditionalOutput(`${syntheticNamePrefix}BlankNodeFilter`, code `\
|
|
2
|
+
export const snippets_BlankNodeFilter = ({ syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}BlankNodeFilter`, code `\
|
|
4
3
|
interface ${syntheticNamePrefix}BlankNodeFilter {
|
|
5
4
|
}`);
|
|
6
5
|
//# sourceMappingURL=snippets_BlankNodeFilter.js.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_BlankNodeSchema: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_BlankNodeSchema.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_BlankNodeSchema = conditionalOutput(`${syntheticNamePrefix}BlankNodeSchema`, code `\
|
|
2
|
+
export const snippets_BlankNodeSchema = ({ syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}BlankNodeSchema`, code `\
|
|
4
3
|
interface ${syntheticNamePrefix}BlankNodeSchema {
|
|
5
4
|
readonly kind: "BlankNode";
|
|
6
5
|
}`);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_BooleanFilter: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_BooleanFilter.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_BooleanFilter = conditionalOutput(`${syntheticNamePrefix}BooleanFilter`, code `\
|
|
2
|
+
export const snippets_BooleanFilter = ({ syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}BooleanFilter`, code `\
|
|
4
3
|
interface ${syntheticNamePrefix}BooleanFilter {
|
|
5
4
|
readonly value?: boolean;
|
|
6
5
|
}`);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_BooleanSchema: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_BooleanSchema.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_BooleanSchema = conditionalOutput(`${syntheticNamePrefix}BooleanSchema`, code `\
|
|
2
|
+
export const snippets_BooleanSchema = ({ syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}BooleanSchema`, code `\
|
|
4
3
|
interface ${syntheticNamePrefix}BooleanSchema {
|
|
5
4
|
readonly kind: "Boolean";
|
|
6
5
|
readonly in?: readonly boolean[];
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_CollectionFilter: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_CollectionFilter.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_CollectionFilter = conditionalOutput(`${syntheticNamePrefix}CollectionFilter`, code `\
|
|
2
|
+
export const snippets_CollectionFilter = ({ syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}CollectionFilter`, code `\
|
|
4
3
|
type ${syntheticNamePrefix}CollectionFilter<ItemFilterT> = ItemFilterT & {
|
|
5
4
|
readonly ${syntheticNamePrefix}maxCount?: number;
|
|
6
5
|
readonly ${syntheticNamePrefix}minCount?: number;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_CollectionSchema: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_CollectionSchema.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_CollectionSchema = conditionalOutput(`${syntheticNamePrefix}CollectionSchema`, code `\
|
|
2
|
+
export const snippets_CollectionSchema = ({ syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}CollectionSchema`, code `\
|
|
4
3
|
interface ${syntheticNamePrefix}CollectionSchema<ItemSchemaT> {
|
|
5
4
|
readonly item: () => ItemSchemaT;
|
|
6
5
|
readonly kind: "List" | "Set";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_DateFilter: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_DateFilter.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_DateFilter = conditionalOutput(`${syntheticNamePrefix}DateFilter`, code `\
|
|
2
|
+
export const snippets_DateFilter = ({ syntheticNamePrefix }) => conditionalOutput(`${syntheticNamePrefix}DateFilter`, code `\
|
|
4
3
|
interface ${syntheticNamePrefix}DateFilter {
|
|
5
4
|
readonly in?: readonly Date[];
|
|
6
5
|
readonly maxExclusive?: Date;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_DateSchema: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_DateSchema.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
export const snippets_DateSchema = conditionalOutput(`${syntheticNamePrefix}DateSchema`, code `\
|
|
2
|
+
export const snippets_DateSchema = ({ syntheticNamePrefix }) => conditionalOutput(`${syntheticNamePrefix}DateSchema`, code `\
|
|
4
3
|
interface ${syntheticNamePrefix}DateSchema {
|
|
5
4
|
in?: readonly Date[];
|
|
6
5
|
kind: "Date" | "DateTime",
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_DefaultValueSchema: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_DefaultValueSchema.d.ts.map
|