123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619 |
- 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 ReportManager extends Platform.Core.BaseManager {
- updatecolumns(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/datalistcolumnstring/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getViewableReports() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/viewablereportgroups';
- var groups;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getViewableReportsByparentgroupid(parentid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/viewablereportgroupswithparent/' + parentid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getReportGroupById(reportgroupid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportgroup/reportgroupid/' + reportgroupid;
- var groups;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getReportGroupByName(groupname) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportgroupname/reportgroupname/' + groupname;
- var groups;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveReportGroup(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/savereportgroup';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- exportGroupreports(reportgroupid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/exportgroupreports/reportgroupid/' + reportgroupid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- deleteReportGroup(reportgroupid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/deletereportgroup/reportgroupid/' + reportgroupid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- getReportGroups() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/integrations/reportgroup/getreportfolders';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getReportsbyGroupId(groupid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/integrations/reportgroup/getreportbygroupid/reportgroupid/' + groupid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- checkReportGroupDependency(groupid, parentGroupId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/checkreportgroupdependency/groupid/' + groupid + '/parentgroupid/' + parentGroupId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- updateReportGroupStatus(groupid, statusId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/updatereportgroupstatus/reportgroupid/' + groupid + '/statusid/' + statusId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getReportById(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/report/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getReportByUniqueId(uniqueid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportbyuniqueid/' + uniqueid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getReportByUniqueIdEncoded(encodedUniqueId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportbyuniqueidencoded/' + encodedUniqueId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "" && response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getReports() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/getallreports';
- var reports;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- reports = JSON.parse(response.result);
- return reports;
- });
- });
- }
- getReportCategoriesByReportId(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportcategories/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getReportInfo(repObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportinfo';
- return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getFullReportInfo(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = `apis/v4/unibase/platform/analytics/getfullreportinfo/${reportid}`;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getSubReports(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- let term = null;
- const url = 'apis/v4/unibase/platform/analytics/subreports/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getSubReportById(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- let term = null;
- const url = 'apis/v4/unibase/platform/analytics/subreportsbyid/subreportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveReport(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/report';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- deleteReport(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/deletereport/reportid/' + reportid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- getColumns(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- let term = null;
- const url = 'apis/v4/unibase/platform/analytics/reportcolumns/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getIsContactReportColumns(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- let term = null;
- const url = 'apis/v4/unibase/platform/analytics/getiscontactreportcolumns/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getReportColumnsByAppId(installedAppId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/getreportcolumnsbyappid/installedappid/' + installedAppId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getReportColumnByAliasName(reportid, aliasName) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/getreportcolumnbyaliasname/reportid/' + reportid + '/aliasname/' + aliasName;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getDataLists() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/datalists/getallnoninternaldatalists';
- var dataList;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- dataList = JSON.parse(response.result);
- return dataList;
- });
- });
- }
- getDataListColumns(datalistid, term, parameters) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/datalistcolumns/datalistid/' + datalistid + '/term/' + term + '/parameters/' + parameters;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getTableData(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportpreviewdata';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- return response;
- });
- });
- }
- getTenureData(postdata) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/tenuredata';
- return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
- return JSON.parse(response.result);
- });
- });
- }
- getReportNamesByGroup(reportgroupid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reports/reportgroupid/' + reportgroupid;
- var reportDetails;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshReports() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/refreshreports/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- getHeaderColumns(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/headers/reportid/' + reportid;
- var headers;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- headers = JSON.parse(response.result);
- return headers;
- });
- });
- }
- getDynamicFilterData(reportid, columnname) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/dynamicfilterdata/reportid/' + reportid + '/columnname/' + columnname;
- var dynamicfilters;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- dynamicfilters = JSON.parse(response.result);
- return dynamicfilters;
- });
- });
- }
- getDynamicFilterCascadingData(dynamicFilObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/dynamicfiltercascadingdata';
- return yield this.dataHelper().postAsync(url, dynamicFilObj).then(function (response) {
- return response;
- });
- });
- }
- getDynamicFilters(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/dynamicfilters/reportid/' + reportid;
- var commonfilters;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- commonfilters = JSON.parse(response.result);
- return commonfilters;
- });
- });
- }
- getReportViewerData(repObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/tabledata';
- return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
- return response;
- });
- });
- }
- getReportCount(repObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/tablecount';
- return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
- return response;
- });
- });
- }
- getDistinctColumnData(datalistid, columnname, aggregationtypeid, fromdate, todate) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/distinctcolumndata/datalistid/' + datalistid + '/columnname/' + columnname + '/aggregationtypeid/' + aggregationtypeid + '/fromdate/' + fromdate + '/todate/' + todate;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result) {
- response.result = JSON.parse(response.result);
- }
- return response.result;
- });
- });
- }
- startDownloadLargeFile(repObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/downloadreportlargefile';
- return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
- return response;
- });
- });
- }
- deleteDynamicFilter(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/deletedynamicfilter/reportid/' + reportid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- getCommonFilters(portletid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/commonfilters/portletid/' + portletid;
- var commonfilters;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != "")
- commonfilters = JSON.parse(response.result);
- return commonfilters;
- });
- });
- }
- getCommonFilterColumns(portletid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumns/portletid/' + portletid;
- var commonfiltercolumns;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- commonfiltercolumns = JSON.parse(response.result);
- return commonfiltercolumns;
- });
- });
- }
- getCommonFilterColumnsByCommonFilterId(commonfilterid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumnsbycommonfilterid/commonfilterid/' + commonfilterid;
- var commonfiltercolumns;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- commonfiltercolumns = JSON.parse(response.result);
- return commonfiltercolumns;
- });
- });
- }
- getCommonFiltersByWidgetId(widgetid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumnsbywidgetid/widgetid/' + widgetid;
- var commonfiltercolumns;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- commonfiltercolumns = JSON.parse(response.result);
- return commonfiltercolumns;
- });
- });
- }
- getCommonFilterColumnData(cfObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumndata';
- return yield this.dataHelper().postAsync(url, cfObj).then(function (response) {
- return response;
- });
- });
- }
- getCommonFilterTreeData(cfObj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/getcommonfiltertreedata';
- return yield this.dataHelper().postAsync(url, cfObj).then(function (response) {
- return response;
- });
- });
- }
- deleteCommonFilterColumnId(commonfiltercolumnid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/deletecommonfiltercolumn/commonfiltercolumnid/' + commonfiltercolumnid;
- return yield this.dataHelper().postAsync(url, commonfiltercolumnid).then(function (response) {
- return response;
- });
- });
- }
- deleteCommonFilter(commonfilterid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/deletecommonfilter/commonfilterid/' + commonfilterid;
- return yield this.dataHelper().postAsync(url, commonfilterid).then(function (response) {
- return response;
- });
- });
- }
- exportCommonFilter(commonfilterid, portletId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/exportcommonfilters/commonfilterid/' + commonfilterid + "/portletid/" + portletId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- exportReports() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/exportreports/';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- exportreport(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/exportreport/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getReportRoles(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/reportroles/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- addReportRole(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/savereportrole';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- removeReportRole(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/removereportrole';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- setViewable(reportId, viewAll) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/setasviewable/reportid/' + reportId + '/viewall/' + viewAll;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveReportRoleSettings(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/savereportrolesetting';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshStaticObj(reportid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/refreshstaticreportobj/reportid/' + reportid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- saveDynamicFilter(reportid, array) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/savedynamicfilter/' + reportid + "/List";
- return yield this.dataHelper().postAsync(url, array).then(function (response) {
- return response;
- });
- });
- }
- updateReportStatus(reportid, statusid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/updatereportstatus/reportid/' + reportid + "/statusid/" + statusid;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- return response;
- });
- });
- }
- duplicateReport(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/duplicatereport';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- exportDynamicFilters(reportId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/analytics/exportdynamicfilters/reportid/' + reportId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new ReportManager();
- return this._instance;
- }
- }
- Managers.ReportManager = ReportManager;
- })(Managers = Analytics.Managers || (Analytics.Managers = {}));
- })(Analytics = Platform.Analytics || (Platform.Analytics = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|