contentful-migration
Version:
Migration tooling for contentful
29 lines • 982 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CopyEditorInterfaceAction = void 0;
const action_1 = require("./action");
class CopyEditorInterfaceAction extends action_1.EntityAction {
constructor(contentTypeId, sourceFieldId, destinationFieldId) {
super();
this.contentTypeId = contentTypeId;
this.sourceFieldId = sourceFieldId;
this.destinationFieldId = destinationFieldId;
}
getEntityType() {
return action_1.EntityType.EditorInterface;
}
getEntityId() {
return this.contentTypeId;
}
getSourceFieldId() {
return this.sourceFieldId;
}
getDestinationFieldId() {
return this.destinationFieldId;
}
async applyTo(editorInterfaces) {
editorInterfaces.copy(this.getSourceFieldId(), this.getDestinationFieldId());
}
}
exports.CopyEditorInterfaceAction = CopyEditorInterfaceAction;
//# sourceMappingURL=editorinterface-copy.js.map