UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

59 lines (58 loc) 2.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVWebResourceDataSource = void 0; const RVDashboardDataSource_1 = require("../AbstractClasses/RVDashboardDataSource"); /** Web resource data source, used to download files from HTTP URL using GET method. * See {@link RVRESTDataSource} to use other HTTP methods or to customize parameters, headers and body to sent. */ class RVWebResourceDataSource extends RVDashboardDataSource_1.RVDashboardDataSource { /** @hidden */ constructor(json) { super(json); this._url = null; this._useAnonymousAuthentication = false; if (json) { var props = json.Properties; this._url = props['Url']; this._useAnonymousAuthentication = props['_rpUseAnonymousAuthentication'] == true; } } /** @hidden */ toJson() { var json = super.toJson(); var props = json.Properties; props['Url'] = this._url; props['_rpUseAnonymousAuthentication'] = this._useAnonymousAuthentication; return json; } /** @hidden */ getProviderKey() { return 'WEBSERVICE'; } /** URL to the web resource, 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; } /** @hidden */ getType() { return "RVWebResourceDataSource"; } /** @hidden */ _getWrapper() { let wrapper = super._getWrapper(); wrapper.url(this.url); wrapper.useAnonymousAuthentication(this.useAnonymousAuthentication); return wrapper; } } exports.RVWebResourceDataSource = RVWebResourceDataSource;