/** @packageDocumentation * @module Editing */ import { CustomAttribute, ECClassModifier, EntityClass, Mixin, NavigationPropertyProps, RelationshipClass, RelationshipClassProps, RelationshipConstraint, RelationshipEnd, RelationshipMultiplicity, SchemaItemKey, SchemaKey, StrengthDirection, StrengthType } from "@itwin/ecschema-metadata"; import { SchemaContextEditor } from "./Editor"; import { ECClasses } from "./ECClasses"; import { NavigationProperties } from "./Properties"; /** * @alpha * A class extending ECClasses allowing you to create schema items of type RelationshipClass. */ export declare class RelationshipClasses extends ECClasses { protected get itemTypeClass(): typeof RelationshipClass; constructor(schemaEditor: SchemaContextEditor); /** * Allows access for editing of NavigationProperty attributes. */ readonly navigationProperties: NavigationProperties; /** * Creates a RelationshipClass. * @param schemaKey a SchemaKey of the Schema that will house the new object. * @param name The name of the new class. * @param modifier The ECClassModifier of the new class. * @param strength The relationship StrengthType of the class. * @param StrengthDirection The relationship StrengthDirection of the class. * @param baseClassKey An optional SchemaItemKey that specifies the base relationship class. */ create(schemaKey: SchemaKey, name: string, modifier: ECClassModifier, strength: StrengthType, direction: StrengthDirection, baseClassKey?: SchemaItemKey): Promise; /** * Sets the source RelationshipConstraint on the relationship. * @param relationshipKey The SchemaItemKey for the relationship. * @param source The RelationshipConstraint to add. */ setSourceConstraint(relationshipKey: SchemaItemKey, source: RelationshipConstraint): Promise; /** * Sets the target RelationshipConstraint on the relationship. * @param relationshipKey The SchemaItemKey for the relationship. * @param target The RelationshipConstraint to add. */ setTargetConstraint(relationshipKey: SchemaItemKey, target: RelationshipConstraint): Promise; /** * Creates a RelationshipClass through a RelationshipClassProps. * @param schemaKey a SchemaKey of the Schema that will house the new object. * @param relationshipProps a json object that will be used to populate the new RelationshipClass. Needs a name value passed in. */ createFromProps(schemaKey: SchemaKey, relationshipProps: RelationshipClassProps): Promise; /** * Sets the base class of a RelationshipClass. * @param relationshipKey The SchemaItemKey of the RelationshipClass. * @param baseClassKey The SchemaItemKey of the base class. Specifying 'undefined' removes the base class. */ setBaseClass(itemKey: SchemaItemKey, baseClassKey?: SchemaItemKey): Promise; createNavigationProperty(relationshipKey: SchemaItemKey, name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise; /** * Creates a Navigation Property through a NavigationPropertyProps. * @param classKey a SchemaItemKey of the Relationship Class that will house the new property. * @param navigationProps a json object that will be used to populate the new Navigation Property. */ createNavigationPropertyFromProps(relationshipKey: SchemaItemKey, navigationProps: NavigationPropertyProps): Promise; setConstraintMultiplicity(constraint: RelationshipConstraint, multiplicity: RelationshipMultiplicity): Promise; setConstraintPolymorphic(constraint: RelationshipConstraint, polymorphic: boolean): Promise; setConstraintRelationshipEnd(constraint: RelationshipConstraint, relationshipEnd: RelationshipEnd): Promise; setAbstractConstraint(constraint: RelationshipConstraint, abstractConstraint?: EntityClass | Mixin | RelationshipClass): Promise; addConstraintClass(constraint: RelationshipConstraint, ecClass: EntityClass | Mixin | RelationshipClass): Promise; removeConstraintClass(constraint: RelationshipConstraint, ecClass: EntityClass | Mixin | RelationshipClass): Promise; addCustomAttributeToConstraint(constraint: RelationshipConstraint, customAttribute: CustomAttribute): Promise; private validate; } //# sourceMappingURL=RelationshipClasses.d.ts.map