Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reportmanager.js 37KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  2. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  3. return new (P || (P = Promise))(function (resolve, reject) {
  4. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  5. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  6. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  7. step((generator = generator.apply(thisArg, _arguments || [])).next());
  8. });
  9. };
  10. var Unibase;
  11. (function (Unibase) {
  12. let Platform;
  13. (function (Platform) {
  14. let Analytics;
  15. (function (Analytics) {
  16. let Managers;
  17. (function (Managers) {
  18. class ReportManager extends Platform.Core.BaseManager {
  19. updatecolumns(reportid) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/unibase/platform/analytics/datalistcolumnstring/reportid/' + reportid;
  22. return yield this.dataHelper().getAsync(url).then(function (response) {
  23. return response;
  24. });
  25. });
  26. }
  27. getViewableReports() {
  28. return __awaiter(this, void 0, void 0, function* () {
  29. const url = 'apis/v4/unibase/platform/analytics/viewablereportgroups';
  30. var groups;
  31. return yield this.dataHelper().getAsync(url).then(function (response) {
  32. if (response.result !== null)
  33. response.result = JSON.parse(response.result);
  34. return response;
  35. });
  36. });
  37. }
  38. getViewableReportsByparentgroupid(parentid) {
  39. return __awaiter(this, void 0, void 0, function* () {
  40. const url = 'apis/v4/unibase/platform/analytics/viewablereportgroupswithparent/' + parentid;
  41. return yield this.dataHelper().getAsync(url).then(function (response) {
  42. if (response.result !== null)
  43. response.result = JSON.parse(response.result);
  44. return response;
  45. });
  46. });
  47. }
  48. getReportGroupById(reportgroupid) {
  49. return __awaiter(this, void 0, void 0, function* () {
  50. const url = 'apis/v4/unibase/platform/analytics/reportgroup/reportgroupid/' + reportgroupid;
  51. var groups;
  52. return yield this.dataHelper().getAsync(url).then(function (response) {
  53. if (response.result !== null)
  54. response.result = JSON.parse(response.result);
  55. return response;
  56. });
  57. });
  58. }
  59. getReportGroupByName(groupname) {
  60. return __awaiter(this, void 0, void 0, function* () {
  61. const url = 'apis/v4/unibase/platform/analytics/reportgroupname/reportgroupname/' + groupname;
  62. var groups;
  63. return yield this.dataHelper().getAsync(url).then(function (response) {
  64. if (response.result !== null && response.result !== "")
  65. response.result = JSON.parse(response.result);
  66. return response;
  67. });
  68. });
  69. }
  70. saveReportGroup(obj) {
  71. return __awaiter(this, void 0, void 0, function* () {
  72. const url = 'apis/v4/unibase/platform/analytics/savereportgroup';
  73. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  74. return response;
  75. });
  76. });
  77. }
  78. exportGroupreports(reportgroupid) {
  79. return __awaiter(this, void 0, void 0, function* () {
  80. const url = 'apis/v4/unibase/platform/analytics/exportgroupreports/reportgroupid/' + reportgroupid;
  81. return yield this.dataHelper().getAsync(url).then(function (response) {
  82. return response;
  83. });
  84. });
  85. }
  86. deleteReportGroup(reportgroupid) {
  87. return __awaiter(this, void 0, void 0, function* () {
  88. const url = 'apis/v4/unibase/platform/analytics/deletereportgroup/reportgroupid/' + reportgroupid;
  89. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  90. return response;
  91. });
  92. });
  93. }
  94. getReportGroups() {
  95. return __awaiter(this, void 0, void 0, function* () {
  96. const url = 'apis/v4/bizgaze/integrations/reportgroup/getreportfolders';
  97. return yield this.dataHelper().getAsync(url).then(function (response) {
  98. if (response.result !== null)
  99. response.result = JSON.parse(response.result);
  100. return response;
  101. });
  102. });
  103. }
  104. getReportsbyGroupId(groupid) {
  105. return __awaiter(this, void 0, void 0, function* () {
  106. const url = 'apis/v4/bizgaze/integrations/reportgroup/getreportbygroupid/reportgroupid/' + groupid;
  107. return yield this.dataHelper().getAsync(url).then(function (response) {
  108. if (response.result !== null)
  109. response.result = JSON.parse(response.result);
  110. return response;
  111. });
  112. });
  113. }
  114. checkReportGroupDependency(groupid, parentGroupId) {
  115. return __awaiter(this, void 0, void 0, function* () {
  116. const url = 'apis/v4/unibase/platform/analytics/checkreportgroupdependency/groupid/' + groupid + '/parentgroupid/' + parentGroupId;
  117. return yield this.dataHelper().getAsync(url).then(function (response) {
  118. if (response.result !== null)
  119. response.result = JSON.parse(response.result);
  120. return response;
  121. });
  122. });
  123. }
  124. updateReportGroupStatus(groupid, statusId) {
  125. return __awaiter(this, void 0, void 0, function* () {
  126. const url = 'apis/v4/unibase/platform/analytics/updatereportgroupstatus/reportgroupid/' + groupid + '/statusid/' + statusId;
  127. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  128. if (response.result !== null)
  129. response.result = JSON.parse(response.result);
  130. return response;
  131. });
  132. });
  133. }
  134. getReportById(reportid) {
  135. return __awaiter(this, void 0, void 0, function* () {
  136. const url = 'apis/v4/unibase/platform/analytics/report/' + reportid;
  137. return yield this.dataHelper().getAsync(url).then(function (response) {
  138. if (response.result !== null)
  139. response.result = JSON.parse(response.result);
  140. return response;
  141. });
  142. });
  143. }
  144. getReportByUniqueId(uniqueid) {
  145. return __awaiter(this, void 0, void 0, function* () {
  146. const url = 'apis/v4/unibase/platform/analytics/reportbyuniqueid/' + uniqueid;
  147. return yield this.dataHelper().getAsync(url).then(function (response) {
  148. if (response.result != "" && response.result !== null)
  149. response.result = JSON.parse(response.result);
  150. return response;
  151. });
  152. });
  153. }
  154. getReportByUniqueIdEncoded(encodedUniqueId) {
  155. return __awaiter(this, void 0, void 0, function* () {
  156. const url = 'apis/v4/unibase/platform/analytics/reportbyuniqueidencoded/' + encodedUniqueId;
  157. return yield this.dataHelper().getAsync(url).then(function (response) {
  158. if (response.result != "" && response.result !== null)
  159. response.result = JSON.parse(response.result);
  160. return response;
  161. });
  162. });
  163. }
  164. getReports() {
  165. return __awaiter(this, void 0, void 0, function* () {
  166. const url = 'apis/v4/unibase/platform/analytics/getallreports';
  167. var reports;
  168. return yield this.dataHelper().getAsync(url).then(function (response) {
  169. reports = JSON.parse(response.result);
  170. return reports;
  171. });
  172. });
  173. }
  174. getReportCategoriesByReportId(reportid) {
  175. return __awaiter(this, void 0, void 0, function* () {
  176. const url = 'apis/v4/unibase/platform/analytics/reportcategories/reportid/' + reportid;
  177. return yield this.dataHelper().getAsync(url).then(function (response) {
  178. return response;
  179. });
  180. });
  181. }
  182. getReportInfo(repObj) {
  183. return __awaiter(this, void 0, void 0, function* () {
  184. const url = 'apis/v4/unibase/platform/analytics/reportinfo';
  185. return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
  186. if (response.result !== null) {
  187. response.result = JSON.parse(response.result);
  188. }
  189. return response;
  190. });
  191. });
  192. }
  193. getFullReportInfo(reportid) {
  194. return __awaiter(this, void 0, void 0, function* () {
  195. const url = `apis/v4/unibase/platform/analytics/getfullreportinfo/${reportid}`;
  196. return yield this.dataHelper().getAsync(url).then(function (response) {
  197. if (response.result !== null) {
  198. response.result = JSON.parse(response.result);
  199. }
  200. return response;
  201. });
  202. });
  203. }
  204. getSubReports(reportid) {
  205. return __awaiter(this, void 0, void 0, function* () {
  206. let term = null;
  207. const url = 'apis/v4/unibase/platform/analytics/subreports/reportid/' + reportid;
  208. return yield this.dataHelper().getAsync(url).then(function (response) {
  209. if (response.result)
  210. response.result = JSON.parse(response.result);
  211. return response;
  212. });
  213. });
  214. }
  215. getSubReportById(reportid) {
  216. return __awaiter(this, void 0, void 0, function* () {
  217. let term = null;
  218. const url = 'apis/v4/unibase/platform/analytics/subreportsbyid/subreportid/' + reportid;
  219. return yield this.dataHelper().getAsync(url).then(function (response) {
  220. if (response.result)
  221. response.result = JSON.parse(response.result);
  222. return response;
  223. });
  224. });
  225. }
  226. saveReport(obj) {
  227. return __awaiter(this, void 0, void 0, function* () {
  228. const url = 'apis/v4/unibase/platform/analytics/report';
  229. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  230. return response;
  231. });
  232. });
  233. }
  234. deleteReport(reportid) {
  235. return __awaiter(this, void 0, void 0, function* () {
  236. const url = 'apis/v4/unibase/platform/analytics/deletereport/reportid/' + reportid;
  237. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  238. return response;
  239. });
  240. });
  241. }
  242. getColumns(reportid) {
  243. return __awaiter(this, void 0, void 0, function* () {
  244. let term = null;
  245. const url = 'apis/v4/unibase/platform/analytics/reportcolumns/reportid/' + reportid;
  246. return yield this.dataHelper().getAsync(url).then(function (response) {
  247. if (response.result !== null) {
  248. response.result = JSON.parse(response.result);
  249. }
  250. return response;
  251. });
  252. });
  253. }
  254. getIsContactReportColumns(reportid) {
  255. return __awaiter(this, void 0, void 0, function* () {
  256. let term = null;
  257. const url = 'apis/v4/unibase/platform/analytics/getiscontactreportcolumns/reportid/' + reportid;
  258. return yield this.dataHelper().getAsync(url).then(function (response) {
  259. if (response.result !== null) {
  260. response.result = JSON.parse(response.result);
  261. }
  262. return response;
  263. });
  264. });
  265. }
  266. getReportColumnsByAppId(installedAppId) {
  267. return __awaiter(this, void 0, void 0, function* () {
  268. const url = 'apis/v4/unibase/platform/analytics/getreportcolumnsbyappid/installedappid/' + installedAppId;
  269. return yield this.dataHelper().getAsync(url).then(function (response) {
  270. if (response.result !== null) {
  271. response.result = JSON.parse(response.result);
  272. }
  273. return response;
  274. });
  275. });
  276. }
  277. getReportColumnByAliasName(reportid, aliasName) {
  278. return __awaiter(this, void 0, void 0, function* () {
  279. const url = 'apis/v4/unibase/platform/analytics/getreportcolumnbyaliasname/reportid/' + reportid + '/aliasname/' + aliasName;
  280. return yield this.dataHelper().getAsync(url).then(function (response) {
  281. if (response.result !== null) {
  282. response.result = JSON.parse(response.result);
  283. }
  284. return response;
  285. });
  286. });
  287. }
  288. getDataLists() {
  289. return __awaiter(this, void 0, void 0, function* () {
  290. const url = 'apis/v4/unibase/platform/datalists/getallnoninternaldatalists';
  291. var dataList;
  292. return yield this.dataHelper().getAsync(url).then(function (response) {
  293. dataList = JSON.parse(response.result);
  294. return dataList;
  295. });
  296. });
  297. }
  298. getDataListColumns(datalistid, term, parameters) {
  299. return __awaiter(this, void 0, void 0, function* () {
  300. const url = 'apis/v4/unibase/platform/analytics/datalistcolumns/datalistid/' + datalistid + '/term/' + term + '/parameters/' + parameters;
  301. return yield this.dataHelper().getAsync(url).then(function (response) {
  302. return response;
  303. });
  304. });
  305. }
  306. getTableData(postdata) {
  307. return __awaiter(this, void 0, void 0, function* () {
  308. const url = 'apis/v4/unibase/platform/analytics/reportpreviewdata';
  309. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  310. return response;
  311. });
  312. });
  313. }
  314. getTenureData(postdata) {
  315. return __awaiter(this, void 0, void 0, function* () {
  316. const url = 'apis/v4/unibase/platform/analytics/tenuredata';
  317. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  318. return JSON.parse(response.result);
  319. });
  320. });
  321. }
  322. getReportNamesByGroup(reportgroupid) {
  323. return __awaiter(this, void 0, void 0, function* () {
  324. const url = 'apis/v4/unibase/platform/analytics/reports/reportgroupid/' + reportgroupid;
  325. var reportDetails;
  326. return yield this.dataHelper().getAsync(url).then(function (response) {
  327. if (response.result !== null)
  328. response.result = JSON.parse(response.result);
  329. return response;
  330. });
  331. });
  332. }
  333. refreshReports() {
  334. return __awaiter(this, void 0, void 0, function* () {
  335. const url = 'apis/v4/unibase/platform/analytics/refreshreports/np';
  336. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  337. return response.message;
  338. });
  339. });
  340. }
  341. getHeaderColumns(reportid) {
  342. return __awaiter(this, void 0, void 0, function* () {
  343. const url = 'apis/v4/unibase/platform/analytics/headers/reportid/' + reportid;
  344. var headers;
  345. return yield this.dataHelper().getAsync(url).then(function (response) {
  346. headers = JSON.parse(response.result);
  347. return headers;
  348. });
  349. });
  350. }
  351. getDynamicFilterData(reportid, columnname) {
  352. return __awaiter(this, void 0, void 0, function* () {
  353. const url = 'apis/v4/unibase/platform/analytics/dynamicfilterdata/reportid/' + reportid + '/columnname/' + columnname;
  354. var dynamicfilters;
  355. return yield this.dataHelper().getAsync(url).then(function (response) {
  356. dynamicfilters = JSON.parse(response.result);
  357. return dynamicfilters;
  358. });
  359. });
  360. }
  361. getDynamicFilterCascadingData(dynamicFilObj) {
  362. return __awaiter(this, void 0, void 0, function* () {
  363. const url = 'apis/v4/unibase/platform/analytics/dynamicfiltercascadingdata';
  364. return yield this.dataHelper().postAsync(url, dynamicFilObj).then(function (response) {
  365. return response;
  366. });
  367. });
  368. }
  369. getDynamicFilters(reportid) {
  370. return __awaiter(this, void 0, void 0, function* () {
  371. const url = 'apis/v4/unibase/platform/analytics/dynamicfilters/reportid/' + reportid;
  372. var commonfilters;
  373. return yield this.dataHelper().getAsync(url).then(function (response) {
  374. commonfilters = JSON.parse(response.result);
  375. return commonfilters;
  376. });
  377. });
  378. }
  379. getReportViewerData(repObj) {
  380. return __awaiter(this, void 0, void 0, function* () {
  381. const url = 'apis/v4/unibase/platform/analytics/tabledata';
  382. return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
  383. return response;
  384. });
  385. });
  386. }
  387. getReportCount(repObj) {
  388. return __awaiter(this, void 0, void 0, function* () {
  389. const url = 'apis/v4/unibase/platform/analytics/tablecount';
  390. return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
  391. return response;
  392. });
  393. });
  394. }
  395. getDistinctColumnData(datalistid, columnname, aggregationtypeid, fromdate, todate) {
  396. return __awaiter(this, void 0, void 0, function* () {
  397. const url = 'apis/v4/unibase/platform/analytics/distinctcolumndata/datalistid/' + datalistid + '/columnname/' + columnname + '/aggregationtypeid/' + aggregationtypeid + '/fromdate/' + fromdate + '/todate/' + todate;
  398. return yield this.dataHelper().getAsync(url).then(function (response) {
  399. if (response.result) {
  400. response.result = JSON.parse(response.result);
  401. }
  402. return response.result;
  403. });
  404. });
  405. }
  406. startDownloadLargeFile(repObj) {
  407. return __awaiter(this, void 0, void 0, function* () {
  408. const url = 'apis/v4/unibase/platform/analytics/downloadreportlargefile';
  409. return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
  410. return response;
  411. });
  412. });
  413. }
  414. deleteDynamicFilter(reportid) {
  415. return __awaiter(this, void 0, void 0, function* () {
  416. const url = 'apis/v4/unibase/platform/analytics/deletedynamicfilter/reportid/' + reportid;
  417. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  418. return response;
  419. });
  420. });
  421. }
  422. getCommonFilters(portletid) {
  423. return __awaiter(this, void 0, void 0, function* () {
  424. const url = 'apis/v4/unibase/platform/analytics/commonfilters/portletid/' + portletid;
  425. var commonfilters;
  426. return yield this.dataHelper().getAsync(url).then(function (response) {
  427. if (response.result != "")
  428. commonfilters = JSON.parse(response.result);
  429. return commonfilters;
  430. });
  431. });
  432. }
  433. getCommonFilterColumns(portletid) {
  434. return __awaiter(this, void 0, void 0, function* () {
  435. const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumns/portletid/' + portletid;
  436. var commonfiltercolumns;
  437. return yield this.dataHelper().getAsync(url).then(function (response) {
  438. commonfiltercolumns = JSON.parse(response.result);
  439. return commonfiltercolumns;
  440. });
  441. });
  442. }
  443. getCommonFilterColumnsByCommonFilterId(commonfilterid) {
  444. return __awaiter(this, void 0, void 0, function* () {
  445. const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumnsbycommonfilterid/commonfilterid/' + commonfilterid;
  446. var commonfiltercolumns;
  447. return yield this.dataHelper().getAsync(url).then(function (response) {
  448. commonfiltercolumns = JSON.parse(response.result);
  449. return commonfiltercolumns;
  450. });
  451. });
  452. }
  453. getCommonFiltersByWidgetId(widgetid) {
  454. return __awaiter(this, void 0, void 0, function* () {
  455. const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumnsbywidgetid/widgetid/' + widgetid;
  456. var commonfiltercolumns;
  457. return yield this.dataHelper().getAsync(url).then(function (response) {
  458. commonfiltercolumns = JSON.parse(response.result);
  459. return commonfiltercolumns;
  460. });
  461. });
  462. }
  463. getCommonFilterColumnData(cfObj) {
  464. return __awaiter(this, void 0, void 0, function* () {
  465. const url = 'apis/v4/unibase/platform/analytics/commonfiltercolumndata';
  466. return yield this.dataHelper().postAsync(url, cfObj).then(function (response) {
  467. return response;
  468. });
  469. });
  470. }
  471. getCommonFilterTreeData(cfObj) {
  472. return __awaiter(this, void 0, void 0, function* () {
  473. const url = 'apis/v4/unibase/platform/analytics/getcommonfiltertreedata';
  474. return yield this.dataHelper().postAsync(url, cfObj).then(function (response) {
  475. return response;
  476. });
  477. });
  478. }
  479. deleteCommonFilterColumnId(commonfiltercolumnid) {
  480. return __awaiter(this, void 0, void 0, function* () {
  481. const url = 'apis/v4/unibase/platform/analytics/deletecommonfiltercolumn/commonfiltercolumnid/' + commonfiltercolumnid;
  482. return yield this.dataHelper().postAsync(url, commonfiltercolumnid).then(function (response) {
  483. return response;
  484. });
  485. });
  486. }
  487. deleteCommonFilter(commonfilterid) {
  488. return __awaiter(this, void 0, void 0, function* () {
  489. const url = 'apis/v4/unibase/platform/analytics/deletecommonfilter/commonfilterid/' + commonfilterid;
  490. return yield this.dataHelper().postAsync(url, commonfilterid).then(function (response) {
  491. return response;
  492. });
  493. });
  494. }
  495. exportCommonFilter(commonfilterid, portletId) {
  496. return __awaiter(this, void 0, void 0, function* () {
  497. const url = 'apis/v4/unibase/platform/analytics/exportcommonfilters/commonfilterid/' + commonfilterid + "/portletid/" + portletId;
  498. return yield this.dataHelper().getAsync(url).then(function (response) {
  499. return response;
  500. });
  501. });
  502. }
  503. exportReports() {
  504. return __awaiter(this, void 0, void 0, function* () {
  505. const url = 'apis/v4/unibase/platform/analytics/exportreports/';
  506. return yield this.dataHelper().getAsync(url).then(function (response) {
  507. return response;
  508. });
  509. });
  510. }
  511. exportreport(reportid) {
  512. return __awaiter(this, void 0, void 0, function* () {
  513. const url = 'apis/v4/unibase/platform/analytics/exportreport/reportid/' + reportid;
  514. return yield this.dataHelper().getAsync(url).then(function (response) {
  515. return response;
  516. });
  517. });
  518. }
  519. getReportRoles(reportid) {
  520. return __awaiter(this, void 0, void 0, function* () {
  521. const url = 'apis/v4/unibase/platform/analytics/reportroles/reportid/' + reportid;
  522. return yield this.dataHelper().getAsync(url).then(function (response) {
  523. if (response.result !== null)
  524. response.result = JSON.parse(response.result);
  525. return response;
  526. });
  527. });
  528. }
  529. addReportRole(obj) {
  530. return __awaiter(this, void 0, void 0, function* () {
  531. const url = 'apis/v4/unibase/platform/analytics/savereportrole';
  532. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  533. if (response.result !== null)
  534. response.result = JSON.parse(response.result);
  535. return response;
  536. });
  537. });
  538. }
  539. removeReportRole(obj) {
  540. return __awaiter(this, void 0, void 0, function* () {
  541. const url = 'apis/v4/unibase/platform/analytics/removereportrole';
  542. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  543. if (response.result !== null)
  544. response.result = JSON.parse(response.result);
  545. return response;
  546. });
  547. });
  548. }
  549. setViewable(reportId, viewAll) {
  550. return __awaiter(this, void 0, void 0, function* () {
  551. const url = 'apis/v4/unibase/platform/analytics/setasviewable/reportid/' + reportId + '/viewall/' + viewAll;
  552. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  553. if (response.result !== null)
  554. response.result = JSON.parse(response.result);
  555. return response;
  556. });
  557. });
  558. }
  559. saveReportRoleSettings(obj) {
  560. return __awaiter(this, void 0, void 0, function* () {
  561. const url = 'apis/v4/unibase/platform/analytics/savereportrolesetting';
  562. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  563. if (response.result !== null)
  564. response.result = JSON.parse(response.result);
  565. return response;
  566. });
  567. });
  568. }
  569. refreshStaticObj(reportid) {
  570. return __awaiter(this, void 0, void 0, function* () {
  571. const url = 'apis/v4/unibase/platform/analytics/refreshstaticreportobj/reportid/' + reportid;
  572. return yield this.dataHelper().getAsync(url).then(function (response) {
  573. return response;
  574. });
  575. });
  576. }
  577. saveDynamicFilter(reportid, array) {
  578. return __awaiter(this, void 0, void 0, function* () {
  579. const url = 'apis/v4/unibase/platform/analytics/savedynamicfilter/' + reportid + "/List";
  580. return yield this.dataHelper().postAsync(url, array).then(function (response) {
  581. return response;
  582. });
  583. });
  584. }
  585. updateReportStatus(reportid, statusid) {
  586. return __awaiter(this, void 0, void 0, function* () {
  587. const url = 'apis/v4/unibase/platform/analytics/updatereportstatus/reportid/' + reportid + "/statusid/" + statusid;
  588. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  589. return response;
  590. });
  591. });
  592. }
  593. duplicateReport(obj) {
  594. return __awaiter(this, void 0, void 0, function* () {
  595. const url = 'apis/v4/unibase/platform/analytics/duplicatereport';
  596. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  597. return response;
  598. });
  599. });
  600. }
  601. exportDynamicFilters(reportId) {
  602. return __awaiter(this, void 0, void 0, function* () {
  603. const url = 'apis/v4/unibase/platform/analytics/exportdynamicfilters/reportid/' + reportId;
  604. return yield this.dataHelper().getAsync(url).then(function (response) {
  605. return response;
  606. });
  607. });
  608. }
  609. static Instance() {
  610. if (this._instance === undefined)
  611. this._instance = new ReportManager();
  612. return this._instance;
  613. }
  614. }
  615. Managers.ReportManager = ReportManager;
  616. })(Managers = Analytics.Managers || (Analytics.Managers = {}));
  617. })(Analytics = Platform.Analytics || (Platform.Analytics = {}));
  618. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  619. })(Unibase || (Unibase = {}));