UNPKG

contentful-migration

Version:
16 lines 620 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("../../index"); const schema_validation_1 = require("./schema-validation"); class SchemaValidator { constructor() { this.hooks = [index_1.ApiHook.SaveContentType]; } validate({ contentType, locales }) { const ctErrors = (0, schema_validation_1.validateContentType)(contentType); const fieldErrors = (0, schema_validation_1.validateFields)(contentType, locales); return ctErrors.concat(fieldErrors); } } exports.default = SchemaValidator; //# sourceMappingURL=index.js.map