UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

43 lines 1.8 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import { BaseElementQuery } from './base-element-query.class'; var ElementQuery = /** @class */ (function (_super) { __extends(ElementQuery, _super); function ElementQuery(config, queryService, typeCodename, elementCodename) { var _this = _super.call(this, config, queryService) || this; _this.config = config; _this.queryService = queryService; _this.typeCodename = typeCodename; _this.elementCodename = elementCodename; if (!typeCodename) { throw Error("Codename of the type has to be provided"); } if (!elementCodename) { throw Error("Codename of the element has to be provided"); } return _this; } /** * Gets the runnable Observable */ ElementQuery.prototype.getObservable = function () { return _super.prototype.runElementQuery.call(this, this.typeCodename, this.elementCodename); }; /** * Gets 'Url' representation of query */ ElementQuery.prototype.getUrl = function () { return _super.prototype.getElementQueryUrl.call(this, this.typeCodename, this.elementCodename); }; return ElementQuery; }(BaseElementQuery)); export { ElementQuery }; //# sourceMappingURL=element-query.class.js.map