'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * Licensed Materials - Property of IBM * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2018 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['../../../lib/@waca/dashboard-common/dist/core/APIFactory', './api/InternalQueryServiceAPI', '../../../widgets/livewidget/query/QueryService'], function (APIFactory, InternalQueryServiceAPI, QueryService) { var InternalQueryService = function () { function InternalQueryService(options) { _classCallCheck(this, InternalQueryService); this.dashboardApi = options.features['API']; this.queryService = new QueryService({ dashboardApi: this.dashboardApi }); } InternalQueryService.prototype.getAPI = function getAPI() { if (!this.api) { this.api = APIFactory.createAPI(this, [InternalQueryServiceAPI]); } return this.api; }; InternalQueryService.prototype.executeQuery = function executeQuery(sourceId, querySpec, senderId) { var requestOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; return this.queryService.runQuery({ sourceIdOrModule: sourceId, querySpec: querySpec, requestOptions: requestOptions, sender: senderId }); }; return InternalQueryService; }(); return InternalQueryService; }); //# sourceMappingURL=InternalQueryService.js.map