UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

22 lines 832 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var models_1 = require("../models"); var GenericElementMapper = /** @class */ (function () { function GenericElementMapper() { } GenericElementMapper.prototype.mapElement = function (response) { if (!response) { throw Error("Invalid response for mapping element"); } return new models_1.GenericElement({ codename: response.codename, name: response.name, type: response.type, options: response.options ? response.options : [], taxonomyGroup: response.taxonomy_group }); }; return GenericElementMapper; }()); exports.GenericElementMapper = GenericElementMapper; //# sourceMappingURL=generic-element.mapper.js.map