/** @packageDocumentation * @module Editing */ import { CustomAttribute, Schema, SchemaContext, SchemaItem, SchemaItemKey, SchemaItemType, SchemaKey } from "@itwin/ecschema-metadata"; import { MutableSchema } from "./Mutable/MutableSchema"; import { Constants } from "./Constants"; import { CustomAttributes } from "./CustomAttributes"; import { Entities } from "./Entities"; import { Enumerations } from "./Enumerations"; import { Formats } from "./Formats"; import { InvertedUnits } from "./InvertedUnits"; import { KindOfQuantities } from "./KindOfQuantities"; import { Mixins } from "./Mixins"; import { Phenomena } from "./Phenomena"; import { PropertyCategories } from "./PropertyCategories"; import { RelationshipClasses } from "./RelationshipClasses"; import { Structs } from "./Structs"; import { Units } from "./Units"; import { UnitSystems } from "./UnitSystems"; /** * A class that allows you to edit and create schemas, classes, and items from the SchemaContext level. * @alpha */ export declare class SchemaContextEditor { private _schemaContext; readonly entities: Entities; readonly mixins: Mixins; readonly structs: Structs; readonly customAttributes: CustomAttributes; readonly relationships: RelationshipClasses; readonly constants: Constants; readonly enumerations: Enumerations; readonly formats: Formats; readonly kindOfQuantities: KindOfQuantities; readonly units: Units; readonly phenomenons: Phenomena; readonly unitSystems: UnitSystems; readonly propertyCategories: PropertyCategories; readonly invertedUnits: InvertedUnits; /** * Creates a new SchemaContextEditor instance. * @param schemaContext The SchemaContext the Editor will use to edit in. */ constructor(schemaContext: SchemaContext); /** Allows you to get schema classes and items through regular SchemaContext methods. */ get schemaContext(): SchemaContext; finish(): Promise; /** * Helper method for retrieving a schema, previously added, from the SchemaContext. * @param schemaKey The SchemaKey identifying the schema. * @internal */ getSchema(schemaKey: SchemaKey): Promise; /** * Creates a Schema with the given properties and adds it to the current schema context. * @param name The name given to the new schema. * @param alias The alias of the new schema. * @param readVersion The read version number of the schema. * @param writeVersion The write version number of the schema. * @param minorVersion The minor version number of the schema. * @returns Resolves to the SchemaKey of created schema. */ createSchema(name: string, alias: string, readVersion: number, writeVersion: number, minorVersion: number): Promise; /** * Adds a referenced schema to the schema identified by the given SchemaKey. * @param schemaKey The SchemaKey identifying the schema. * @param refSchema The referenced schema to add. */ addSchemaReference(schemaKey: SchemaKey, refSchema: Schema): Promise; /** * Adds a CustomAttribute instance to the schema identified by the given SchemaKey * @param schemaKey The SchemaKey identifying the schema. * @param customAttribute The CustomAttribute instance to add. */ addCustomAttribute(schemaKey: SchemaKey, customAttribute: CustomAttribute): Promise; /** * Sets the schema version. * @param schemaKey The SchemaKey identifying the schema. * @param readVersion The read version of the schema. If not specified, the existing read version will be maintained. * @param writeVersion The write version of the schema. If not specified, the existing write version will be maintained. * @param minorVersion The minor version of the schema. If not specified, the existing minor version will be maintained. * @returns Resolves to the new SchemaKey containing version updates. */ setVersion(schemaKey: SchemaKey, readVersion?: number, writeVersion?: number, minorVersion?: number): Promise; /** * Increments the minor version of a schema. * @param schemaKey The SchemaKey identifying the schema. * @returns Resolves to the new SchemaKey containing version updates. */ incrementMinorVersion(schemaKey: SchemaKey): Promise; /** @internal */ lookupSchemaItem(schemaOrKey: Schema | SchemaKey, schemaItemKey: SchemaItemKey, schemaItemType: SchemaItemType): Promise; /** @internal */ getSchemaItem(schemaItemKey: SchemaItemKey, itemConstructor: T): Promise>; private removeReference; private removeCustomAttribute; private lookupSchema; /** * Sets the Schemas description. * @param schemaKey The SchemaKey identifying the schema. * @param description The new description to set. */ setDescription(schemaKey: SchemaKey, description: string): Promise; /** * Sets the Schemas display label. * @param schemaKey The SchemaKey identifying the schema. * @param label The new label to set. */ setDisplayLabel(schemaKey: SchemaKey, label: string): Promise; /** * Sets the Schemas alias. * @param schemaKey The SchemaKey identifying the schema. * @param alias The new alias to set. */ setAlias(schemaKey: SchemaKey, alias: string): Promise; } //# sourceMappingURL=Editor.d.ts.map