Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

appmanager.js 40KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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 Apps;
  15. (function (Apps) {
  16. let Managers;
  17. (function (Managers) {
  18. class AppManager extends Platform.Core.BaseManager {
  19. getAppGroups() {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. let appgroupname = 'Sales';
  22. const url = 'apis/v4/unibase/platform/apps/' + appgroupname;
  23. return yield this.dataHelper().getAsync(url).then(function (response) {
  24. if (response.result != null) {
  25. response.result = JSON.parse(response.result);
  26. }
  27. return response;
  28. });
  29. });
  30. }
  31. previewDocument(documentFileId) {
  32. var instance = this;
  33. Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('platform/files/managers/filemanager.js', function () {
  34. Unibase.Platform.Files.Managers.FileManager.Instance().getDocumentFile(documentFileId).then(function (response) {
  35. var filePath = response.result.DocumentFilePath;
  36. var result = response.result;
  37. var byteCharacters = atob(result.FileData);
  38. var byteNumbers = new Array(byteCharacters.length);
  39. for (var i = 0; i < byteCharacters.length; i++) {
  40. byteNumbers[i] = byteCharacters.charCodeAt(i);
  41. }
  42. var byteArray = new Uint8Array(byteNumbers);
  43. var file = new Blob([byteArray], { type: result.DocumentFilePath + ';base64' });
  44. var fileURL = URL.createObjectURL(file);
  45. var fileName = result.DocumentFileName + "." + result.FileType;
  46. window.open(result.DocumentFilePath);
  47. });
  48. });
  49. }
  50. refreshApps() {
  51. return __awaiter(this, void 0, void 0, function* () {
  52. const url = 'apis/v4/unibase/platform/apps/refreshapps/np';
  53. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  54. if (response.result != null) {
  55. response.result = JSON.parse(response.result);
  56. }
  57. return response;
  58. });
  59. });
  60. }
  61. getParentApps() {
  62. return __awaiter(this, void 0, void 0, function* () {
  63. const url = 'apis/v4/unibase/platform/apps/getparentapps';
  64. return yield this.dataHelper().getAsync(url).then(function (response) {
  65. if (response.result != null) {
  66. response.result = JSON.parse(response.result);
  67. }
  68. return response;
  69. });
  70. });
  71. }
  72. updateAppProvider(appproviderid, datalistid) {
  73. return __awaiter(this, void 0, void 0, function* () {
  74. const url = 'apis/v4/unibase/platform/apps/updatereportid/appproviderid/' + appproviderid + '/datalistid/' + datalistid;
  75. var result = "";
  76. yield this.dataHelper().post(url, null, function (response) {
  77. result = JSON.parse(response.result);
  78. }, function (response) {
  79. result = JSON.parse(response.result);
  80. });
  81. return result;
  82. });
  83. }
  84. saveDynamicApp(obj) {
  85. return __awaiter(this, void 0, void 0, function* () {
  86. const url = 'apis/v4/unibase/platform/apps/savedynamicapp';
  87. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  88. if (response.result != null) {
  89. response.result = JSON.parse(response.result);
  90. }
  91. return response;
  92. });
  93. });
  94. }
  95. updateDynamicApp(obj) {
  96. return __awaiter(this, void 0, void 0, function* () {
  97. const url = 'apis/v4/unibase/platform/apps/updatedynamicapp';
  98. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  99. if (response.result != null) {
  100. response.result = JSON.parse(response.result);
  101. }
  102. return response;
  103. });
  104. });
  105. }
  106. geAppInfoandappConfigurationInfo(installeappid, appconfigurationid) {
  107. return __awaiter(this, void 0, void 0, function* () {
  108. const url = 'apis/v4/unibase/platform/apps/getappinfoandconfigurationinfo/installedappid/' + installeappid + '/appconfigurationid/' + appconfigurationid;
  109. return yield this.dataHelper().getAsync(url).then(function (response) {
  110. if (response.result != null && response.result != "") {
  111. response.result = JSON.parse(response.result);
  112. }
  113. return response;
  114. });
  115. });
  116. }
  117. updateAppStatus(installedAppId, statusId) {
  118. return __awaiter(this, void 0, void 0, function* () {
  119. const url = 'apis/v4/unibase/platform/apps/updateappstatus/installedappid/' + installedAppId + '/statusid/' + statusId;
  120. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  121. if (response.result != null) {
  122. response.result = JSON.parse(response.result);
  123. }
  124. return response;
  125. });
  126. });
  127. }
  128. updateWishList(installedAppId, statusId) {
  129. return __awaiter(this, void 0, void 0, function* () {
  130. const url = 'apis/v4/unibase/platform/apps/updatewishlist/installedappid/' + installedAppId + '/status/' + statusId;
  131. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  132. if (response.result != null) {
  133. response.result = JSON.parse(response.result);
  134. }
  135. return response;
  136. });
  137. });
  138. }
  139. saveStatus(statusid, doctypeid, recordid, versionguid) {
  140. return __awaiter(this, void 0, void 0, function* () {
  141. const url = 'apis/v4/unibase/platform/apps/savestatus/statusid/' + statusid + '/doctypeid/' + doctypeid + '/recordid/' + recordid + '/versionguid/' + versionguid;
  142. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  143. if (response.result != null) {
  144. response.result = JSON.parse(response.result);
  145. }
  146. return response;
  147. });
  148. });
  149. }
  150. getInstallApp(installeappid) {
  151. return __awaiter(this, void 0, void 0, function* () {
  152. const url = 'apis/v4/unibase/platform/apps/getinstalledapp/id/' + installeappid;
  153. return yield this.dataHelper().getAsync(url).then(function (response) {
  154. if (response.result != null && response.result != "") {
  155. response.result = JSON.parse(response.result);
  156. }
  157. return response;
  158. });
  159. });
  160. }
  161. getAppVersion(versionid) {
  162. return __awaiter(this, void 0, void 0, function* () {
  163. const url = 'apis/v4/unibase/platform/apps/getappversionid/id/' + versionid;
  164. return yield this.dataHelper().getAsync(url).then(function (response) {
  165. if (response.result != null && response.result != "") {
  166. response.result = JSON.parse(response.result);
  167. }
  168. return response;
  169. });
  170. });
  171. }
  172. getApp(appid) {
  173. return __awaiter(this, void 0, void 0, function* () {
  174. const url = 'apis/v4/unibase/platform/apps/getappid/id/' + appid;
  175. return yield this.dataHelper().getAsync(url).then(function (response) {
  176. if (response.result != null && response.result != "") {
  177. response.result = JSON.parse(response.result);
  178. }
  179. return response;
  180. });
  181. });
  182. }
  183. getDocumentFileId(documentid) {
  184. return __awaiter(this, void 0, void 0, function* () {
  185. const url = 'apis/v4/unibase/platform/apps/getdocumentfileid/id/' + documentid;
  186. return yield this.dataHelper().getAsync(url).then(function (response) {
  187. if (response.result != null && response.result != "") {
  188. response.result = JSON.parse(response.result);
  189. }
  190. return response;
  191. });
  192. });
  193. }
  194. getWidgetVersion(widgetid) {
  195. return __awaiter(this, void 0, void 0, function* () {
  196. const url = 'apis/v4/unibase/platform/apps/getwidgetid/id/' + widgetid;
  197. return yield this.dataHelper().getAsync(url).then(function (response) {
  198. if (response.result != null && response.result != "") {
  199. response.result = JSON.parse(response.result);
  200. }
  201. return response;
  202. });
  203. });
  204. }
  205. getDashboardVersion(portletid) {
  206. return __awaiter(this, void 0, void 0, function* () {
  207. const url = 'apis/v4/unibase/platform/apps/getportletid/id/' + portletid;
  208. return yield this.dataHelper().getAsync(url).then(function (response) {
  209. if (response.result != null && response.result != "") {
  210. response.result = JSON.parse(response.result);
  211. }
  212. return response;
  213. });
  214. });
  215. }
  216. getCurrentDashboardVersion(portletid) {
  217. return __awaiter(this, void 0, void 0, function* () {
  218. const url = 'apis/v4/unibase/platform/apps/getcurrentportletversion/id/' + portletid;
  219. return yield this.dataHelper().getAsync(url).then(function (response) {
  220. if (response.result != null && response.result != "") {
  221. response.result = JSON.parse(response.result);
  222. }
  223. return response;
  224. });
  225. });
  226. }
  227. getReportVersion(reportId) {
  228. return __awaiter(this, void 0, void 0, function* () {
  229. const url = 'apis/v4/unibase/platform/apps/getreportid/id/' + reportId;
  230. return yield this.dataHelper().getAsync(url).then(function (response) {
  231. if (response.result != null && response.result != "") {
  232. response.result = JSON.parse(response.result);
  233. }
  234. return response;
  235. });
  236. });
  237. }
  238. getCurrentReportVersion(reportId) {
  239. return __awaiter(this, void 0, void 0, function* () {
  240. const url = 'apis/v4/unibase/platform/apps/getcurrentversiond/id/' + reportId;
  241. return yield this.dataHelper().getAsync(url).then(function (response) {
  242. if (response.result != null && response.result != "") {
  243. response.result = JSON.parse(response.result);
  244. }
  245. return response;
  246. });
  247. });
  248. }
  249. getAllApps(installeappid) {
  250. return __awaiter(this, void 0, void 0, function* () {
  251. const url = 'apis/v4/unibase/platform/apps/getallapps/installedappid/' + installeappid;
  252. return yield this.dataHelper().getAsync(url).then(function (response) {
  253. if (response.result != null && response.result != "") {
  254. response.result = JSON.parse(response.result);
  255. }
  256. return response;
  257. });
  258. });
  259. }
  260. getInstallAppId(uniqueid) {
  261. return __awaiter(this, void 0, void 0, function* () {
  262. const url = 'apis/v4/unibase/platform/apps/getinstalledappid/uniqueid/' + uniqueid;
  263. return yield this.dataHelper().getAsync(url).then(function (response) {
  264. if (response.result != null && response.result != "") {
  265. response.result = JSON.parse(response.result);
  266. }
  267. return response;
  268. });
  269. });
  270. }
  271. getInstalledApps() {
  272. return __awaiter(this, void 0, void 0, function* () {
  273. const url = 'apis/v4/unibase/platform/apps/getinstalledapps';
  274. return yield this.dataHelper().getAsync(url).then(function (response) {
  275. if (response.result != null) {
  276. response.result = JSON.parse(response.result);
  277. }
  278. return response;
  279. });
  280. });
  281. }
  282. getChildApps(installedappid) {
  283. return __awaiter(this, void 0, void 0, function* () {
  284. const url = 'apis/v4/unibase/platform/apps/getchildapps/parentid/' + installedappid;
  285. return yield this.dataHelper().getAsync(url).then(function (response) {
  286. if (response.result != null) {
  287. response.result = JSON.parse(response.result);
  288. }
  289. return response;
  290. });
  291. });
  292. }
  293. getChilds(installedappid) {
  294. return __awaiter(this, void 0, void 0, function* () {
  295. const url = 'apis/v4/unibase/platform/apps/getchilds/parentid/' + installedappid;
  296. return yield this.dataHelper().getAsync(url).then(function (response) {
  297. if (response.result != null) {
  298. response.result = JSON.parse(response.result);
  299. }
  300. return response;
  301. });
  302. });
  303. }
  304. getdependentApps(installedappid) {
  305. return __awaiter(this, void 0, void 0, function* () {
  306. const url = 'apis/v4/unibase/platform/apps/getdependentapps/' + installedappid;
  307. return yield this.dataHelper().getAsync(url).then(function (response) {
  308. if (response.result != null) {
  309. response.result = JSON.parse(response.result);
  310. }
  311. return response;
  312. });
  313. });
  314. }
  315. updateAppIndex(obj) {
  316. return __awaiter(this, void 0, void 0, function* () {
  317. const url = 'apis/v4/unibase/platform/apps/updateindexes/';
  318. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  319. if (response.result != null) {
  320. response.result = JSON.parse(response.result);
  321. }
  322. return response;
  323. });
  324. });
  325. }
  326. duplicateApp(obj) {
  327. return __awaiter(this, void 0, void 0, function* () {
  328. const url = 'apis/v4/unibase/platform/apps/duplicateapp';
  329. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  330. if (response.result != null) {
  331. response.result = JSON.parse(response.result);
  332. }
  333. return response;
  334. });
  335. });
  336. }
  337. getAppPermission(apppermissionid) {
  338. return __awaiter(this, void 0, void 0, function* () {
  339. const url = 'apis/v4/unibase/platform/apps/getapppermission/apppermissionid/' + apppermissionid;
  340. return yield this.dataHelper().getAsync(url).then(function (response) {
  341. if (response.result !== null)
  342. response.result = JSON.parse(response.result);
  343. return response;
  344. });
  345. });
  346. }
  347. getAppPermissions(installedAppId) {
  348. return __awaiter(this, void 0, void 0, function* () {
  349. const url = 'apis/v4/unibase/platform/apps/getapppermissions/installedappid/' + installedAppId;
  350. return yield this.dataHelper().getAsync(url).then(function (response) {
  351. if (response.result !== null)
  352. response.result = JSON.parse(response.result);
  353. return response;
  354. });
  355. });
  356. }
  357. saveAppPermission(obj) {
  358. return __awaiter(this, void 0, void 0, function* () {
  359. const url = 'apis/v4/unibase/platform/apps/saveapppermissionid';
  360. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  361. if (response.result !== null)
  362. response.result = JSON.parse(response.result);
  363. return response;
  364. });
  365. });
  366. }
  367. deleteAppPermission(apppermissionid) {
  368. return __awaiter(this, void 0, void 0, function* () {
  369. const url = 'apis/v4/unibase/platform/apps/deleteapppermission/apppermissionid/' + apppermissionid;
  370. return yield this.dataHelper().postAsync(url, null);
  371. });
  372. }
  373. getAppPermissionBySystemName(installedAppId, SystemName) {
  374. return __awaiter(this, void 0, void 0, function* () {
  375. const url = 'apis/v4/unibase/platform/apps/getapppermissions/installedappid/' + installedAppId + "/systemname/" + SystemName;
  376. var approlesettings;
  377. return yield this.dataHelper().getAsync(url).then(function (response) {
  378. if (response.result !== null)
  379. response.result = JSON.parse(response.result);
  380. return response;
  381. });
  382. });
  383. }
  384. getAllAppConfigurations(installedappid) {
  385. return __awaiter(this, void 0, void 0, function* () {
  386. const url = 'apis/v4/unibase/platform/apps/getappconfigurations/installedappid/' + installedappid;
  387. return yield this.dataHelper().getAsync(url).then(function (response) {
  388. if (response.result != null) {
  389. response.result = JSON.parse(response.result);
  390. }
  391. return response;
  392. });
  393. });
  394. }
  395. getListAppConfigurations(installedappid) {
  396. return __awaiter(this, void 0, void 0, function* () {
  397. const url = 'apis/v4/unibase/platform/apps/listappconfigurations/installedappid/' + installedappid;
  398. return yield this.dataHelper().getAsync(url).then(function (response) {
  399. if (response.result != null) {
  400. response.result = JSON.parse(response.result);
  401. }
  402. return response;
  403. });
  404. });
  405. }
  406. getDetailAppConfigurations(installedappid) {
  407. return __awaiter(this, void 0, void 0, function* () {
  408. const url = 'apis/v4/unibase/platform/apps/detailappconfigurations/installedappid/' + installedappid;
  409. return yield this.dataHelper().getAsync(url).then(function (response) {
  410. if (response.result != null) {
  411. response.result = JSON.parse(response.result);
  412. }
  413. return response;
  414. });
  415. });
  416. }
  417. getFormAppConfigurations(installedappid) {
  418. return __awaiter(this, void 0, void 0, function* () {
  419. const url = 'apis/v4/unibase/platform/apps/getformconfigurations/installedappid/' + installedappid;
  420. return yield this.dataHelper().getAsync(url).then(function (response) {
  421. if (response.result != null) {
  422. response.result = JSON.parse(response.result);
  423. }
  424. return response;
  425. });
  426. });
  427. }
  428. getAppConfiguration(appconfigurationid) {
  429. return __awaiter(this, void 0, void 0, function* () {
  430. const url = 'apis/v4/unibase/platform/apps/getconfiguration/id/' + appconfigurationid;
  431. return yield this.dataHelper().getAsync(url).then(function (response) {
  432. if (response.result != null) {
  433. response.result = JSON.parse(response.result);
  434. }
  435. return response;
  436. });
  437. });
  438. }
  439. getAppConfigurationByUniqueId(uniqueId) {
  440. return __awaiter(this, void 0, void 0, function* () {
  441. const url = 'apis/v4/unibase/platform/apps/getconfiguration/uniqueid/' + uniqueId;
  442. return yield this.dataHelper().getAsync(url).then(function (response) {
  443. if (response.result != null) {
  444. response.result = JSON.parse(response.result);
  445. }
  446. return response;
  447. });
  448. });
  449. }
  450. saveAppConfiguration(obj) {
  451. return __awaiter(this, void 0, void 0, function* () {
  452. const url = 'apis/v4/unibase/platform/apps/saveappconfiguration';
  453. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  454. if (response.result != null) {
  455. response.result = JSON.parse(response.result);
  456. }
  457. return response;
  458. });
  459. });
  460. }
  461. deleteAppConfiguration(appConfigurationId) {
  462. return __awaiter(this, void 0, void 0, function* () {
  463. const url = 'apis/v4/unibase/platform/apps/delete/id/' + appConfigurationId;
  464. return yield this.dataHelper().postAsync(url, null);
  465. });
  466. }
  467. updateConfigurationStatus(appConfigurationId, statusId) {
  468. return __awaiter(this, void 0, void 0, function* () {
  469. const url = 'apis/v4/unibase/platform/apps/updatestatus/appconfigurationid/' + appConfigurationId + '/statusid/' + statusId;
  470. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  471. if (response.result != null) {
  472. response.result = JSON.parse(response.result);
  473. }
  474. return response;
  475. });
  476. });
  477. }
  478. getUserApps() {
  479. return __awaiter(this, void 0, void 0, function* () {
  480. var url = "apis/v4/unibase/platform/apps/userapps/contactid/" + Platform.Membership.Infos.Identity.getCurrentUser().userId;
  481. return yield this.dataHelper().getAsync(url).then(function (response) {
  482. if (response.result !== null)
  483. response.result = JSON.parse(response.result);
  484. return response;
  485. });
  486. });
  487. }
  488. getMyApps() {
  489. return __awaiter(this, void 0, void 0, function* () {
  490. var url = "apis/v4/unibase/platform/apps/myapps";
  491. return yield this.dataHelper().getAsync(url).then(function (response) {
  492. if (response.result !== null)
  493. response.result = JSON.parse(response.result);
  494. return response;
  495. });
  496. });
  497. }
  498. exportApp(installedappid) {
  499. return __awaiter(this, void 0, void 0, function* () {
  500. const url = 'apis/v4/unibase/platform/apps/exportapp/' + installedappid;
  501. return yield this.dataHelper().getAsync(url).then(function (response) {
  502. if (response.result != null) {
  503. response.result = response.result;
  504. }
  505. return response;
  506. });
  507. });
  508. }
  509. exportAppRoleSettings() {
  510. return __awaiter(this, void 0, void 0, function* () {
  511. const url = 'apis/v4/unibase/platform/apps/exportapprolesettings';
  512. return yield this.dataHelper().getAsync(url).then(function (response) {
  513. if (response.result != null) {
  514. response.result = response.result;
  515. }
  516. return response;
  517. });
  518. });
  519. }
  520. saveVersion(obj) {
  521. return __awaiter(this, void 0, void 0, function* () {
  522. debugger;
  523. const url = 'apis/v4/unibase/platform/apps/saveversion';
  524. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  525. if (response.result != null) {
  526. response.result = JSON.parse(response.result);
  527. }
  528. return response;
  529. });
  530. });
  531. }
  532. getCurrentVersionByApp(installedappid) {
  533. return __awaiter(this, void 0, void 0, function* () {
  534. var url = "apis/v4/unibase/platform/apps/getcurrentversionbyapp/" + installedappid;
  535. return yield this.dataHelper().getAsync(url).then(function (response) {
  536. return response;
  537. });
  538. });
  539. }
  540. upgradeApp(installedappid, versionno) {
  541. return __awaiter(this, void 0, void 0, function* () {
  542. var url = "apis/v4/unibase/platform/apps/upgradeappversion/installedappid/" + installedappid + "/versionno/" + versionno;
  543. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  544. if (response.result != null) {
  545. response.result = JSON.parse(response.result);
  546. }
  547. return response;
  548. });
  549. });
  550. }
  551. upgradeAvailableApp(installedappid) {
  552. return __awaiter(this, void 0, void 0, function* () {
  553. var url = "apis/v4/unibase/platform/apps/UpgradeAppAvailable/installedappid/" + installedappid;
  554. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  555. if (response.result != null) {
  556. response.result = JSON.parse(response.result);
  557. }
  558. return response;
  559. });
  560. });
  561. }
  562. upgradeWidgetVersionAvailable(widgetid) {
  563. return __awaiter(this, void 0, void 0, function* () {
  564. var url = "apis/v4/unibase/platform/apps/upgradewidgetversionavailable/widgetid/" + widgetid;
  565. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  566. if (response.result != null) {
  567. response.result = JSON.parse(response.result);
  568. }
  569. return response;
  570. });
  571. });
  572. }
  573. upgradeDashboardVersionAvailable(portletid) {
  574. return __awaiter(this, void 0, void 0, function* () {
  575. var url = "apis/v4/unibase/platform/apps/upgradedashboardversionavailable/portletid/" + portletid;
  576. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  577. debugger;
  578. if (response.result != null) {
  579. response.result = JSON.parse(response.result);
  580. }
  581. return response;
  582. });
  583. });
  584. }
  585. upgradeReportVersionAvailable(reportId) {
  586. return __awaiter(this, void 0, void 0, function* () {
  587. var url = "apis/v4/unibase/platform/apps/upgradereportversion/reportid/" + reportId;
  588. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  589. debugger;
  590. if (response.result != null) {
  591. response.result = JSON.parse(response.result);
  592. }
  593. return response;
  594. });
  595. });
  596. }
  597. checkAppPermission(installedAppId) {
  598. return __awaiter(this, void 0, void 0, function* () {
  599. var url = "apis/v4/unibase/platform/apps/checkapppermission/installedappid/" + installedAppId;
  600. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  601. if (response.result != null) {
  602. response.result = JSON.parse(response.result);
  603. }
  604. return response;
  605. });
  606. });
  607. }
  608. exportAppPermissions(appId) {
  609. return __awaiter(this, void 0, void 0, function* () {
  610. const url = 'apis/v4/unibase/platform/apps/exportapppermissions/installedappid/' + appId;
  611. return yield this.dataHelper().getAsync(url).then(function (response) {
  612. if (response.result != null) {
  613. response.result = response.result;
  614. }
  615. return response;
  616. });
  617. });
  618. }
  619. getSettingApps() {
  620. return __awaiter(this, void 0, void 0, function* () {
  621. const url = 'apis/v4/unibase/platform/apps/getsettingapps';
  622. return yield this.dataHelper().getAsync(url).then(function (response) {
  623. if (response.result != null) {
  624. response.result = JSON.parse(response.result);
  625. }
  626. return response;
  627. });
  628. });
  629. }
  630. getDevApps() {
  631. return __awaiter(this, void 0, void 0, function* () {
  632. const url = 'apis/v4/unibase/platform/apps/getdevapps';
  633. return yield this.dataHelper().getAsync(url).then(function (response) {
  634. if (response.result != null) {
  635. response.result = JSON.parse(response.result);
  636. }
  637. return response;
  638. });
  639. });
  640. }
  641. executeProc(procName) {
  642. return __awaiter(this, void 0, void 0, function* () {
  643. const url = 'apis/v4/unibase/platform/apps/executestoredprocedure/procname/' + procName;
  644. return yield this.dataHelper().postAsync(url, '{}').then(function (response) {
  645. if (response.result != null) {
  646. response.result = JSON.parse(response.result);
  647. }
  648. return response;
  649. });
  650. });
  651. }
  652. getActiveUserApps() {
  653. return __awaiter(this, void 0, void 0, function* () {
  654. var url = "apis/v4/unibase/platform/apps/getactiveuserapps";
  655. return yield this.dataHelper().getAsync(url).then(function (response) {
  656. if (response.result !== null)
  657. response.result = JSON.parse(response.result);
  658. return response;
  659. });
  660. });
  661. }
  662. getConfigurationApps() {
  663. return __awaiter(this, void 0, void 0, function* () {
  664. const url = 'apis/v4/unibase/platform/apps/getconfigurationapps';
  665. return yield this.dataHelper().getAsync(url).then(function (response) {
  666. if (response.result != null) {
  667. response.result = JSON.parse(response.result);
  668. }
  669. return response;
  670. });
  671. });
  672. }
  673. static Instance() {
  674. if (this._instance === undefined)
  675. this._instance = new AppManager();
  676. return this._instance;
  677. }
  678. }
  679. Managers.AppManager = AppManager;
  680. })(Managers = Apps.Managers || (Apps.Managers = {}));
  681. })(Apps = Platform.Apps || (Platform.Apps = {}));
  682. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  683. })(Unibase || (Unibase = {}));