UNPKG

@gooddata/gooddata-js

Version:
34 lines (33 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var LdmModule = /** @class */ (function () { function LdmModule(xhr) { this.xhr = xhr; } /** * Get closest connecting attributes in the LDM by calling the "attributeupperbound" endpoint * * @method getCommonAttributes * @param {String} projectId A project identifier * @param {Array} attributeUris Input list of attribute URIs * @return {Promise} Resolves with result list of attribute URIs */ LdmModule.prototype.getCommonAttributes = function (projectId, attributeUris) { return this.xhr .post("/gdc/md/" + projectId + "/ldm/attributeupperbound", { body: { attributeUpperBounds: { attributes: attributeUris, }, }, }) .then(function (response) { return response.getData(); }) .then(function (data) { if (data.attributeUpperBoundsResponse) { return data.attributeUpperBoundsResponse.upperbounds; } }); }; return LdmModule; }()); exports.LdmModule = LdmModule;