UNPKG

contentful-migration

Version:
18 lines 751 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EditorLayoutCreateAction = void 0; const action_1 = require("../action"); class EditorLayoutCreateAction extends action_1.APIAction { constructor(contentTypeId) { super(); this.contentTypeId = contentTypeId; } async applyTo(api) { const editorInterfaces = await api.getEditorInterfaces(this.contentTypeId); const contentType = await api.getContentType(this.contentTypeId); await editorInterfaces.createEditorLayout(contentType.fields.fields); await editorInterfaces.createGroupControls(); } } exports.EditorLayoutCreateAction = EditorLayoutCreateAction; //# sourceMappingURL=editor-layout-create.js.map