/** @packageDocumentation * @module Validation */ import { AnyClass, AnyECType, AnyProperty, Constant, CustomAttribute, CustomAttributeClass, CustomAttributeContainerProps, EntityClass, Enumeration, Format, InvertedUnit, KindOfQuantity, Mixin, Phenomenon, PropertyCategory, RelationshipClass, RelationshipConstraint, Schema, SchemaItem, StructClass, Unit, UnitSystem } from "@itwin/ecschema-metadata"; import { BaseDiagnostic } from "./Diagnostic"; /** * Interface used for all rule implementations used during schema validation. * @beta */ export type IRule = (ecDefinition: T, ...args: U[]) => AsyncIterable>; /** @beta */ export type BaseRule = IRule; /** * Interface used to represent logical collection of [IRule]($ecschema-editing) instances. * @beta */ export interface IRuleSet { /** The name of the rule set. */ name: string; /** A collection of schema names that should be excluded from adhering to the rules defined in this rule set. */ schemaExclusionSet?: string[]; /** The rules that apply to [Schema]($ecschema-metadata) objects. */ schemaRules?: Array>; /** The rules that apply to [SchemaItem]($ecschema-metadata) objects. */ schemaItemRules?: Array>; /** The rules that apply to [ECClass]($ecschema-metadata) objects. */ classRules?: Array>; /** The rules that apply to [Property]($ecschema-metadata) objects. */ propertyRules?: Array>; /** The rules that apply to [EntityClass]($ecschema-metadata) objects. */ entityClassRules?: Array>; /** The rules that apply to [StructClass]($ecschema-metadata) objects. */ structClassRules?: Array>; /** The rules that apply to [Mixin]($ecschema-metadata) objects. */ mixinRules?: Array>; /** The rules that apply to [RelationshipClass]($ecschema-metadata) objects. */ relationshipRules?: Array>; /** The rules that apply to [RelationshipConstraint]($ecschema-metadata) objects. */ relationshipConstraintRules?: Array>; /** The rules that apply to [CustomAttributeClass]($ecschema-metadata) objects. */ customAttributeClassRules?: Array>; /** The rules that apply to [CustomAttributeContainerProps]($ecschema-metadata) objects. */ customAttributeContainerRules?: Array>; /** The rules that apply to [CustomAttribute]($ecschema-metadata) objects. */ customAttributeInstanceRules?: Array>; /** The rules that apply to [Enumeration]($ecschema-metadata) objects. */ enumerationRules?: Array>; /** The rules that apply to [KindOfQuantity]($ecschema-metadata) objects. */ kindOfQuantityRules?: Array>; /** The rules that apply to [PropertyCategory]($ecschema-metadata) objects. */ propertyCategoryRules?: Array>; /** The rules that apply to [Format]($ecschema-metadata) objects. */ formatRules?: Array>; /** The rules that apply to [Unit]($ecschema-metadata) objects. */ unitRules?: Array>; /** The rules that apply to [InvertedUnit]($ecschema-metadata) objects. */ invertedUnitRules?: Array>; /** The rules that apply to [UnitSystem]($ecschema-metadata) objects. */ unitSystemRules?: Array>; /** The rules that apply to [Phenomenon]($ecschema-metadata) objects. */ phenomenonRules?: Array>; /** The rules that apply to [Constant]($ecschema-metadata) objects. */ constantRules?: Array>; } //# sourceMappingURL=Rules.d.ts.map