/** @packageDocumentation * @module Editing */ import { CustomAttribute, CustomAttributeContainerProps, ECClass, Enumeration, EnumerationPropertyProps, PrimitiveArrayPropertyProps, PrimitivePropertyProps, PrimitiveType, SchemaItemKey, SchemaItemType, SchemaKey, StructArrayPropertyProps, StructClass, StructPropertyProps } from "@itwin/ecschema-metadata"; import { SchemaContextEditor } from "./Editor"; import { ArrayProperties, EnumerationProperties, PrimitiveProperties, Properties, StructProperties } from "./Properties"; import { CreateSchemaItem, SchemaItems } from "./SchemaItems"; export type ECClassSchemaItems = SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.RelationshipClass | SchemaItemType.Mixin | SchemaItemType.CustomAttributeClass; /** * @alpha * Acts as a base class for schema class creation. Enables property creation. */ export declare class ECClasses extends SchemaItems { protected constructor(schemaItemType: ECClassSchemaItems, schemaEditor: SchemaContextEditor); protected schemaItemType: ECClassSchemaItems; /** * Allows access for the editors itemType class instance. * It returns ECClass here, but editors for subclasses will override this to return the * appropriate subclass. */ protected get itemTypeClass(): typeof ECClass; /** * Allows access for editing of base Property attributes. */ readonly properties: Properties; /** * Allows access for editing of ArrayProperty attributes. */ readonly arrayProperties: ArrayProperties; /** * Allows access for editing of PrimitiveProperty attributes. */ readonly primitiveProperties: PrimitiveProperties; /** * Allows access for editing of EnumerationProperty attributes. */ readonly enumerationProperties: EnumerationProperties; /** * Allows access for editing of StructProperty attributes. */ readonly structProperties: StructProperties; createClass(schemaKey: SchemaKey, type: SchemaItemType, create: CreateSchemaItem, name: string, baseClassKey?: SchemaItemKey, ...args: any[]): Promise; /** * Creates a property on class identified by the given SchemaItemKey. This method restricts the * property type to primitives of type Double, String, DateTime and Integer. * @param classKey The SchemaItemKey of the class. * @param name The name of the new property. * @param type The PrimitiveType assigned to the new property. */ createProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType, prefix: string): Promise; /** * Create a primitive property on class identified by the given SchemaItemKey. * @param classKey The SchemaItemKey of the class. * @param name The name of the new property. * @param type The PrimitiveType assigned to the new property. */ createPrimitiveProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType): Promise; createPrimitivePropertyFromProps(classKey: SchemaItemKey, name: string, type: PrimitiveType, primitiveProps: PrimitivePropertyProps): Promise; createEnumerationProperty(classKey: SchemaItemKey, name: string, type: Enumeration): Promise; createEnumerationPropertyFromProps(classKey: SchemaItemKey, name: string, type: Enumeration, enumProps: EnumerationPropertyProps): Promise; createPrimitiveArrayProperty(classKey: SchemaItemKey, name: string, type: PrimitiveType): Promise; createPrimitiveArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: PrimitiveType, primitiveProps: PrimitiveArrayPropertyProps): Promise; createEnumerationArrayProperty(classKey: SchemaItemKey, name: string, type: Enumeration): Promise; createEnumerationArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: Enumeration, props: PrimitiveArrayPropertyProps): Promise; createStructProperty(classKey: SchemaItemKey, name: string, type: StructClass): Promise; createStructPropertyFromProps(classKey: SchemaItemKey, name: string, type: StructClass, structProps: StructPropertyProps): Promise; createStructArrayProperty(classKey: SchemaItemKey, name: string, type: StructClass): Promise; createStructArrayPropertyFromProps(classKey: SchemaItemKey, name: string, type: StructClass, structProps: StructArrayPropertyProps): Promise; deleteProperty(classKey: SchemaItemKey, name: string): Promise; delete(classKey: SchemaItemKey): Promise; /** * Adds a CustomAttribute instance to the Class identified by the given SchemaItemKey * @param classKey The SchemaItemKey identifying the schema. * @param customAttribute The CustomAttribute instance to add. */ addCustomAttribute(classKey: SchemaItemKey, customAttribute: CustomAttribute): Promise; /** * Sets the base class of a SchemaItem. * @param itemKey The SchemaItemKey of the Item. * @param baseClassKey The SchemaItemKey of the base class. Specifying 'undefined' removes the base class. */ setBaseClass(itemKey: SchemaItemKey, baseClassKey?: SchemaItemKey): Promise; private getClass; protected removeCustomAttribute(container: CustomAttributeContainerProps, customAttribute: CustomAttribute): void; } //# sourceMappingURL=ECClasses.d.ts.map