UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

60 lines (59 loc) 2.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVODataDataSource = void 0; const RVDashboardDataSource_1 = require("../AbstractClasses/RVDashboardDataSource"); /** OData data source, configures the URL to get data from. */ class RVODataDataSource extends RVDashboardDataSource_1.RVDashboardDataSource { /** @hidden */ constructor(json) { super(json); this._url = null; this._useAnonymousAuthentication = false; this._usePreemptiveAuthentication = false; if (json) { var props = json.Properties; this._url = props['Url']; this._useAnonymousAuthentication = props['_rpUseAnonymousAuthentication'] == true; this._usePreemptiveAuthentication = props['_rpUsePreemptiveAuthentication'] == true; } } /** @hidden */ toJson() { var json = super.toJson(); var props = json.Properties; props['Url'] = this._url; props['_rpUseAnonymousAuthentication'] = this._useAnonymousAuthentication; props['_rpUsePreemptiveAuthentication'] = this._usePreemptiveAuthentication; return json; } /** @hidden */ getProviderKey() { return 'ODATAPROVIDER'; } /** URL to the OData endpoint, is expected to be a URL with HTTP or HTTPS scheme. */ get url() { return this._url; } set url(value) { this._url = value; } /** Boolean flag indicating if anonymous authentication should be used for this data source or credentials must be requested to the containing application. */ get useAnonymousAuthentication() { return this._useAnonymousAuthentication; } set useAnonymousAuthentication(value) { this._useAnonymousAuthentication = value; } /** Boolean flag indicating if preemptive authentication should be used for this data source. */ get usePreemptiveAuthentication() { return this._usePreemptiveAuthentication; } set usePreemptiveAuthentication(value) { this._usePreemptiveAuthentication = value; } /** @hidden */ getType() { return "RVODataDataSource"; } } exports.RVODataDataSource = RVODataDataSource;