UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

55 lines (54 loc) 2.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVSharePointDataSource = void 0; const RVDashboardDataSource_1 = require("../AbstractClasses/RVDashboardDataSource"); const RVSharePointAuthenticationMethod_1 = require("./RVSharePointAuthenticationMethod"); /** SharePoint data source, contains the URL to the SharePoint site to use. */ class RVSharePointDataSource extends RVDashboardDataSource_1.RVDashboardDataSource { /** @hidden */ constructor(json) { super(json); this._url = null; /** The authentication method to use when connecting to SharePoint */ this._authenticationMethod = RVSharePointAuthenticationMethod_1.RVSharePointAuthenticationMethod.Windows; if (json) { var props = json.Properties; this._url = props['Url']; var authMethod = props['AuthenticationMethod']; if (authMethod) { this._authenticationMethod = RVSharePointAuthenticationMethod_1.RVSharePointAuthenticationMethod[authMethod]; } } } /** @hidden */ toJson() { var json = super.toJson(); var props = json.Properties; props['Url'] = this._url; const authMethodStr = RVSharePointAuthenticationMethod_1.RVSharePointAuthenticationMethod[this._authenticationMethod]; props['AuthenticationMethod'] = authMethodStr; return json; } /** @hidden */ getProviderKey() { return 'SHAREPOINT'; } /** URL to the SharePoint site (or sub site) to use */ get url() { return this._url; } set url(value) { this._url = value; } get authenticationMethod() { return this._authenticationMethod; } set authenticationMethod(value) { this._authenticationMethod = value; } /** @hidden */ getType() { return "RVSharePointDataSource"; } } exports.RVSharePointDataSource = RVSharePointDataSource;