@agility/cli
Version:
Agility CLI for working with your content. (Public Beta)
31 lines (30 loc) • 1.27 kB
TypeScript
import * as mgmtApi from "@agility/management-sdk";
interface ModelMapping {
sourceGuid: string;
targetGuid: string;
sourceID: number;
targetID: number;
sourceReferenceName?: string;
targetReferenceName?: string;
sourceLastModifiedDate: string;
targetLastModifiedDate: string;
}
export declare class ModelMapper {
private fileOps;
private sourceGuid;
private targetGuid;
private mappings;
private directory;
constructor(sourceGuid: string, targetGuid: string);
getModelMapping(model: mgmtApi.Model, type: 'source' | 'target'): ModelMapping | null;
getModelMappingByID(id: number, type: 'source' | 'target'): ModelMapping | null;
getModelMappingByReferenceName(referenceName: string, type: 'source' | 'target'): ModelMapping | null;
getMappedEntity(mapping: ModelMapping, type: 'source' | 'target'): mgmtApi.Model | null;
addMapping(sourceModel: mgmtApi.Model, targetModel: mgmtApi.Model): void;
updateMapping(sourceModel: mgmtApi.Model, targetModel: mgmtApi.Model): void;
loadMapping(): any[];
saveMapping(): void;
hasSourceChanged(sourceModel: mgmtApi.Model | null | undefined): boolean;
hasTargetChanged(targetModel: mgmtApi.Model | null | undefined): boolean;
}
export {};