UNPKG

contentful-migration

Version:
27 lines 809 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContentTypeAnnotateAction = void 0; const action_1 = require("./action"); class ContentTypeAnnotateAction extends action_1.EntityAction { constructor(contentTypeId, annotations) { super(); this.contentTypeId = contentTypeId; this.annotations = annotations; } getEntityId() { return this.contentTypeId; } getEntityType() { return action_1.EntityType.ContentType; } async applyTo(ct) { if (!this.annotations) { ct.clearAnnotations(); } else { ct.setAnnotations(this.annotations); } } } exports.ContentTypeAnnotateAction = ContentTypeAnnotateAction; //# sourceMappingURL=content-type-annotate.js.map