@gooddata/gooddata-js
Version:
GoodData JavaScript SDK
42 lines (41 loc) • 2.29 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// (C) 2007-2018 GoodData Corporation
var experimental_executions_1 = require("./execution/experimental-executions");
var attributesMapLoader_1 = require("./utils/attributesMapLoader");
var execute_afm_1 = require("./execution/execute-afm");
/**
* Execution endpoints
*
* @module execution
* @class execution
*
*/
var ExecutionModule = /** @class */ (function () {
function ExecutionModule(xhr, md) {
this.executeAfmModule = new execute_afm_1.ExecuteAfmModule(xhr);
this.executeAfm = this.executeAfmModule.executeAfm.bind(this.executeAfmModule);
this.getExecutionResponse = this.executeAfmModule.getExecutionResponse.bind(this.executeAfmModule);
this._executeVisualization = this.executeAfmModule._executeVisualization.bind(this.executeAfmModule);
this._getVisExecutionResponse = this.executeAfmModule._getVisExecutionResponse.bind(this.executeAfmModule);
this.getPartialExecutionResult = this.executeAfmModule.getPartialExecutionResult.bind(this.executeAfmModule);
this.getExecutionResult = this.executeAfmModule.getExecutionResult.bind(this.executeAfmModule);
this.xhr = xhr;
this.md = md;
}
ExecutionModule.prototype.getData = function (projectId, columns, executionConfiguration, settings) {
if (executionConfiguration === void 0) { executionConfiguration = {}; }
if (settings === void 0) { settings = {}; }
return this.getExperimentalExecutionsModule().getData(projectId, columns, executionConfiguration, settings);
};
ExecutionModule.prototype.mdToExecutionDefinitionsAndColumns = function (projectId, mdObj, options) {
if (options === void 0) { options = {}; }
return this.getExperimentalExecutionsModule().mdToExecutionDefinitionsAndColumns(projectId, mdObj, options);
};
ExecutionModule.prototype.getExperimentalExecutionsModule = function () {
var loaderModule = new attributesMapLoader_1.AttributesMapLoaderModule(this.md);
return new experimental_executions_1.ExperimentalExecutionsModule(this.xhr, loaderModule.loadAttributesMap.bind(loaderModule));
};
return ExecutionModule;
}());
exports.ExecutionModule = ExecutionModule;