123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var Unibase;
- (function (Unibase) {
- let Platform;
- (function (Platform) {
- let Analytics;
- (function (Analytics) {
- let Managers;
- (function (Managers) {
- class ViewerManager extends Platform.Core.BaseManager {
- getTemplateViews() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/templateviews';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getTemplateView(templateviewid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/templateview/' + templateviewid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getReportTemplate(ReportId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/templateview/reportid/' + ReportId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return JSON.parse(response.result);
- });
- });
- }
- getSubTemplate(templateviewid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/subtemplates/templateviewid/' + templateviewid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveTemplateView(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/templateview';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- deleteTemplate(templateviewid, reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/deletetemplateview/templateviewid/' + templateviewid + '/reportid/' + reportid;
- return yield this.dataHelper().postAsync(url, templateviewid).then(function (response) {
- return response;
- });
- });
- }
- getTemplates(templateNames) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/gettempates/tempatenames/' + templateNames;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getCalendarView(calendarviewid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/calendarview/' + calendarviewid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveCalendarView(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/calendarview';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getMapView(mapviewid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/mapview/' + mapviewid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveMapView(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/mapview';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getCardView(CardViewId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/cardview/' + CardViewId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return JSON.parse(response.result);
- });
- });
- }
- getCardViewerData(repObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/kanban';
- return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
- return JSON.parse(response.result);
- });
- });
- }
- saveCardView(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/cardview';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getReportViewerTypes(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/viewertypes/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- deleteViewer(reportid, viewerid, viewertypeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/deleteviewer/reportid/' + reportid + "/viewerid/" + viewerid + "/viewertypeid/" + viewertypeid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- updateViewerStatus(viewerid, viewertypeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/updateviewerstatus/viewerid/' + viewerid + "/viewertypeid/" + viewertypeid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- getViewer(viewerid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/getviewer/viewerid/' + viewerid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getViewerRoles(viewerid, reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/getviewerroles/viewerid/' + viewerid + '/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- addViewerRole(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/saveviewerrole';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- removeViewerRole(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/removeviewerrole';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- setViewable(viewerid, viewAll, viewerTypeId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/setasviewerviewable/viewerid/' + viewerid + '/viewall/' + viewAll + '/viewerTypeId/' + viewerTypeId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- exportViewers(viewerId, reportId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/exportreportviewers/reportid/' + reportId + '/viewerid/' + viewerId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new ViewerManager();
- return this._instance;
- }
- }
- Managers.ViewerManager = ViewerManager;
- })(Managers = Analytics.Managers || (Analytics.Managers = {}));
- })(Analytics = Platform.Analytics || (Platform.Analytics = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|