UNPKG

contentful-migration

Version:
29 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UpdateEditorInterfaceAction = void 0; const action_1 = require("./action"); class UpdateEditorInterfaceAction extends action_1.EntityAction { constructor(contentTypeId, fieldId, widgetId, settings, widgetNamespace) { super(); this.contentTypeId = contentTypeId; this.fieldId = fieldId; this._widgetId = widgetId; this._settings = settings; this._widgetNamespace = widgetNamespace; } getEntityType() { // TODO: enums return action_1.EntityType.EditorInterface; } getEntityId() { return this.contentTypeId; } getFieldId() { return this.fieldId; } async applyTo(editorInterfaces) { editorInterfaces.update(this.getFieldId(), this._widgetId, this._settings, this._widgetNamespace); } } exports.UpdateEditorInterfaceAction = UpdateEditorInterfaceAction; //# sourceMappingURL=editorinterface-update.js.map