Built files from Bizgaze WebServer
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  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. appUniqueId(uniqueid) {
  184. return __awaiter(this, void 0, void 0, function* () {
  185. const url = 'apis/v4/unibase/platform/apps/getappuniqueid/appuniqueid/' + uniqueid;
  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. getUniqueId(uniqueid) {
  195. return __awaiter(this, void 0, void 0, function* () {
  196. const url = 'apis/v4/unibase/platform/apps/getuniqueid/uniqueid/' + uniqueid;
  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. getDocumentFileId(documentid) {
  206. return __awaiter(this, void 0, void 0, function* () {
  207. const url = 'apis/v4/unibase/platform/apps/getdocumentfileid/id/' + documentid;
  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. getWidgetVersion(widgetid) {
  217. return __awaiter(this, void 0, void 0, function* () {
  218. const url = 'apis/v4/unibase/platform/apps/getwidgetid/id/' + widgetid;
  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. getDashboardVersion(portletid) {
  228. return __awaiter(this, void 0, void 0, function* () {
  229. const url = 'apis/v4/unibase/platform/apps/getportletid/id/' + portletid;
  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. getCurrentDashboardVersion(portletid) {
  239. return __awaiter(this, void 0, void 0, function* () {
  240. const url = 'apis/v4/unibase/platform/apps/getcurrentportletversion/id/' + portletid;
  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. getReportVersion(reportId) {
  250. return __awaiter(this, void 0, void 0, function* () {
  251. const url = 'apis/v4/unibase/platform/apps/getreportid/id/' + reportId;
  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. getCurrentReportVersion(reportId) {
  261. return __awaiter(this, void 0, void 0, function* () {
  262. const url = 'apis/v4/unibase/platform/apps/getcurrentversiond/id/' + reportId;
  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. getAllApps(installeappid) {
  272. return __awaiter(this, void 0, void 0, function* () {
  273. const url = 'apis/v4/unibase/platform/apps/getallapps/installedappid/' + installeappid;
  274. return yield this.dataHelper().getAsync(url).then(function (response) {
  275. if (response.result != null && response.result != "") {
  276. response.result = JSON.parse(response.result);
  277. }
  278. return response;
  279. });
  280. });
  281. }
  282. getInstallAppId(uniqueid) {
  283. return __awaiter(this, void 0, void 0, function* () {
  284. const url = 'apis/v4/unibase/platform/apps/getinstalledappid/uniqueid/' + uniqueid;
  285. return yield this.dataHelper().getAsync(url).then(function (response) {
  286. if (response.result != null && response.result != "") {
  287. response.result = JSON.parse(response.result);
  288. }
  289. return response;
  290. });
  291. });
  292. }
  293. getInstalledApps() {
  294. return __awaiter(this, void 0, void 0, function* () {
  295. const url = 'apis/v4/unibase/platform/apps/getinstalledapps';
  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. getChildApps(installedappid) {
  305. return __awaiter(this, void 0, void 0, function* () {
  306. const url = 'apis/v4/unibase/platform/apps/getchildapps/parentid/' + 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. getChilds(installedappid) {
  316. return __awaiter(this, void 0, void 0, function* () {
  317. const url = 'apis/v4/unibase/platform/apps/getchilds/parentid/' + installedappid;
  318. return yield this.dataHelper().getAsync(url).then(function (response) {
  319. if (response.result != null) {
  320. response.result = JSON.parse(response.result);
  321. }
  322. return response;
  323. });
  324. });
  325. }
  326. getdependentApps(installedappid) {
  327. return __awaiter(this, void 0, void 0, function* () {
  328. const url = 'apis/v4/unibase/platform/apps/getdependentapps/' + installedappid;
  329. return yield this.dataHelper().getAsync(url).then(function (response) {
  330. if (response.result != null) {
  331. response.result = JSON.parse(response.result);
  332. }
  333. return response;
  334. });
  335. });
  336. }
  337. updateAppIndex(obj) {
  338. return __awaiter(this, void 0, void 0, function* () {
  339. const url = 'apis/v4/unibase/platform/apps/updateindexes/';
  340. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  341. if (response.result != null) {
  342. response.result = JSON.parse(response.result);
  343. }
  344. return response;
  345. });
  346. });
  347. }
  348. duplicateApp(obj) {
  349. return __awaiter(this, void 0, void 0, function* () {
  350. const url = 'apis/v4/unibase/platform/apps/duplicateapp';
  351. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  352. if (response.result != null) {
  353. response.result = JSON.parse(response.result);
  354. }
  355. return response;
  356. });
  357. });
  358. }
  359. getAppPermission(apppermissionid) {
  360. return __awaiter(this, void 0, void 0, function* () {
  361. const url = 'apis/v4/unibase/platform/apps/getapppermission/apppermissionid/' + apppermissionid;
  362. return yield this.dataHelper().getAsync(url).then(function (response) {
  363. if (response.result !== null)
  364. response.result = JSON.parse(response.result);
  365. return response;
  366. });
  367. });
  368. }
  369. getAppPermissions(installedAppId) {
  370. return __awaiter(this, void 0, void 0, function* () {
  371. const url = 'apis/v4/unibase/platform/apps/getapppermissions/installedappid/' + installedAppId;
  372. return yield this.dataHelper().getAsync(url).then(function (response) {
  373. if (response.result !== null)
  374. response.result = JSON.parse(response.result);
  375. return response;
  376. });
  377. });
  378. }
  379. saveAppPermission(obj) {
  380. return __awaiter(this, void 0, void 0, function* () {
  381. const url = 'apis/v4/unibase/platform/apps/saveapppermissionid';
  382. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  383. if (response.result !== null)
  384. response.result = JSON.parse(response.result);
  385. return response;
  386. });
  387. });
  388. }
  389. deleteAppPermission(apppermissionid) {
  390. return __awaiter(this, void 0, void 0, function* () {
  391. const url = 'apis/v4/unibase/platform/apps/deleteapppermission/apppermissionid/' + apppermissionid;
  392. return yield this.dataHelper().postAsync(url, null);
  393. });
  394. }
  395. getAppPermissionBySystemName(installedAppId, SystemName) {
  396. return __awaiter(this, void 0, void 0, function* () {
  397. const url = 'apis/v4/unibase/platform/apps/getapppermissions/installedappid/' + installedAppId + "/systemname/" + SystemName;
  398. var approlesettings;
  399. return yield this.dataHelper().getAsync(url).then(function (response) {
  400. if (response.result !== null)
  401. response.result = JSON.parse(response.result);
  402. return response;
  403. });
  404. });
  405. }
  406. getAllAppConfigurations(installedappid) {
  407. return __awaiter(this, void 0, void 0, function* () {
  408. const url = 'apis/v4/unibase/platform/apps/getappconfigurations/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. getListAppConfigurations(installedappid) {
  418. return __awaiter(this, void 0, void 0, function* () {
  419. const url = 'apis/v4/unibase/platform/apps/listappconfigurations/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. getDetailAppConfigurations(installedappid) {
  429. return __awaiter(this, void 0, void 0, function* () {
  430. const url = 'apis/v4/unibase/platform/apps/detailappconfigurations/installedappid/' + installedappid;
  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. getFormAppConfigurations(installedappid) {
  440. return __awaiter(this, void 0, void 0, function* () {
  441. const url = 'apis/v4/unibase/platform/apps/getformconfigurations/installedappid/' + installedappid;
  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. getAppConfiguration(appconfigurationid) {
  451. return __awaiter(this, void 0, void 0, function* () {
  452. const url = 'apis/v4/unibase/platform/apps/getconfiguration/id/' + appconfigurationid;
  453. return yield this.dataHelper().getAsync(url).then(function (response) {
  454. if (response.result != null) {
  455. response.result = JSON.parse(response.result);
  456. }
  457. return response;
  458. });
  459. });
  460. }
  461. getAppConfigurationByUniqueId(uniqueId) {
  462. return __awaiter(this, void 0, void 0, function* () {
  463. const url = 'apis/v4/unibase/platform/apps/getconfiguration/uniqueid/' + uniqueId;
  464. return yield this.dataHelper().getAsync(url).then(function (response) {
  465. if (response.result != null) {
  466. response.result = JSON.parse(response.result);
  467. }
  468. return response;
  469. });
  470. });
  471. }
  472. saveAppConfiguration(obj) {
  473. return __awaiter(this, void 0, void 0, function* () {
  474. const url = 'apis/v4/unibase/platform/apps/saveappconfiguration';
  475. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  476. if (response.result != null) {
  477. response.result = JSON.parse(response.result);
  478. }
  479. return response;
  480. });
  481. });
  482. }
  483. deleteAppConfiguration(appConfigurationId) {
  484. return __awaiter(this, void 0, void 0, function* () {
  485. const url = 'apis/v4/unibase/platform/apps/delete/id/' + appConfigurationId;
  486. return yield this.dataHelper().postAsync(url, null);
  487. });
  488. }
  489. updateConfigurationStatus(appConfigurationId, statusId) {
  490. return __awaiter(this, void 0, void 0, function* () {
  491. const url = 'apis/v4/unibase/platform/apps/updatestatus/appconfigurationid/' + appConfigurationId + '/statusid/' + statusId;
  492. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  493. if (response.result != null) {
  494. response.result = JSON.parse(response.result);
  495. }
  496. return response;
  497. });
  498. });
  499. }
  500. getUserApps() {
  501. return __awaiter(this, void 0, void 0, function* () {
  502. var url = "apis/v4/unibase/platform/apps/userapps/contactid/" + Platform.Membership.Infos.Identity.getCurrentUser().userId;
  503. return yield this.dataHelper().getAsync(url).then(function (response) {
  504. if (response.result !== null)
  505. response.result = JSON.parse(response.result);
  506. return response;
  507. });
  508. });
  509. }
  510. getMyApps() {
  511. return __awaiter(this, void 0, void 0, function* () {
  512. var url = "apis/v4/unibase/platform/apps/myapps";
  513. return yield this.dataHelper().getAsync(url).then(function (response) {
  514. if (response.result !== null)
  515. response.result = JSON.parse(response.result);
  516. return response;
  517. });
  518. });
  519. }
  520. exportApp(installedappid) {
  521. return __awaiter(this, void 0, void 0, function* () {
  522. const url = 'apis/v4/unibase/platform/apps/exportapp/' + installedappid;
  523. return yield this.dataHelper().getAsync(url).then(function (response) {
  524. if (response.result != null) {
  525. response.result = response.result;
  526. }
  527. return response;
  528. });
  529. });
  530. }
  531. exportAppRoleSettings() {
  532. return __awaiter(this, void 0, void 0, function* () {
  533. const url = 'apis/v4/unibase/platform/apps/exportapprolesettings';
  534. return yield this.dataHelper().getAsync(url).then(function (response) {
  535. if (response.result != null) {
  536. response.result = response.result;
  537. }
  538. return response;
  539. });
  540. });
  541. }
  542. saveVersion(obj) {
  543. return __awaiter(this, void 0, void 0, function* () {
  544. debugger;
  545. const url = 'apis/v4/unibase/platform/apps/saveversion';
  546. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  547. if (response.result != null) {
  548. response.result = JSON.parse(response.result);
  549. }
  550. return response;
  551. });
  552. });
  553. }
  554. getCurrentVersionByApp(installedappid) {
  555. return __awaiter(this, void 0, void 0, function* () {
  556. var url = "apis/v4/unibase/platform/apps/getcurrentversionbyapp/" + installedappid;
  557. return yield this.dataHelper().getAsync(url).then(function (response) {
  558. return response;
  559. });
  560. });
  561. }
  562. saveLatestVersionFromC02(obj) {
  563. return __awaiter(this, void 0, void 0, function* () {
  564. var url = "apis/v4/unibase/platform/apps/upgradeversionsave";
  565. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  566. if (response.result != null) {
  567. response.result = JSON.parse(response.result);
  568. }
  569. return response;
  570. });
  571. });
  572. }
  573. upgradeApp(installedappid, versionno) {
  574. return __awaiter(this, void 0, void 0, function* () {
  575. var url = "apis/v4/unibase/platform/apps/upgradeappversion/installedappid/" + installedappid + "/versionno/" + versionno;
  576. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  577. if (response.result != null) {
  578. response.result = JSON.parse(response.result);
  579. }
  580. return response;
  581. });
  582. });
  583. }
  584. upgradeAvailableApp(installedappid) {
  585. return __awaiter(this, void 0, void 0, function* () {
  586. var url = "apis/v4/unibase/platform/apps/UpgradeAppAvailable/installedappid/" + installedappid;
  587. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  588. if (response.result != null) {
  589. response.result = JSON.parse(response.result);
  590. }
  591. return response;
  592. });
  593. });
  594. }
  595. upgradeWidgetVersionAvailable(widgetid) {
  596. return __awaiter(this, void 0, void 0, function* () {
  597. var url = "apis/v4/unibase/platform/apps/upgradewidgetversionavailable/widgetid/" + widgetid;
  598. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  599. if (response.result != null) {
  600. response.result = JSON.parse(response.result);
  601. }
  602. return response;
  603. });
  604. });
  605. }
  606. upgradeDashboardVersionAvailable(portletid) {
  607. return __awaiter(this, void 0, void 0, function* () {
  608. var url = "apis/v4/unibase/platform/apps/upgradedashboardversionavailable/portletid/" + portletid;
  609. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  610. debugger;
  611. if (response.result != null) {
  612. response.result = JSON.parse(response.result);
  613. }
  614. return response;
  615. });
  616. });
  617. }
  618. upgradeReportVersionAvailable(reportId) {
  619. return __awaiter(this, void 0, void 0, function* () {
  620. var url = "apis/v4/unibase/platform/apps/upgradereportversion/reportid/" + reportId;
  621. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  622. debugger;
  623. if (response.result != null) {
  624. response.result = JSON.parse(response.result);
  625. }
  626. return response;
  627. });
  628. });
  629. }
  630. checkAppPermission(installedAppId) {
  631. return __awaiter(this, void 0, void 0, function* () {
  632. var url = "apis/v4/unibase/platform/apps/checkapppermission/installedappid/" + installedAppId;
  633. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  634. if (response.result != null) {
  635. response.result = JSON.parse(response.result);
  636. }
  637. return response;
  638. });
  639. });
  640. }
  641. exportAppPermissions(appId) {
  642. return __awaiter(this, void 0, void 0, function* () {
  643. const url = 'apis/v4/unibase/platform/apps/exportapppermissions/installedappid/' + appId;
  644. return yield this.dataHelper().getAsync(url).then(function (response) {
  645. if (response.result != null) {
  646. response.result = response.result;
  647. }
  648. return response;
  649. });
  650. });
  651. }
  652. getSettingApps() {
  653. return __awaiter(this, void 0, void 0, function* () {
  654. const url = 'apis/v4/unibase/platform/apps/getsettingapps';
  655. return yield this.dataHelper().getAsync(url).then(function (response) {
  656. if (response.result != null) {
  657. response.result = JSON.parse(response.result);
  658. }
  659. return response;
  660. });
  661. });
  662. }
  663. getDevApps() {
  664. return __awaiter(this, void 0, void 0, function* () {
  665. const url = 'apis/v4/unibase/platform/apps/getdevapps';
  666. return yield this.dataHelper().getAsync(url).then(function (response) {
  667. if (response.result != null) {
  668. response.result = JSON.parse(response.result);
  669. }
  670. return response;
  671. });
  672. });
  673. }
  674. executeProc(procName) {
  675. return __awaiter(this, void 0, void 0, function* () {
  676. const url = 'apis/v4/unibase/platform/apps/executestoredprocedure/procname/' + procName;
  677. return yield this.dataHelper().postAsync(url, '{}').then(function (response) {
  678. if (response.result != null) {
  679. response.result = JSON.parse(response.result);
  680. }
  681. return response;
  682. });
  683. });
  684. }
  685. getActiveUserApps() {
  686. return __awaiter(this, void 0, void 0, function* () {
  687. var url = "apis/v4/unibase/platform/apps/getactiveuserapps";
  688. return yield this.dataHelper().getAsync(url).then(function (response) {
  689. if (response.result !== null)
  690. response.result = JSON.parse(response.result);
  691. return response;
  692. });
  693. });
  694. }
  695. getConfigurationApps() {
  696. return __awaiter(this, void 0, void 0, function* () {
  697. const url = 'apis/v4/unibase/platform/apps/getconfigurationapps';
  698. return yield this.dataHelper().getAsync(url).then(function (response) {
  699. if (response.result != null) {
  700. response.result = JSON.parse(response.result);
  701. }
  702. return response;
  703. });
  704. });
  705. }
  706. static Instance() {
  707. if (this._instance === undefined)
  708. this._instance = new AppManager();
  709. return this._instance;
  710. }
  711. }
  712. Managers.AppManager = AppManager;
  713. })(Managers = Apps.Managers || (Apps.Managers = {}));
  714. })(Apps = Platform.Apps || (Platform.Apps = {}));
  715. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  716. })(Unibase || (Unibase = {}));