contentful-migration
Version:
Migration tooling for contentful
23 lines • 838 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EditorLayoutRenameFieldAction = void 0;
const action_1 = require("../action");
class EditorLayoutRenameFieldAction extends action_1.EntityAction {
constructor(contentTypeId, oldFieldId, newFieldId) {
super();
this.contentTypeId = contentTypeId;
this.oldFieldId = oldFieldId;
this.newFieldId = newFieldId;
}
getEntityType() {
return action_1.EntityType.EditorInterface;
}
getEntityId() {
return this.contentTypeId;
}
async applyTo(editorInterfaces) {
await editorInterfaces.updateFieldIdInEditorLayout(this.oldFieldId, this.newFieldId);
}
}
exports.EditorLayoutRenameFieldAction = EditorLayoutRenameFieldAction;
//# sourceMappingURL=editor-layout-rename-field.js.map