UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

41 lines 1.71 kB
"use strict"; 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 __()); }; })(); exports.__esModule = true; var base_type_query_class_1 = require("./base-type-query.class"); var SingleTypeQuery = /** @class */ (function (_super) { __extends(SingleTypeQuery, _super); function SingleTypeQuery(config, queryService, typeCodename) { var _this = _super.call(this, config, queryService) || this; _this.config = config; _this.queryService = queryService; _this.typeCodename = typeCodename; if (!typeCodename) { throw Error("Cannot create type query without the codename of the type"); } return _this; } /** * Gets the runnable Observable */ SingleTypeQuery.prototype.getObservable = function () { return _super.prototype.runSingleTypeQuery.call(this, this.typeCodename); }; /** * Gets 'Url' representation of query */ SingleTypeQuery.prototype.getUrl = function () { return _super.prototype.getSingleTypeQueryUrl.call(this, this.typeCodename); }; return SingleTypeQuery; }(base_type_query_class_1.BaseTypeQuery)); exports.SingleTypeQuery = SingleTypeQuery; //# sourceMappingURL=single-type-query.class.js.map