/** @packageDocumentation * @module Merging */ import type { ECClass, SchemaItem } from "@itwin/ecschema-metadata"; import type { SchemaDifferenceResult } from "../../Differencing/SchemaDifference"; import { NameMapping } from "./NameMapping"; /** * An enumeration that has all the schema edit names. * @alpha */ export declare enum SchemaEditType { RenameSchemaItem = "RenameSchemaItem", RenameProperty = "RenameProperty", Skip = "Skip" } /** * Schema edit entry to rename a schema item. * @alpha */ export interface RenameSchemaItemEdit { type: SchemaEditType.RenameSchemaItem; key: string; value: string; } /** * Schema edit entry to rename a property of a class. * @alpha */ export interface RenamePropertyEdit { type: SchemaEditType.RenameProperty; key: string; value: string; } /** * Schema edit entry to skip a certain schema element matching the given key. * @alpha */ export interface SkipEdit { type: SchemaEditType.Skip; key: string; } /** * Union for all supported edits that can be applied to a schema. * @alpha */ export type AnySchemaEdits = SkipEdit | RenameSchemaItemEdit | RenamePropertyEdit; declare abstract class Editor { private readonly _edits; constructor(edits: Array); protected add(edit: AnySchemaEdits): void; } declare class PropertyEditor extends Editor { rename(ecClass: ECClass, propertyName: string, newName: string): void; skip(ecClass: ECClass, propertyName: string): void; } declare class ItemEditor extends Editor { rename(schemaItem: SchemaItem, newName: string): void; skip(schemaItem: SchemaItem): void; } /** * Defines a set of edits of a schema that can be applied to a schema during merging. The intention of this class * is to support saving of edits and load them again if needed. * @alpha */ export declare class SchemaEdits implements Iterable { private readonly _edits; readonly properties: PropertyEditor; readonly items: ItemEditor; /** * @alpha */ constructor(initialize?: ReadonlyArray); /** * @internal */ applyTo(differenceResult: SchemaDifferenceResult, nameMapping: NameMapping): Promise; toJSON(): ReadonlyArray; [Symbol.iterator](): Iterator; } export {}; //# sourceMappingURL=SchemaEdits.d.ts.map