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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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 ViewerManager extends Platform.Core.BaseManager {
  19. getTemplateViews() {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/unibase/platform/analytics/templateviews';
  22. return yield this.dataHelper().getAsync(url).then(function (response) {
  23. if (response.result !== null) {
  24. response.result = JSON.parse(response.result);
  25. }
  26. return response;
  27. });
  28. });
  29. }
  30. getTemplateView(templateviewid) {
  31. return __awaiter(this, void 0, void 0, function* () {
  32. const url = 'apis/v4/unibase/platform/analytics/templateview/' + templateviewid;
  33. return yield this.dataHelper().getAsync(url).then(function (response) {
  34. if (response.result !== null) {
  35. response.result = JSON.parse(response.result);
  36. }
  37. return response;
  38. });
  39. });
  40. }
  41. getReportTemplate(ReportId) {
  42. return __awaiter(this, void 0, void 0, function* () {
  43. const url = 'apis/v4/unibase/platform/analytics/templateview/reportid/' + ReportId;
  44. return yield this.dataHelper().getAsync(url).then(function (response) {
  45. return JSON.parse(response.result);
  46. });
  47. });
  48. }
  49. getSubTemplate(templateviewid) {
  50. return __awaiter(this, void 0, void 0, function* () {
  51. const url = 'apis/v4/unibase/platform/analytics/subtemplates/templateviewid/' + templateviewid;
  52. return yield this.dataHelper().getAsync(url).then(function (response) {
  53. if (response.result !== null) {
  54. response.result = JSON.parse(response.result);
  55. }
  56. return response;
  57. });
  58. });
  59. }
  60. saveTemplateView(obj) {
  61. return __awaiter(this, void 0, void 0, function* () {
  62. const url = 'apis/v4/unibase/platform/analytics/templateview';
  63. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  64. return response;
  65. });
  66. });
  67. }
  68. deleteTemplate(templateviewid, reportid) {
  69. return __awaiter(this, void 0, void 0, function* () {
  70. const url = 'apis/v4/unibase/platform/analytics/deletetemplateview/templateviewid/' + templateviewid + '/reportid/' + reportid;
  71. return yield this.dataHelper().postAsync(url, templateviewid).then(function (response) {
  72. return response;
  73. });
  74. });
  75. }
  76. getTemplates(templateNames) {
  77. return __awaiter(this, void 0, void 0, function* () {
  78. const url = 'apis/v4/unibase/platform/analytics/gettempates/tempatenames/' + templateNames;
  79. return yield this.dataHelper().getAsync(url).then(function (response) {
  80. if (response.result !== null) {
  81. response.result = JSON.parse(response.result);
  82. }
  83. return response;
  84. });
  85. });
  86. }
  87. getCalendarView(calendarviewid) {
  88. return __awaiter(this, void 0, void 0, function* () {
  89. const url = 'apis/v4/unibase/platform/analytics/calendarview/' + calendarviewid;
  90. return yield this.dataHelper().getAsync(url).then(function (response) {
  91. if (response.result !== null) {
  92. response.result = JSON.parse(response.result);
  93. }
  94. return response;
  95. });
  96. });
  97. }
  98. saveCalendarView(obj) {
  99. return __awaiter(this, void 0, void 0, function* () {
  100. const url = 'apis/v4/unibase/platform/analytics/calendarview';
  101. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  102. return response;
  103. });
  104. });
  105. }
  106. getMapView(mapviewid) {
  107. return __awaiter(this, void 0, void 0, function* () {
  108. const url = 'apis/v4/unibase/platform/analytics/mapview/' + mapviewid;
  109. return yield this.dataHelper().getAsync(url).then(function (response) {
  110. if (response.result !== null) {
  111. response.result = JSON.parse(response.result);
  112. }
  113. return response;
  114. });
  115. });
  116. }
  117. saveMapView(obj) {
  118. return __awaiter(this, void 0, void 0, function* () {
  119. const url = 'apis/v4/unibase/platform/analytics/mapview';
  120. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  121. return response;
  122. });
  123. });
  124. }
  125. getCardView(CardViewId) {
  126. return __awaiter(this, void 0, void 0, function* () {
  127. const url = 'apis/v4/unibase/platform/analytics/cardview/' + CardViewId;
  128. return yield this.dataHelper().getAsync(url).then(function (response) {
  129. return JSON.parse(response.result);
  130. });
  131. });
  132. }
  133. getCardViewerData(repObj) {
  134. return __awaiter(this, void 0, void 0, function* () {
  135. const url = 'apis/v4/unibase/platform/analytics/kanban';
  136. return yield this.dataHelper().postAsync(url, repObj).then(function (response) {
  137. return JSON.parse(response.result);
  138. });
  139. });
  140. }
  141. saveCardView(obj) {
  142. return __awaiter(this, void 0, void 0, function* () {
  143. const url = 'apis/v4/unibase/platform/analytics/cardview';
  144. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  145. return response;
  146. });
  147. });
  148. }
  149. getReportViewerTypes(reportid) {
  150. return __awaiter(this, void 0, void 0, function* () {
  151. const url = 'apis/v4/unibase/platform/analytics/viewertypes/reportid/' + reportid;
  152. return yield this.dataHelper().getAsync(url).then(function (response) {
  153. if (response.result !== null) {
  154. response.result = JSON.parse(response.result);
  155. }
  156. return response;
  157. });
  158. });
  159. }
  160. deleteViewer(reportid, viewerid, viewertypeid) {
  161. return __awaiter(this, void 0, void 0, function* () {
  162. const url = 'apis/v4/unibase/platform/analytics/deleteviewer/reportid/' + reportid + "/viewerid/" + viewerid + "/viewertypeid/" + viewertypeid;
  163. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  164. if (response.result !== null) {
  165. response.result = JSON.parse(response.result);
  166. }
  167. return response;
  168. });
  169. });
  170. }
  171. updateViewerStatus(viewerid, viewertypeid) {
  172. return __awaiter(this, void 0, void 0, function* () {
  173. const url = 'apis/v4/unibase/platform/analytics/updateviewerstatus/viewerid/' + viewerid + "/viewertypeid/" + viewertypeid;
  174. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  175. return response;
  176. });
  177. });
  178. }
  179. getViewer(viewerid) {
  180. return __awaiter(this, void 0, void 0, function* () {
  181. const url = 'apis/v4/unibase/platform/analytics/getviewer/viewerid/' + viewerid;
  182. return yield this.dataHelper().getAsync(url).then(function (response) {
  183. if (response.result !== null)
  184. response.result = JSON.parse(response.result);
  185. return response;
  186. });
  187. });
  188. }
  189. getViewerRoles(viewerid, reportid) {
  190. return __awaiter(this, void 0, void 0, function* () {
  191. const url = 'apis/v4/unibase/platform/analytics/getviewerroles/viewerid/' + viewerid + '/reportid/' + reportid;
  192. return yield this.dataHelper().getAsync(url).then(function (response) {
  193. if (response.result !== null)
  194. response.result = JSON.parse(response.result);
  195. return response;
  196. });
  197. });
  198. }
  199. addViewerRole(obj) {
  200. return __awaiter(this, void 0, void 0, function* () {
  201. const url = 'apis/v4/unibase/platform/analytics/saveviewerrole';
  202. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  203. if (response.result !== null)
  204. response.result = JSON.parse(response.result);
  205. return response;
  206. });
  207. });
  208. }
  209. removeViewerRole(obj) {
  210. return __awaiter(this, void 0, void 0, function* () {
  211. const url = 'apis/v4/unibase/platform/analytics/removeviewerrole';
  212. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  213. if (response.result !== null)
  214. response.result = JSON.parse(response.result);
  215. return response;
  216. });
  217. });
  218. }
  219. setViewable(viewerid, viewAll, viewerTypeId) {
  220. return __awaiter(this, void 0, void 0, function* () {
  221. const url = 'apis/v4/unibase/platform/analytics/setasviewerviewable/viewerid/' + viewerid + '/viewall/' + viewAll + '/viewerTypeId/' + viewerTypeId;
  222. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  223. if (response.result !== null)
  224. response.result = JSON.parse(response.result);
  225. return response;
  226. });
  227. });
  228. }
  229. exportViewers(viewerId, reportId) {
  230. return __awaiter(this, void 0, void 0, function* () {
  231. const url = 'apis/v4/unibase/platform/analytics/exportreportviewers/reportid/' + reportId + '/viewerid/' + viewerId;
  232. return yield this.dataHelper().getAsync(url).then(function (response) {
  233. return response;
  234. });
  235. });
  236. }
  237. static Instance() {
  238. if (this._instance === undefined)
  239. this._instance = new ViewerManager();
  240. return this._instance;
  241. }
  242. }
  243. Managers.ViewerManager = ViewerManager;
  244. })(Managers = Analytics.Managers || (Analytics.Managers = {}));
  245. })(Analytics = Platform.Analytics || (Platform.Analytics = {}));
  246. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  247. })(Unibase || (Unibase = {}));