@itwin/ecschema-editing 5.0.0-dev.90 → 5.0.0-dev.92
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/lib/cjs/Validation/DiagnosticReporter.js +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/esm/Differencing/Errors.d.ts +19 -0
- package/lib/esm/Differencing/Errors.d.ts.map +1 -0
- package/lib/esm/Differencing/Errors.js +26 -0
- package/lib/esm/Differencing/Errors.js.map +1 -0
- package/lib/esm/Differencing/SchemaConflicts.d.ts +84 -0
- package/lib/esm/Differencing/SchemaConflicts.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaConflicts.js +60 -0
- package/lib/esm/Differencing/SchemaConflicts.js.map +1 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts +41 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.js +443 -0
- package/lib/esm/Differencing/SchemaDiagnosticVisitor.js.map +1 -0
- package/lib/esm/Differencing/SchemaDifference.d.ts +357 -0
- package/lib/esm/Differencing/SchemaDifference.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDifference.js +106 -0
- package/lib/esm/Differencing/SchemaDifference.js.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts +18 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.js +521 -0
- package/lib/esm/Differencing/SchemaDifferenceValidator.js.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts +32 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.js +88 -0
- package/lib/esm/Differencing/SchemaDifferenceVisitor.js.map +1 -0
- package/lib/esm/Differencing/Utils.d.ts +110 -0
- package/lib/esm/Differencing/Utils.d.ts.map +1 -0
- package/lib/esm/Differencing/Utils.js +161 -0
- package/lib/esm/Differencing/Utils.js.map +1 -0
- package/lib/esm/Editing/Constants.d.ts +22 -0
- package/lib/esm/Editing/Constants.d.ts.map +1 -0
- package/lib/esm/Editing/Constants.js +55 -0
- package/lib/esm/Editing/Constants.js.map +1 -0
- package/lib/esm/Editing/CustomAttributes.d.ts +22 -0
- package/lib/esm/Editing/CustomAttributes.d.ts.map +1 -0
- package/lib/esm/Editing/CustomAttributes.js +49 -0
- package/lib/esm/Editing/CustomAttributes.js.map +1 -0
- package/lib/esm/Editing/ECClasses.d.ts +86 -0
- package/lib/esm/Editing/ECClasses.d.ts.map +1 -0
- package/lib/esm/Editing/ECClasses.js +294 -0
- package/lib/esm/Editing/ECClasses.js.map +1 -0
- package/lib/esm/Editing/Editor.d.ts +117 -0
- package/lib/esm/Editing/Editor.d.ts.map +1 -0
- package/lib/esm/Editing/Editor.js +264 -0
- package/lib/esm/Editing/Editor.js.map +1 -0
- package/lib/esm/Editing/Entities.d.ts +38 -0
- package/lib/esm/Editing/Entities.d.ts.map +1 -0
- package/lib/esm/Editing/Entities.js +126 -0
- package/lib/esm/Editing/Entities.js.map +1 -0
- package/lib/esm/Editing/Enumerations.d.ts +25 -0
- package/lib/esm/Editing/Enumerations.d.ts.map +1 -0
- package/lib/esm/Editing/Enumerations.js +90 -0
- package/lib/esm/Editing/Enumerations.js.map +1 -0
- package/lib/esm/Editing/Exception.d.ts +358 -0
- package/lib/esm/Editing/Exception.d.ts.map +1 -0
- package/lib/esm/Editing/Exception.js +471 -0
- package/lib/esm/Editing/Exception.js.map +1 -0
- package/lib/esm/Editing/Formats.d.ts +23 -0
- package/lib/esm/Editing/Formats.d.ts.map +1 -0
- package/lib/esm/Editing/Formats.js +62 -0
- package/lib/esm/Editing/Formats.js.map +1 -0
- package/lib/esm/Editing/InvertedUnits.d.ts +19 -0
- package/lib/esm/Editing/InvertedUnits.d.ts.map +1 -0
- package/lib/esm/Editing/InvertedUnits.js +68 -0
- package/lib/esm/Editing/InvertedUnits.js.map +1 -0
- package/lib/esm/Editing/KindOfQuantities.d.ts +30 -0
- package/lib/esm/Editing/KindOfQuantities.d.ts.map +1 -0
- package/lib/esm/Editing/KindOfQuantities.js +92 -0
- package/lib/esm/Editing/KindOfQuantities.js.map +1 -0
- package/lib/esm/Editing/Mixins.d.ts +35 -0
- package/lib/esm/Editing/Mixins.d.ts.map +1 -0
- package/lib/esm/Editing/Mixins.js +90 -0
- package/lib/esm/Editing/Mixins.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts +10 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableArrayProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.d.ts +10 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.js +12 -0
- package/lib/esm/Editing/Mutable/MutableCAClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableClass.d.ts +39 -0
- package/lib/esm/Editing/Mutable/MutableClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableClass.js +18 -0
- package/lib/esm/Editing/Mutable/MutableClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableConstant.d.ts +14 -0
- package/lib/esm/Editing/Mutable/MutableConstant.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableConstant.js +12 -0
- package/lib/esm/Editing/Mutable/MutableConstant.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts +12 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.js +12 -0
- package/lib/esm/Editing/Mutable/MutableEntityClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.js +11 -0
- package/lib/esm/Editing/Mutable/MutableEnumeration.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableFormat.d.ts +26 -0
- package/lib/esm/Editing/Mutable/MutableFormat.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableFormat.js +12 -0
- package/lib/esm/Editing/Mutable/MutableFormat.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.js +12 -0
- package/lib/esm/Editing/Mutable/MutableInvertedUnit.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts +14 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js +12 -0
- package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableMixin.d.ts +12 -0
- package/lib/esm/Editing/Mutable/MutableMixin.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableMixin.js +12 -0
- package/lib/esm/Editing/Mutable/MutableMixin.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts +8 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableNavigationProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.js +12 -0
- package/lib/esm/Editing/Mutable/MutablePhenomenon.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts +13 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableProperty.d.ts +16 -0
- package/lib/esm/Editing/Mutable/MutableProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.js +12 -0
- package/lib/esm/Editing/Mutable/MutablePropertyCategory.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts +30 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.js +20 -0
- package/lib/esm/Editing/Mutable/MutableRelationshipClass.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchema.d.ts +51 -0
- package/lib/esm/Editing/Mutable/MutableSchema.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchema.js +14 -0
- package/lib/esm/Editing/Mutable/MutableSchema.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts +11 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.js +12 -0
- package/lib/esm/Editing/Mutable/MutableSchemaItem.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts +8 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.js +12 -0
- package/lib/esm/Editing/Mutable/MutableStructProperty.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnit.d.ts +12 -0
- package/lib/esm/Editing/Mutable/MutableUnit.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnit.js +12 -0
- package/lib/esm/Editing/Mutable/MutableUnit.js.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts +10 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts.map +1 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.js +12 -0
- package/lib/esm/Editing/Mutable/MutableUnitSystem.js.map +1 -0
- package/lib/esm/Editing/Phenomena.d.ts +17 -0
- package/lib/esm/Editing/Phenomena.d.ts.map +1 -0
- package/lib/esm/Editing/Phenomena.js +44 -0
- package/lib/esm/Editing/Phenomena.js.map +1 -0
- package/lib/esm/Editing/Properties.d.ts +206 -0
- package/lib/esm/Editing/Properties.d.ts.map +1 -0
- package/lib/esm/Editing/Properties.js +415 -0
- package/lib/esm/Editing/Properties.js.map +1 -0
- package/lib/esm/Editing/PropertyCategories.d.ts +18 -0
- package/lib/esm/Editing/PropertyCategories.d.ts.map +1 -0
- package/lib/esm/Editing/PropertyCategories.js +54 -0
- package/lib/esm/Editing/PropertyCategories.js.map +1 -0
- package/lib/esm/Editing/RelationshipClasses.d.ts +69 -0
- package/lib/esm/Editing/RelationshipClasses.d.ts.map +1 -0
- package/lib/esm/Editing/RelationshipClasses.js +236 -0
- package/lib/esm/Editing/RelationshipClasses.js.map +1 -0
- package/lib/esm/Editing/SchemaItems.d.ts +42 -0
- package/lib/esm/Editing/SchemaItems.d.ts.map +1 -0
- package/lib/esm/Editing/SchemaItems.js +104 -0
- package/lib/esm/Editing/SchemaItems.js.map +1 -0
- package/lib/esm/Editing/Structs.d.ts +21 -0
- package/lib/esm/Editing/Structs.d.ts.map +1 -0
- package/lib/esm/Editing/Structs.js +47 -0
- package/lib/esm/Editing/Structs.js.map +1 -0
- package/lib/esm/Editing/UnitSystems.d.ts +17 -0
- package/lib/esm/Editing/UnitSystems.d.ts.map +1 -0
- package/lib/esm/Editing/UnitSystems.js +43 -0
- package/lib/esm/Editing/UnitSystems.js.map +1 -0
- package/lib/esm/Editing/Units.d.ts +17 -0
- package/lib/esm/Editing/Units.d.ts.map +1 -0
- package/lib/esm/Editing/Units.js +49 -0
- package/lib/esm/Editing/Units.js.map +1 -0
- package/lib/esm/Merging/ClassMerger.d.ts +9 -0
- package/lib/esm/Merging/ClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/ClassMerger.js +66 -0
- package/lib/esm/Merging/ClassMerger.js.map +1 -0
- package/lib/esm/Merging/ConstantMerger.d.ts +14 -0
- package/lib/esm/Merging/ConstantMerger.d.ts.map +1 -0
- package/lib/esm/Merging/ConstantMerger.js +64 -0
- package/lib/esm/Merging/ConstantMerger.js.map +1 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.d.ts +14 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.js +36 -0
- package/lib/esm/Merging/CustomAttributeClassMerger.js.map +1 -0
- package/lib/esm/Merging/CustomAttributeMerger.d.ts +19 -0
- package/lib/esm/Merging/CustomAttributeMerger.d.ts.map +1 -0
- package/lib/esm/Merging/CustomAttributeMerger.js +66 -0
- package/lib/esm/Merging/CustomAttributeMerger.js.map +1 -0
- package/lib/esm/Merging/Edits/NameMapping.d.ts +22 -0
- package/lib/esm/Merging/Edits/NameMapping.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/NameMapping.js +49 -0
- package/lib/esm/Merging/Edits/NameMapping.js.map +1 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.d.ts +14 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.js +62 -0
- package/lib/esm/Merging/Edits/RenameEditHandler.js.map +1 -0
- package/lib/esm/Merging/Edits/SchemaEdits.d.ts +81 -0
- package/lib/esm/Merging/Edits/SchemaEdits.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/SchemaEdits.js +112 -0
- package/lib/esm/Merging/Edits/SchemaEdits.js.map +1 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.d.ts +14 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.d.ts.map +1 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.js +60 -0
- package/lib/esm/Merging/Edits/SkipEditHandler.js.map +1 -0
- package/lib/esm/Merging/EntityClassMerger.d.ts +19 -0
- package/lib/esm/Merging/EntityClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/EntityClassMerger.js +39 -0
- package/lib/esm/Merging/EntityClassMerger.js.map +1 -0
- package/lib/esm/Merging/EnumerationMerger.d.ts +14 -0
- package/lib/esm/Merging/EnumerationMerger.d.ts.map +1 -0
- package/lib/esm/Merging/EnumerationMerger.js +48 -0
- package/lib/esm/Merging/EnumerationMerger.js.map +1 -0
- package/lib/esm/Merging/EnumeratorMerger.d.ts +14 -0
- package/lib/esm/Merging/EnumeratorMerger.d.ts.map +1 -0
- package/lib/esm/Merging/EnumeratorMerger.js +36 -0
- package/lib/esm/Merging/EnumeratorMerger.js.map +1 -0
- package/lib/esm/Merging/FormatMerger.d.ts +24 -0
- package/lib/esm/Merging/FormatMerger.d.ts.map +1 -0
- package/lib/esm/Merging/FormatMerger.js +137 -0
- package/lib/esm/Merging/FormatMerger.js.map +1 -0
- package/lib/esm/Merging/InvertedUnitMerger.d.ts +14 -0
- package/lib/esm/Merging/InvertedUnitMerger.d.ts.map +1 -0
- package/lib/esm/Merging/InvertedUnitMerger.js +41 -0
- package/lib/esm/Merging/InvertedUnitMerger.js.map +1 -0
- package/lib/esm/Merging/KindOfQuantityMerger.d.ts +19 -0
- package/lib/esm/Merging/KindOfQuantityMerger.d.ts.map +1 -0
- package/lib/esm/Merging/KindOfQuantityMerger.js +89 -0
- package/lib/esm/Merging/KindOfQuantityMerger.js.map +1 -0
- package/lib/esm/Merging/MixinMerger.d.ts +14 -0
- package/lib/esm/Merging/MixinMerger.d.ts.map +1 -0
- package/lib/esm/Merging/MixinMerger.js +33 -0
- package/lib/esm/Merging/MixinMerger.js.map +1 -0
- package/lib/esm/Merging/PhenomenonMerger.d.ts +14 -0
- package/lib/esm/Merging/PhenomenonMerger.d.ts.map +1 -0
- package/lib/esm/Merging/PhenomenonMerger.js +36 -0
- package/lib/esm/Merging/PhenomenonMerger.js.map +1 -0
- package/lib/esm/Merging/PropertyCategoryMerger.d.ts +14 -0
- package/lib/esm/Merging/PropertyCategoryMerger.d.ts.map +1 -0
- package/lib/esm/Merging/PropertyCategoryMerger.js +31 -0
- package/lib/esm/Merging/PropertyCategoryMerger.js.map +1 -0
- package/lib/esm/Merging/PropertyMerger.d.ts +12 -0
- package/lib/esm/Merging/PropertyMerger.d.ts.map +1 -0
- package/lib/esm/Merging/PropertyMerger.js +228 -0
- package/lib/esm/Merging/PropertyMerger.js.map +1 -0
- package/lib/esm/Merging/RelationshipClassMerger.d.ts +27 -0
- package/lib/esm/Merging/RelationshipClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/RelationshipClassMerger.js +136 -0
- package/lib/esm/Merging/RelationshipClassMerger.js.map +1 -0
- package/lib/esm/Merging/SchemaMerger.d.ts +49 -0
- package/lib/esm/Merging/SchemaMerger.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaMerger.js +117 -0
- package/lib/esm/Merging/SchemaMerger.js.map +1 -0
- package/lib/esm/Merging/SchemaMergingVisitor.d.ts +149 -0
- package/lib/esm/Merging/SchemaMergingVisitor.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaMergingVisitor.js +339 -0
- package/lib/esm/Merging/SchemaMergingVisitor.js.map +1 -0
- package/lib/esm/Merging/SchemaMergingWalker.d.ts +19 -0
- package/lib/esm/Merging/SchemaMergingWalker.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaMergingWalker.js +61 -0
- package/lib/esm/Merging/SchemaMergingWalker.js.map +1 -0
- package/lib/esm/Merging/SchemaReferenceMerger.d.ts +13 -0
- package/lib/esm/Merging/SchemaReferenceMerger.d.ts.map +1 -0
- package/lib/esm/Merging/SchemaReferenceMerger.js +57 -0
- package/lib/esm/Merging/SchemaReferenceMerger.js.map +1 -0
- package/lib/esm/Merging/StructClassMerger.d.ts +14 -0
- package/lib/esm/Merging/StructClassMerger.d.ts.map +1 -0
- package/lib/esm/Merging/StructClassMerger.js +20 -0
- package/lib/esm/Merging/StructClassMerger.js.map +1 -0
- package/lib/esm/Merging/UnitMerger.d.ts +14 -0
- package/lib/esm/Merging/UnitMerger.d.ts.map +1 -0
- package/lib/esm/Merging/UnitMerger.js +58 -0
- package/lib/esm/Merging/UnitMerger.js.map +1 -0
- package/lib/esm/Merging/UnitSystemMerger.d.ts +14 -0
- package/lib/esm/Merging/UnitSystemMerger.d.ts.map +1 -0
- package/lib/esm/Merging/UnitSystemMerger.js +24 -0
- package/lib/esm/Merging/UnitSystemMerger.js.map +1 -0
- package/lib/esm/Merging/Utils.d.ts +34 -0
- package/lib/esm/Merging/Utils.d.ts.map +1 -0
- package/lib/esm/Merging/Utils.js +90 -0
- package/lib/esm/Merging/Utils.js.map +1 -0
- package/lib/esm/Validation/Diagnostic.d.ts +322 -0
- package/lib/esm/Validation/Diagnostic.d.ts.map +1 -0
- package/lib/esm/Validation/Diagnostic.js +295 -0
- package/lib/esm/Validation/Diagnostic.js.map +1 -0
- package/lib/esm/Validation/DiagnosticReporter.d.ts +97 -0
- package/lib/esm/Validation/DiagnosticReporter.d.ts.map +1 -0
- package/lib/esm/Validation/DiagnosticReporter.js +105 -0
- package/lib/esm/Validation/DiagnosticReporter.js.map +1 -0
- package/lib/esm/Validation/ECRules.d.ts +454 -0
- package/lib/esm/Validation/ECRules.d.ts.map +1 -0
- package/lib/esm/Validation/ECRules.js +578 -0
- package/lib/esm/Validation/ECRules.js.map +1 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts +14 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts.map +1 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.js +37 -0
- package/lib/esm/Validation/LoggingDiagnosticReporter.js.map +1 -0
- package/lib/esm/Validation/RuleSuppressionSet.d.ts +60 -0
- package/lib/esm/Validation/RuleSuppressionSet.d.ts.map +1 -0
- package/lib/esm/Validation/RuleSuppressionSet.js +9 -0
- package/lib/esm/Validation/RuleSuppressionSet.js.map +1 -0
- package/lib/esm/Validation/Rules.d.ts +65 -0
- package/lib/esm/Validation/Rules.d.ts.map +1 -0
- package/lib/esm/Validation/Rules.js +9 -0
- package/lib/esm/Validation/Rules.js.map +1 -0
- package/lib/esm/Validation/SchemaChanges.d.ts +640 -0
- package/lib/esm/Validation/SchemaChanges.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaChanges.js +1141 -0
- package/lib/esm/Validation/SchemaChanges.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts +423 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.js +109 -0
- package/lib/esm/Validation/SchemaCompareDiagnostics.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareReporter.d.ts +12 -0
- package/lib/esm/Validation/SchemaCompareReporter.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareReporter.js +9 -0
- package/lib/esm/Validation/SchemaCompareReporter.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts +237 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.js +346 -0
- package/lib/esm/Validation/SchemaCompareResultDelegate.js.map +1 -0
- package/lib/esm/Validation/SchemaCompareVisitor.d.ts +120 -0
- package/lib/esm/Validation/SchemaCompareVisitor.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaCompareVisitor.js +222 -0
- package/lib/esm/Validation/SchemaCompareVisitor.js.map +1 -0
- package/lib/esm/Validation/SchemaComparer.d.ts +211 -0
- package/lib/esm/Validation/SchemaComparer.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaComparer.js +770 -0
- package/lib/esm/Validation/SchemaComparer.js.map +1 -0
- package/lib/esm/Validation/SchemaValidater.d.ts +20 -0
- package/lib/esm/Validation/SchemaValidater.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaValidater.js +55 -0
- package/lib/esm/Validation/SchemaValidater.js.map +1 -0
- package/lib/esm/Validation/SchemaValidationVisitor.d.ts +171 -0
- package/lib/esm/Validation/SchemaValidationVisitor.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaValidationVisitor.js +488 -0
- package/lib/esm/Validation/SchemaValidationVisitor.js.map +1 -0
- package/lib/esm/Validation/SchemaWalker.d.ts +23 -0
- package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaWalker.js +50 -0
- package/lib/esm/Validation/SchemaWalker.js.map +1 -0
- package/lib/esm/ecschema-editing.d.ts +49 -0
- package/lib/esm/ecschema-editing.d.ts.map +1 -0
- package/lib/esm/ecschema-editing.js +52 -0
- package/lib/esm/ecschema-editing.js.map +1 -0
- package/package.json +12 -10
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Diagnostic
|
|
3
|
+
*/
|
|
4
|
+
import { AnyClass, AnyECType, AnyProperty, CustomAttributeContainerProps, RelationshipConstraint, Schema, SchemaItem } from "@itwin/ecschema-metadata";
|
|
5
|
+
/**
|
|
6
|
+
* Defines the possible diagnostic types.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export declare enum DiagnosticType {
|
|
10
|
+
None = 0,
|
|
11
|
+
Schema = 1,
|
|
12
|
+
SchemaItem = 2,
|
|
13
|
+
Property = 3,
|
|
14
|
+
CustomAttributeContainer = 4,
|
|
15
|
+
RelationshipConstraint = 5
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Defines the possible diagnostic categories.
|
|
19
|
+
* @beta
|
|
20
|
+
*/
|
|
21
|
+
export declare enum DiagnosticCategory {
|
|
22
|
+
Warning = 0,
|
|
23
|
+
Error = 1,
|
|
24
|
+
Suggestion = 2,
|
|
25
|
+
Message = 3
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The interface implemented by all diagnostics used during schema validation.
|
|
29
|
+
* @beta
|
|
30
|
+
*/
|
|
31
|
+
export interface IDiagnostic<TYPE extends AnyECType, ARGS extends any[]> {
|
|
32
|
+
/** The diagnostic category (error, warning, etc...). Value is static across all instances. */
|
|
33
|
+
category: DiagnosticCategory;
|
|
34
|
+
/** The unique string identifier of the diagnostic in the format '<ruleSetName>:<number>. Value is static across all instances. */
|
|
35
|
+
code: string;
|
|
36
|
+
/** The context type of diagnostic (schema, schema item, property, etc...). Value is static across all instances. */
|
|
37
|
+
diagnosticType: DiagnosticType;
|
|
38
|
+
/** The unformatted message text associated with the diagnostic. Value is static across all instances. */
|
|
39
|
+
messageText: string;
|
|
40
|
+
/** The arguments used when formatted the diagnostic instance's message. */
|
|
41
|
+
messageArgs?: ARGS;
|
|
42
|
+
/** The EC object associated with the diagnostic instance. */
|
|
43
|
+
ecDefinition: TYPE;
|
|
44
|
+
/** The schema where the diagnostic originated. */
|
|
45
|
+
schema: Schema;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Type which encapsulates all possible diagnostics.
|
|
49
|
+
* @beta
|
|
50
|
+
*/
|
|
51
|
+
export type AnyDiagnostic = IDiagnostic<AnyECType, any[]>;
|
|
52
|
+
/**
|
|
53
|
+
* The abstract base class for all [[IDiagnostic]] implementations.
|
|
54
|
+
* @beta
|
|
55
|
+
*/
|
|
56
|
+
export declare abstract class BaseDiagnostic<TYPE extends AnyECType, ARGS extends any[]> implements IDiagnostic<TYPE, ARGS> {
|
|
57
|
+
/**
|
|
58
|
+
* Initializes a new BaseDiagnostic.
|
|
59
|
+
* @param ecDefinition The EC object to associate with the diagnostic.
|
|
60
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
61
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
62
|
+
*/
|
|
63
|
+
constructor(ecDefinition: TYPE, messageArgs?: ARGS, category?: DiagnosticCategory);
|
|
64
|
+
/** Gets the unique string identifier for the diagnostic in the format '<ruleSetName>:<number>'. */
|
|
65
|
+
abstract get code(): string;
|
|
66
|
+
/** Gets the context type of the diagnostic (schema, schema item, property, etc...) */
|
|
67
|
+
abstract get diagnosticType(): DiagnosticType;
|
|
68
|
+
/** Gets the message associated with the diagnostic. */
|
|
69
|
+
abstract get messageText(): string;
|
|
70
|
+
/** Gets the schema where the diagnostic originated. */
|
|
71
|
+
abstract get schema(): Schema;
|
|
72
|
+
/** The EC object to associate with the diagnostic. */
|
|
73
|
+
ecDefinition: TYPE;
|
|
74
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
75
|
+
messageArgs?: ARGS;
|
|
76
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
77
|
+
category: DiagnosticCategory;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* An [[IDiagnostic]] implementation used for [[Schema]] diagnostics.
|
|
81
|
+
* @beta
|
|
82
|
+
*/
|
|
83
|
+
export declare abstract class SchemaDiagnostic<ARGS extends any[]> extends BaseDiagnostic<Schema, ARGS> {
|
|
84
|
+
static diagnosticType: DiagnosticType;
|
|
85
|
+
/**
|
|
86
|
+
* Initializes a new SchemaDiagnostic.
|
|
87
|
+
* @param ecDefinition The EC object to associate with the diagnostic.
|
|
88
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
89
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
90
|
+
*/
|
|
91
|
+
constructor(schema: Schema, messageArgs: ARGS, category?: DiagnosticCategory);
|
|
92
|
+
/** Gets the schema where the diagnostic originated. */
|
|
93
|
+
get schema(): Schema;
|
|
94
|
+
/** Gets the DiagnosticType. */
|
|
95
|
+
get diagnosticType(): DiagnosticType;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* An [[IDiagnostic]] implementation used for [[SchemaItem]] diagnostics.
|
|
99
|
+
* @beta
|
|
100
|
+
*/
|
|
101
|
+
export declare abstract class SchemaItemDiagnostic<TYPE extends SchemaItem, ARGS extends any[]> extends BaseDiagnostic<TYPE, ARGS> {
|
|
102
|
+
static diagnosticType: DiagnosticType;
|
|
103
|
+
/**
|
|
104
|
+
* Initializes a new SchemaItemDiagnostic.
|
|
105
|
+
* @param ecDefinition The EC object to associate with the diagnostic.
|
|
106
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
107
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
108
|
+
*/
|
|
109
|
+
constructor(ecDefinition: SchemaItem, messageArgs: ARGS, category?: DiagnosticCategory);
|
|
110
|
+
/** Gets the schema where the diagnostic originated. */
|
|
111
|
+
get schema(): Schema;
|
|
112
|
+
/** Gets the DiagnosticType. */
|
|
113
|
+
get diagnosticType(): DiagnosticType;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* An [[IDiagnostic]] implementation used for [[ECClass]] diagnostics.
|
|
117
|
+
* @beta
|
|
118
|
+
*/
|
|
119
|
+
export declare abstract class ClassDiagnostic<ARGS extends any[]> extends SchemaItemDiagnostic<AnyClass, ARGS> {
|
|
120
|
+
/**
|
|
121
|
+
* Initializes a new ClassDiagnostic.
|
|
122
|
+
* @param ecClass The class to associate with the diagnostic.
|
|
123
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
124
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
125
|
+
*/
|
|
126
|
+
constructor(ecClass: AnyClass, messageArgs: ARGS, category?: DiagnosticCategory);
|
|
127
|
+
/** Gets the schema where the diagnostic originated. */
|
|
128
|
+
get schema(): Schema;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* An [[IDiagnostic]] implementation used for [[Property]] diagnostics.
|
|
132
|
+
* @beta
|
|
133
|
+
*/
|
|
134
|
+
export declare abstract class PropertyDiagnostic<ARGS extends any[]> extends BaseDiagnostic<AnyProperty, ARGS> {
|
|
135
|
+
/**
|
|
136
|
+
* Initializes a new PropertyDiagnostic.
|
|
137
|
+
* @param property The property to associate with the diagnostic.
|
|
138
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
139
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
140
|
+
*/
|
|
141
|
+
constructor(property: AnyProperty, messageArgs?: ARGS, category?: DiagnosticCategory);
|
|
142
|
+
/** Gets the schema where the diagnostic originated. */
|
|
143
|
+
get schema(): Schema;
|
|
144
|
+
/** Gets the DiagnosticType. */
|
|
145
|
+
get diagnosticType(): DiagnosticType;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* An [[IDiagnostic]] implementation used for [[RelationshipConstraint]] diagnostics.
|
|
149
|
+
* @beta
|
|
150
|
+
*/
|
|
151
|
+
export declare abstract class RelationshipConstraintDiagnostic<ARGS extends any[]> extends BaseDiagnostic<RelationshipConstraint, ARGS> {
|
|
152
|
+
/**
|
|
153
|
+
* Initializes a new RelationshipConstraintDiagnostic.
|
|
154
|
+
* @param constraint The Relationship Constraint to associate with the diagnostic.
|
|
155
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
156
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
157
|
+
*/
|
|
158
|
+
constructor(constraint: RelationshipConstraint, messageArgs: ARGS, category?: DiagnosticCategory);
|
|
159
|
+
/** Gets the schema where the diagnostic originated. */
|
|
160
|
+
get schema(): Schema;
|
|
161
|
+
/** Gets the DiagnosticType. */
|
|
162
|
+
get diagnosticType(): DiagnosticType;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* An [[IDiagnostic]] implementation used for [[CustomAttributeContainerProps]] diagnostics.
|
|
166
|
+
* @beta
|
|
167
|
+
*/
|
|
168
|
+
export declare abstract class CustomAttributeContainerDiagnostic<ARGS extends any[]> extends BaseDiagnostic<CustomAttributeContainerProps, ARGS> {
|
|
169
|
+
/**
|
|
170
|
+
* Initializes a new CustomAttributeContainerDiagnostic.
|
|
171
|
+
* @param constraint The Custom Attribute Container to associate with the diagnostic.
|
|
172
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
173
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
174
|
+
*/
|
|
175
|
+
constructor(container: CustomAttributeContainerProps, messageArgs: ARGS, category?: DiagnosticCategory);
|
|
176
|
+
/** Gets the schema where the diagnostic originated. */
|
|
177
|
+
get schema(): Schema;
|
|
178
|
+
/** Gets the DiagnosticType. */
|
|
179
|
+
get diagnosticType(): DiagnosticType;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Helper method for creating [[SchemaDiagnostic]] child classes.
|
|
183
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
184
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
185
|
+
* @beta
|
|
186
|
+
*/
|
|
187
|
+
export declare function createSchemaDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
|
|
188
|
+
new (schema: Schema, messageArgs: ARGS, category?: DiagnosticCategory): {
|
|
189
|
+
readonly code: string;
|
|
190
|
+
readonly messageText: string;
|
|
191
|
+
/** Gets the schema where the diagnostic originated. */
|
|
192
|
+
readonly schema: Schema;
|
|
193
|
+
/** Gets the DiagnosticType. */
|
|
194
|
+
readonly diagnosticType: DiagnosticType;
|
|
195
|
+
/** The EC object to associate with the diagnostic. */
|
|
196
|
+
ecDefinition: Schema;
|
|
197
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
198
|
+
messageArgs?: ARGS | undefined;
|
|
199
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
200
|
+
category: DiagnosticCategory;
|
|
201
|
+
};
|
|
202
|
+
code: string;
|
|
203
|
+
diagnosticType: DiagnosticType;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Helper method for creating [[SchemaItemDiagnostic]] child classes.
|
|
207
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
208
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
209
|
+
* @beta
|
|
210
|
+
*/
|
|
211
|
+
export declare function createSchemaItemDiagnosticClass<ITEM extends SchemaItem, ARGS extends any[]>(code: string, messageText: string): {
|
|
212
|
+
new (ecDefinition: SchemaItem, messageArgs: ARGS, category?: DiagnosticCategory): {
|
|
213
|
+
readonly code: string;
|
|
214
|
+
readonly messageText: string;
|
|
215
|
+
/** Gets the schema where the diagnostic originated. */
|
|
216
|
+
readonly schema: Schema;
|
|
217
|
+
/** Gets the DiagnosticType. */
|
|
218
|
+
readonly diagnosticType: DiagnosticType;
|
|
219
|
+
/** The EC object to associate with the diagnostic. */
|
|
220
|
+
ecDefinition: ITEM;
|
|
221
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
222
|
+
messageArgs?: ARGS | undefined;
|
|
223
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
224
|
+
category: DiagnosticCategory;
|
|
225
|
+
};
|
|
226
|
+
diagnosticType: DiagnosticType;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Helper method for creating [[ClassDiagnostic]] child classes.
|
|
230
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
231
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
232
|
+
* @beta
|
|
233
|
+
*/
|
|
234
|
+
export declare function createClassDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
|
|
235
|
+
new (ecClass: AnyClass, messageArgs: ARGS, category?: DiagnosticCategory): {
|
|
236
|
+
readonly code: string;
|
|
237
|
+
readonly messageText: string;
|
|
238
|
+
/** Gets the schema where the diagnostic originated. */
|
|
239
|
+
readonly schema: Schema;
|
|
240
|
+
/** Gets the DiagnosticType. */
|
|
241
|
+
readonly diagnosticType: DiagnosticType;
|
|
242
|
+
/** The EC object to associate with the diagnostic. */
|
|
243
|
+
ecDefinition: AnyClass;
|
|
244
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
245
|
+
messageArgs?: ARGS | undefined;
|
|
246
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
247
|
+
category: DiagnosticCategory;
|
|
248
|
+
};
|
|
249
|
+
diagnosticType: DiagnosticType;
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Helper method for creating [[PropertyDiagnostic]] child classes.
|
|
253
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
254
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
255
|
+
* @beta
|
|
256
|
+
*/
|
|
257
|
+
export declare function createPropertyDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
|
|
258
|
+
new (property: AnyProperty, messageArgs?: ARGS | undefined, category?: DiagnosticCategory): {
|
|
259
|
+
readonly code: string;
|
|
260
|
+
readonly messageText: string;
|
|
261
|
+
/** Gets the schema where the diagnostic originated. */
|
|
262
|
+
readonly schema: Schema;
|
|
263
|
+
/** Gets the DiagnosticType. */
|
|
264
|
+
readonly diagnosticType: DiagnosticType;
|
|
265
|
+
/** The EC object to associate with the diagnostic. */
|
|
266
|
+
ecDefinition: AnyProperty;
|
|
267
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
268
|
+
messageArgs?: ARGS | undefined;
|
|
269
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
270
|
+
category: DiagnosticCategory;
|
|
271
|
+
};
|
|
272
|
+
code: string;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Helper method for creating [[RelationshipConstraintDiagnostic]] child classes.
|
|
276
|
+
* @param code The string that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
|
|
277
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
278
|
+
* @beta
|
|
279
|
+
*/
|
|
280
|
+
export declare function createRelationshipConstraintDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
|
|
281
|
+
new (constraint: RelationshipConstraint, messageArgs: ARGS, category?: DiagnosticCategory): {
|
|
282
|
+
readonly code: string;
|
|
283
|
+
readonly messageText: string;
|
|
284
|
+
/** Gets the schema where the diagnostic originated. */
|
|
285
|
+
readonly schema: Schema;
|
|
286
|
+
/** Gets the DiagnosticType. */
|
|
287
|
+
readonly diagnosticType: DiagnosticType;
|
|
288
|
+
/** The EC object to associate with the diagnostic. */
|
|
289
|
+
ecDefinition: RelationshipConstraint;
|
|
290
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
291
|
+
messageArgs?: ARGS | undefined;
|
|
292
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
293
|
+
category: DiagnosticCategory;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Helper method for creating [[CustomAttributeContainerDiagnostic]] child classes.
|
|
298
|
+
* @param code The that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
|
|
299
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
300
|
+
* @beta
|
|
301
|
+
*/
|
|
302
|
+
export declare function createCustomAttributeContainerDiagnosticClass<ARGS extends any[]>(code: string, messageText: string): {
|
|
303
|
+
new (container: CustomAttributeContainerProps, messageArgs: ARGS, category?: DiagnosticCategory): {
|
|
304
|
+
readonly code: string;
|
|
305
|
+
readonly messageText: string;
|
|
306
|
+
/** Gets the schema where the diagnostic originated. */
|
|
307
|
+
readonly schema: Schema;
|
|
308
|
+
/** Gets the DiagnosticType. */
|
|
309
|
+
readonly diagnosticType: DiagnosticType;
|
|
310
|
+
/** The EC object to associate with the diagnostic. */
|
|
311
|
+
ecDefinition: CustomAttributeContainerProps;
|
|
312
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
313
|
+
messageArgs?: ARGS | undefined;
|
|
314
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
315
|
+
category: DiagnosticCategory;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
/** @beta */
|
|
319
|
+
export declare function diagnosticCategoryToString(category: DiagnosticCategory): "Error" | "Warning" | "Message" | "Suggestion";
|
|
320
|
+
/** @beta */
|
|
321
|
+
export declare function diagnosticTypeToString(type: DiagnosticType): "CustomAttributeContainer" | "None" | "Property" | "RelationshipConstraint" | "Schema" | "SchemaItem";
|
|
322
|
+
//# sourceMappingURL=Diagnostic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Diagnostic.d.ts","sourceRoot":"","sources":["../../../src/Validation/Diagnostic.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Diagnostic
|
|
7
|
+
*/
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
9
|
+
const formatString = (format, ...args) => {
|
|
10
|
+
return format.replace(/{(\d+)}/g, (match, theNumber) => {
|
|
11
|
+
return typeof args[theNumber] !== "undefined"
|
|
12
|
+
? args[theNumber]
|
|
13
|
+
: match;
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Defines the possible diagnostic types.
|
|
18
|
+
* @beta
|
|
19
|
+
*/
|
|
20
|
+
export var DiagnosticType;
|
|
21
|
+
(function (DiagnosticType) {
|
|
22
|
+
DiagnosticType[DiagnosticType["None"] = 0] = "None";
|
|
23
|
+
DiagnosticType[DiagnosticType["Schema"] = 1] = "Schema";
|
|
24
|
+
DiagnosticType[DiagnosticType["SchemaItem"] = 2] = "SchemaItem";
|
|
25
|
+
DiagnosticType[DiagnosticType["Property"] = 3] = "Property";
|
|
26
|
+
DiagnosticType[DiagnosticType["CustomAttributeContainer"] = 4] = "CustomAttributeContainer";
|
|
27
|
+
DiagnosticType[DiagnosticType["RelationshipConstraint"] = 5] = "RelationshipConstraint";
|
|
28
|
+
})(DiagnosticType || (DiagnosticType = {}));
|
|
29
|
+
/**
|
|
30
|
+
* Defines the possible diagnostic categories.
|
|
31
|
+
* @beta
|
|
32
|
+
*/
|
|
33
|
+
export var DiagnosticCategory;
|
|
34
|
+
(function (DiagnosticCategory) {
|
|
35
|
+
DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
|
|
36
|
+
DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
|
|
37
|
+
DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion";
|
|
38
|
+
DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message";
|
|
39
|
+
})(DiagnosticCategory || (DiagnosticCategory = {}));
|
|
40
|
+
/**
|
|
41
|
+
* The abstract base class for all [[IDiagnostic]] implementations.
|
|
42
|
+
* @beta
|
|
43
|
+
*/
|
|
44
|
+
export class BaseDiagnostic {
|
|
45
|
+
/**
|
|
46
|
+
* Initializes a new BaseDiagnostic.
|
|
47
|
+
* @param ecDefinition The EC object to associate with the diagnostic.
|
|
48
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
49
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
50
|
+
*/
|
|
51
|
+
constructor(ecDefinition, messageArgs, category = DiagnosticCategory.Error) {
|
|
52
|
+
this.ecDefinition = ecDefinition;
|
|
53
|
+
this.messageArgs = messageArgs;
|
|
54
|
+
this.category = category;
|
|
55
|
+
}
|
|
56
|
+
/** The EC object to associate with the diagnostic. */
|
|
57
|
+
ecDefinition;
|
|
58
|
+
/** The arguments used when formatting the diagnostic message. */
|
|
59
|
+
messageArgs;
|
|
60
|
+
/** The diagnostic category is of the type DiagnosticCategory; which is defined as an enumeration above. */
|
|
61
|
+
category;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* An [[IDiagnostic]] implementation used for [[Schema]] diagnostics.
|
|
65
|
+
* @beta
|
|
66
|
+
*/
|
|
67
|
+
export class SchemaDiagnostic extends BaseDiagnostic {
|
|
68
|
+
static diagnosticType = DiagnosticType.SchemaItem;
|
|
69
|
+
/**
|
|
70
|
+
* Initializes a new SchemaDiagnostic.
|
|
71
|
+
* @param ecDefinition The EC object to associate with the diagnostic.
|
|
72
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
73
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
74
|
+
*/
|
|
75
|
+
constructor(schema, messageArgs, category = DiagnosticCategory.Error) {
|
|
76
|
+
super(schema, messageArgs, category);
|
|
77
|
+
}
|
|
78
|
+
/** Gets the schema where the diagnostic originated. */
|
|
79
|
+
get schema() { return this.ecDefinition; }
|
|
80
|
+
/** Gets the DiagnosticType. */
|
|
81
|
+
get diagnosticType() { return DiagnosticType.Schema; }
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* An [[IDiagnostic]] implementation used for [[SchemaItem]] diagnostics.
|
|
85
|
+
* @beta
|
|
86
|
+
*/
|
|
87
|
+
export class SchemaItemDiagnostic extends BaseDiagnostic {
|
|
88
|
+
static diagnosticType = DiagnosticType.SchemaItem;
|
|
89
|
+
/**
|
|
90
|
+
* Initializes a new SchemaItemDiagnostic.
|
|
91
|
+
* @param ecDefinition The EC object to associate with the diagnostic.
|
|
92
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
93
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
94
|
+
*/
|
|
95
|
+
constructor(ecDefinition, messageArgs, category = DiagnosticCategory.Error) {
|
|
96
|
+
super(ecDefinition, messageArgs, category);
|
|
97
|
+
}
|
|
98
|
+
/** Gets the schema where the diagnostic originated. */
|
|
99
|
+
get schema() { return this.ecDefinition.schema; }
|
|
100
|
+
/** Gets the DiagnosticType. */
|
|
101
|
+
get diagnosticType() { return DiagnosticType.SchemaItem; }
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* An [[IDiagnostic]] implementation used for [[ECClass]] diagnostics.
|
|
105
|
+
* @beta
|
|
106
|
+
*/
|
|
107
|
+
export class ClassDiagnostic extends SchemaItemDiagnostic {
|
|
108
|
+
/**
|
|
109
|
+
* Initializes a new ClassDiagnostic.
|
|
110
|
+
* @param ecClass The class to associate with the diagnostic.
|
|
111
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
112
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
113
|
+
*/
|
|
114
|
+
constructor(ecClass, messageArgs, category = DiagnosticCategory.Error) {
|
|
115
|
+
super(ecClass, messageArgs, category);
|
|
116
|
+
}
|
|
117
|
+
/** Gets the schema where the diagnostic originated. */
|
|
118
|
+
get schema() { return this.ecDefinition.schema; }
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* An [[IDiagnostic]] implementation used for [[Property]] diagnostics.
|
|
122
|
+
* @beta
|
|
123
|
+
*/
|
|
124
|
+
export class PropertyDiagnostic extends BaseDiagnostic {
|
|
125
|
+
/**
|
|
126
|
+
* Initializes a new PropertyDiagnostic.
|
|
127
|
+
* @param property The property to associate with the diagnostic.
|
|
128
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
129
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
130
|
+
*/
|
|
131
|
+
constructor(property, messageArgs, category = DiagnosticCategory.Error) {
|
|
132
|
+
super(property, messageArgs, category);
|
|
133
|
+
}
|
|
134
|
+
/** Gets the schema where the diagnostic originated. */
|
|
135
|
+
get schema() { return this.ecDefinition.schema; }
|
|
136
|
+
/** Gets the DiagnosticType. */
|
|
137
|
+
get diagnosticType() { return DiagnosticType.Property; }
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* An [[IDiagnostic]] implementation used for [[RelationshipConstraint]] diagnostics.
|
|
141
|
+
* @beta
|
|
142
|
+
*/
|
|
143
|
+
export class RelationshipConstraintDiagnostic extends BaseDiagnostic {
|
|
144
|
+
/**
|
|
145
|
+
* Initializes a new RelationshipConstraintDiagnostic.
|
|
146
|
+
* @param constraint The Relationship Constraint to associate with the diagnostic.
|
|
147
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
148
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
149
|
+
*/
|
|
150
|
+
constructor(constraint, messageArgs, category = DiagnosticCategory.Error) {
|
|
151
|
+
super(constraint, messageArgs, category);
|
|
152
|
+
}
|
|
153
|
+
/** Gets the schema where the diagnostic originated. */
|
|
154
|
+
get schema() { return this.ecDefinition.schema; }
|
|
155
|
+
/** Gets the DiagnosticType. */
|
|
156
|
+
get diagnosticType() { return DiagnosticType.RelationshipConstraint; }
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* An [[IDiagnostic]] implementation used for [[CustomAttributeContainerProps]] diagnostics.
|
|
160
|
+
* @beta
|
|
161
|
+
*/
|
|
162
|
+
export class CustomAttributeContainerDiagnostic extends BaseDiagnostic {
|
|
163
|
+
/**
|
|
164
|
+
* Initializes a new CustomAttributeContainerDiagnostic.
|
|
165
|
+
* @param constraint The Custom Attribute Container to associate with the diagnostic.
|
|
166
|
+
* @param messageArgs The arguments used when formatting the diagnostic message.
|
|
167
|
+
* @param category The [[DiagnosticCategory]] to associate with the diagnostic, Error by default.
|
|
168
|
+
*/
|
|
169
|
+
constructor(container, messageArgs, category = DiagnosticCategory.Error) {
|
|
170
|
+
super(container, messageArgs, category);
|
|
171
|
+
}
|
|
172
|
+
/** Gets the schema where the diagnostic originated. */
|
|
173
|
+
get schema() { return this.ecDefinition.schema; }
|
|
174
|
+
/** Gets the DiagnosticType. */
|
|
175
|
+
get diagnosticType() { return DiagnosticType.CustomAttributeContainer; }
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Helper method for creating [[SchemaDiagnostic]] child classes.
|
|
179
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
180
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
181
|
+
* @beta
|
|
182
|
+
*/
|
|
183
|
+
export function createSchemaDiagnosticClass(code, messageText) {
|
|
184
|
+
validateCode(code);
|
|
185
|
+
return class extends SchemaDiagnostic {
|
|
186
|
+
static code = code;
|
|
187
|
+
get code() { return code; }
|
|
188
|
+
get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Helper method for creating [[SchemaItemDiagnostic]] child classes.
|
|
193
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
194
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
195
|
+
* @beta
|
|
196
|
+
*/
|
|
197
|
+
export function createSchemaItemDiagnosticClass(code, messageText) {
|
|
198
|
+
validateCode(code);
|
|
199
|
+
return class extends SchemaItemDiagnostic {
|
|
200
|
+
get code() { return code; }
|
|
201
|
+
get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Helper method for creating [[ClassDiagnostic]] child classes.
|
|
206
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
207
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
208
|
+
* @beta
|
|
209
|
+
*/
|
|
210
|
+
export function createClassDiagnosticClass(code, messageText) {
|
|
211
|
+
validateCode(code);
|
|
212
|
+
return class extends ClassDiagnostic {
|
|
213
|
+
get code() { return code; }
|
|
214
|
+
get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Helper method for creating [[PropertyDiagnostic]] child classes.
|
|
219
|
+
* @param code The string that uniquely identifies the diagnostic in the format '<ruleSetName>:<number>'.
|
|
220
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
221
|
+
* @beta
|
|
222
|
+
*/
|
|
223
|
+
export function createPropertyDiagnosticClass(code, messageText) {
|
|
224
|
+
validateCode(code);
|
|
225
|
+
return class extends PropertyDiagnostic {
|
|
226
|
+
static code = code;
|
|
227
|
+
get code() { return code; }
|
|
228
|
+
get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Helper method for creating [[RelationshipConstraintDiagnostic]] child classes.
|
|
233
|
+
* @param code The string that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
|
|
234
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
235
|
+
* @beta
|
|
236
|
+
*/
|
|
237
|
+
export function createRelationshipConstraintDiagnosticClass(code, messageText) {
|
|
238
|
+
validateCode(code);
|
|
239
|
+
return class extends RelationshipConstraintDiagnostic {
|
|
240
|
+
get code() { return code; }
|
|
241
|
+
get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Helper method for creating [[CustomAttributeContainerDiagnostic]] child classes.
|
|
246
|
+
* @param code The that uniquely identifies the type of diagnostic in the format '<ruleSetName>:<number>'.
|
|
247
|
+
* @param messageText The message to associate with the diagnostic class.
|
|
248
|
+
* @beta
|
|
249
|
+
*/
|
|
250
|
+
export function createCustomAttributeContainerDiagnosticClass(code, messageText) {
|
|
251
|
+
validateCode(code);
|
|
252
|
+
return class extends CustomAttributeContainerDiagnostic {
|
|
253
|
+
get code() { return code; }
|
|
254
|
+
get messageText() { return undefined === this.messageArgs ? messageText : formatString(messageText, ...this.messageArgs); }
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
/** @beta */
|
|
258
|
+
export function diagnosticCategoryToString(category) {
|
|
259
|
+
switch (category) {
|
|
260
|
+
case DiagnosticCategory.Error:
|
|
261
|
+
return "Error";
|
|
262
|
+
case DiagnosticCategory.Warning:
|
|
263
|
+
return "Warning";
|
|
264
|
+
case DiagnosticCategory.Message:
|
|
265
|
+
return "Message";
|
|
266
|
+
case DiagnosticCategory.Suggestion:
|
|
267
|
+
return "Suggestion";
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
/** @beta */
|
|
271
|
+
export function diagnosticTypeToString(type) {
|
|
272
|
+
switch (type) {
|
|
273
|
+
case DiagnosticType.CustomAttributeContainer:
|
|
274
|
+
return "CustomAttributeContainer";
|
|
275
|
+
case DiagnosticType.None:
|
|
276
|
+
return "None";
|
|
277
|
+
case DiagnosticType.Property:
|
|
278
|
+
return "Property";
|
|
279
|
+
case DiagnosticType.RelationshipConstraint:
|
|
280
|
+
return "RelationshipConstraint";
|
|
281
|
+
case DiagnosticType.Schema:
|
|
282
|
+
return "Schema";
|
|
283
|
+
case DiagnosticType.SchemaItem:
|
|
284
|
+
return "SchemaItem";
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function validateCode(code) {
|
|
288
|
+
const msg = `Diagnostic code ${code} is invalid. Expected the format <ruleSetName>-<number>.`;
|
|
289
|
+
const parts = code.split("-");
|
|
290
|
+
if (parts.length !== 2)
|
|
291
|
+
throw new Error(msg);
|
|
292
|
+
if (isNaN(Number(parts[1])))
|
|
293
|
+
throw new Error(msg);
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=Diagnostic.js.map
|