reveal-sdk-node
Version:
RevealBI Node.js SDK
60 lines (59 loc) • 1.98 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RVRESTDataSourceItem = void 0;
const RVDataSourceItem_1 = require("../AbstractClasses/RVDataSourceItem");
const RVRESTDataSource_1 = require("./RVRESTDataSource");
/** REST API data source item */
class RVRESTDataSourceItem extends RVDataSourceItem_1.RVDataSourceItem {
/** @hidden */
constructor(arg) {
super(arg);
this._parameters = null;
if (arg instanceof RVRESTDataSource_1.RVRESTDataSource) {
this.url = arg.url;
}
else {
var props = arg.Properties;
this.dataSource.url = props["Url"];
this._parameters = arg["Parameters"];
}
}
/** @hidden */
toJson() {
var json = super.toJson();
var props = json['Properties'];
props['Url'] = this.dataSource.url;
json['Parameters'] = this._parameters;
return json;
}
/** Values for the parameters specified in the data source {@link RVRESTDataSource.url} property. */
get parameters() {
return this._parameters;
}
set parameters(value) {
this._parameters = value;
}
/**
* URL to the REST endpoint.
* The value will be set as the URL of the item's associated {@link RVRESTDataSource} data source object.
* @deprecated This property is deprecated and will soon be removed. Please set the Url directly on the data source instead.
*/
get url() {
return this.dataSource.url;
}
set url(value) {
this.dataSource.url = value;
}
/** @hidden */
getType() {
return "RVRESTDataSourceItem";
}
/** @hidden */
_getWrapper() {
let wrapper = super._getWrapper();
wrapper.url(this.url);
wrapper.parameters(this.parameters);
return wrapper;
}
}
exports.RVRESTDataSourceItem = RVRESTDataSourceItem;