reveal-sdk-node
Version:
RevealBI Node.js SDK
82 lines (81 loc) • 2.44 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RVDynamicsCrmDataSourceItem = void 0;
const RVDataSourceItem_1 = require("../AbstractClasses/RVDataSourceItem");
const RVDynamicsCrmDataSource_1 = require("./RVDynamicsCrmDataSource");
/**
* Dynamics CRM data source item
*/
class RVDynamicsCrmDataSourceItem extends RVDataSourceItem_1.RVDataSourceItem {
/** @hidden */
constructor(arg) {
var _a;
super(arg);
this._organization = null;
this._entity = null;
// @if SERVER_SDK
this._customQuery = null;
if (!(arg instanceof RVDynamicsCrmDataSource_1.RVDynamicsCrmDataSource)) {
var props = arg.Properties;
this._organization = props["Organization"];
this._entity = props["Entity"];
// @if SERVER_SDK
this._customQuery = (_a = arg["Parameters"]) === null || _a === void 0 ? void 0 : _a["RPCustomQuery"];
// @endif
}
}
/** @hidden */
toJson() {
var json = super.toJson();
var props = json['Properties'];
props["Organization"] = this._organization;
props["Entity"] = this._entity;
// @if SERVER_SDK
json["Parameters"]["RPCustomQuery"] = this._customQuery;
// @endif
return json;
}
/**
* Name of the organization to use
*/
get organization() {
return this._organization;
}
set organization(value) {
this._organization = value;
}
/**
* Name of the entity to use
*/
get entity() {
return this._entity;
}
set entity(value) {
this._entity = value;
}
/**
* Custom query to use when getting data from Dynamics CRM
*/
get customQuery() {
return this._customQuery;
}
set customQuery(value) {
this._customQuery = value;
}
// @endif
/** @hidden */
getType() {
return "RVDynamicsCrmDataSourceItem";
}
/** @hidden */
_getWrapper() {
var wrapper = super._getWrapper();
wrapper.organization(this.organization);
wrapper.entity(this.entity);
// @if SERVER_SDK
wrapper.customQuery(this.customQuery);
// @endif
return wrapper;
}
}
exports.RVDynamicsCrmDataSourceItem = RVDynamicsCrmDataSourceItem;