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.

rulemanager.js 35KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  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 Automation;
  15. (function (Automation) {
  16. let Managers;
  17. (function (Managers) {
  18. class RuleManager extends Platform.Core.BaseManager {
  19. static Instance() {
  20. if (this._instance === undefined)
  21. this._instance = new RuleManager();
  22. return this._instance;
  23. }
  24. saveRule(obj) {
  25. return __awaiter(this, void 0, void 0, function* () {
  26. const url = 'apis/v4/unibase/notificationrule/platform/saverule';
  27. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  28. if (response.result != null) {
  29. response.result = JSON.parse(response.result);
  30. }
  31. return response;
  32. });
  33. });
  34. }
  35. DeleteTemplateKeys(Templatekeyid) {
  36. return __awaiter(this, void 0, void 0, function* () {
  37. const url = 'apis/v4/unibase/notificationrule/platform/DeleteEventTemplateKey/templatekeyid/' + Templatekeyid;
  38. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  39. return response;
  40. });
  41. });
  42. }
  43. getNotificationRules(installedappid) {
  44. return __awaiter(this, void 0, void 0, function* () {
  45. const url = 'apis/v4/unibase/notificationrule/platform/getnotificationrules/installedappid/' + installedappid;
  46. return yield this.dataHelper().getAsync(url).then(function (response) {
  47. return JSON.parse(response.result);
  48. });
  49. });
  50. }
  51. getRule(ruleid) {
  52. return __awaiter(this, void 0, void 0, function* () {
  53. const url = 'apis/v4/unibase/notificationrule/platform/getrule/RuleId/' + ruleid + '';
  54. let ruleinfo;
  55. return yield this.dataHelper().getAsync(url).then(function (response) {
  56. ruleinfo = JSON.parse(response.result);
  57. return ruleinfo;
  58. });
  59. });
  60. }
  61. getRuleEvents(ruleid) {
  62. return __awaiter(this, void 0, void 0, function* () {
  63. const url = 'apis/v4/unibase/notificationrule/platform/getruleevents/RuleId/' + ruleid + '';
  64. let ruleeventinfo;
  65. return yield this.dataHelper().getAsync(url).then(function (response) {
  66. ruleeventinfo = JSON.parse(response.result);
  67. return ruleeventinfo;
  68. });
  69. });
  70. }
  71. getRuleEventsByEventGroupId(eventgroupid) {
  72. return __awaiter(this, void 0, void 0, function* () {
  73. const url = 'apis/v4/unibase/notificationrule/platform/getruleeventsbyeventgroupid/EventGroupId/' + eventgroupid + '';
  74. let ruleeventinfo;
  75. return yield this.dataHelper().getAsync(url).then(function (response) {
  76. ruleeventinfo = JSON.parse(response.result);
  77. return ruleeventinfo;
  78. });
  79. });
  80. }
  81. saveRuleFlow(obj) {
  82. return __awaiter(this, void 0, void 0, function* () {
  83. const url = 'apis/v4/unibase/notificationrule/platform/updateruleflow';
  84. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  85. if (response.result != null) {
  86. response.result = JSON.parse(response.result);
  87. }
  88. return response;
  89. });
  90. });
  91. }
  92. saveRuleAction(obj) {
  93. return __awaiter(this, void 0, void 0, function* () {
  94. const url = 'apis/v4/unibase/notificationrule/platform/saveruleaction';
  95. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  96. if (response.result != null) {
  97. response.result = JSON.parse(response.result);
  98. }
  99. return response;
  100. });
  101. });
  102. }
  103. getRuleAction(ruleactionid) {
  104. return __awaiter(this, void 0, void 0, function* () {
  105. const url = 'apis/v4/unibase/notificationrule/platform/getruleaction/RuleActionId/' + ruleactionid;
  106. let ruleactioninfo;
  107. return yield this.dataHelper().getAsync(url).then(function (response) {
  108. ruleactioninfo = JSON.parse(response.result);
  109. return ruleactioninfo;
  110. });
  111. });
  112. }
  113. getAllRuleActions() {
  114. return __awaiter(this, void 0, void 0, function* () {
  115. const url = 'apis/v4/unibase/notificationrule/platform/_GetRuleActions';
  116. return yield this.dataHelper().getAsync(url).then(function (response) {
  117. if (response.result != null) {
  118. response = JSON.parse(response.result);
  119. }
  120. return response;
  121. });
  122. });
  123. }
  124. getRuleActionsByInstalledApp(installedappid) {
  125. return __awaiter(this, void 0, void 0, function* () {
  126. const url = 'apis/v4/unibase/notificationrule/platform/GetAllRuleActionsByInstalledAppId/installedappid/' + installedappid;
  127. return yield this.dataHelper().getAsync(url).then(function (response) {
  128. if (response.result != null) {
  129. response = JSON.parse(response.result);
  130. }
  131. return response;
  132. });
  133. });
  134. }
  135. getRuleActions(ruleid) {
  136. return __awaiter(this, void 0, void 0, function* () {
  137. const url = 'apis/v4/unibase/notificationrule/platform/getruleactions/RuleId/' + ruleid;
  138. let ruleactioninfo;
  139. return yield this.dataHelper().getAsync(url).then(function (response) {
  140. ruleactioninfo = JSON.parse(response.result);
  141. return ruleactioninfo;
  142. });
  143. });
  144. }
  145. getRuleActionByEventGroupId(eventgroupid) {
  146. return __awaiter(this, void 0, void 0, function* () {
  147. const url = 'apis/v4/unibase/notificationrule/platform/getruleactionbyeventgroupid/EventGroupId/' + eventgroupid;
  148. let ruleactioninfo;
  149. return yield this.dataHelper().getAsync(url).then(function (response) {
  150. ruleactioninfo = JSON.parse(response.result);
  151. return ruleactioninfo;
  152. });
  153. });
  154. }
  155. saveRuleEvent(obj) {
  156. return __awaiter(this, void 0, void 0, function* () {
  157. const url = 'apis/v4/unibase/notificationrule/platform/saveruleevent';
  158. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  159. if (response.result != null) {
  160. response.result = JSON.parse(response.result);
  161. }
  162. return response;
  163. });
  164. });
  165. }
  166. saveAdvRuleEvent(obj) {
  167. return __awaiter(this, void 0, void 0, function* () {
  168. const url = 'apis/v4/unibase/notificationrule/platform/SaveAdvRuleEvent';
  169. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  170. if (response.result != null) {
  171. response.result = JSON.parse(response.result);
  172. }
  173. return response;
  174. });
  175. });
  176. }
  177. getRuleConditions(ruleid) {
  178. return __awaiter(this, void 0, void 0, function* () {
  179. const url = 'apis/v4/unibase/notificationrule/platform/getruleconditions/RuleId/' + ruleid;
  180. let ruleconditioninfo;
  181. return yield this.dataHelper().getAsync(url).then(function (response) {
  182. ruleconditioninfo = JSON.parse(response.result);
  183. return ruleconditioninfo;
  184. });
  185. });
  186. }
  187. getRuleActionConditions(ruleid, ruleactionid) {
  188. return __awaiter(this, void 0, void 0, function* () {
  189. const url = 'apis/v4/unibase/notificationrule/platform/getruleactionconditions/RuleId/' + ruleid + '/RuleActionId/' + ruleactionid;
  190. let ruleconditioninfo;
  191. return yield this.dataHelper().getAsync(url).then(function (response) {
  192. ruleconditioninfo = JSON.parse(response.result);
  193. return ruleconditioninfo;
  194. });
  195. });
  196. }
  197. saveEventTemplate(obj) {
  198. return __awaiter(this, void 0, void 0, function* () {
  199. const url = 'apis/v4/unibase/notificationrule/platform/savetemplate';
  200. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  201. if (response.result != null) {
  202. response.result = JSON.parse(response.result);
  203. }
  204. return response;
  205. });
  206. });
  207. }
  208. saveEventTemplates(obj) {
  209. return __awaiter(this, void 0, void 0, function* () {
  210. const url = 'apis/v4/unibase/notificationrule/platform/savetemplates/List';
  211. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  212. if (response.result != null) {
  213. response.result = JSON.parse(response.result);
  214. }
  215. return response;
  216. });
  217. });
  218. }
  219. getEventTemplateKeys(templateid) {
  220. return __awaiter(this, void 0, void 0, function* () {
  221. const url = 'apis/v4/unibase/notificationrule/platform/geteventtemplatekeys/TemplateId/' + templateid + '';
  222. return yield this.dataHelper().getAsync(url).then(function (response) {
  223. return JSON.parse(response.result);
  224. });
  225. });
  226. }
  227. getInstalledApps() {
  228. return __awaiter(this, void 0, void 0, function* () {
  229. var installedapps;
  230. const url = 'apis/v4/unibase/platform/apps/getinstalledapps';
  231. return yield this.dataHelper().getAsync(url).then(function (response) {
  232. installedapps = JSON.parse(response.result);
  233. return installedapps;
  234. });
  235. });
  236. }
  237. saveRuleProvider(obj) {
  238. return __awaiter(this, void 0, void 0, function* () {
  239. const url = 'apis/v4/unibase/notificationrule/platform/saveruleprovider';
  240. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  241. if (response.result != null) {
  242. response.result = JSON.parse(response.result);
  243. }
  244. return response;
  245. });
  246. });
  247. }
  248. loadRuleProviders(InstalledAppId) {
  249. return __awaiter(this, void 0, void 0, function* () {
  250. const url = 'apis/v4/unibase/notificationrule/platform/getruleprovidersbyappid/InstalledAppId/' + InstalledAppId;
  251. let ruleproviderinfo;
  252. return yield this.dataHelper().getAsync(url).then(function (response) {
  253. ruleproviderinfo = JSON.parse(response.result);
  254. return ruleproviderinfo;
  255. });
  256. });
  257. }
  258. getRuleProvider(ruleproviderid) {
  259. return __awaiter(this, void 0, void 0, function* () {
  260. const url = 'apis/v4/unibase/notificationrule/platform/getruleprovider/RuleProviderId/' + ruleproviderid;
  261. let ruleproviderinfo;
  262. return yield this.dataHelper().getAsync(url).then(function (response) {
  263. ruleproviderinfo = JSON.parse(response.result);
  264. return ruleproviderinfo;
  265. });
  266. });
  267. }
  268. getTokens(ruleproviderid) {
  269. return __awaiter(this, void 0, void 0, function* () {
  270. const url = 'apis/v4/unibase/notificationrule/platform/getTokenss/RuleProviderId/' + ruleproviderid;
  271. return yield this.dataHelper().getAsync(url).then(function (response) {
  272. return JSON.parse(response.result);
  273. });
  274. });
  275. }
  276. getContactColumns(ruleproviderid) {
  277. return __awaiter(this, void 0, void 0, function* () {
  278. const url = 'apis/v4/unibase/notificationrule/platform/getContactColumns/RuleProviderId/' + ruleproviderid;
  279. return yield this.dataHelper().getAsync(url).then(function (response) {
  280. return JSON.parse(response.result);
  281. });
  282. });
  283. }
  284. getResultActions(ruleactionid) {
  285. return __awaiter(this, void 0, void 0, function* () {
  286. const url = 'apis/v4/unibase/notificationrule/platform/getResultActions/RuleActionId/' + ruleactionid;
  287. return yield this.dataHelper().getAsync(url).then(function (response) {
  288. return JSON.parse(response.result);
  289. });
  290. });
  291. }
  292. getEventGroups(ruleid) {
  293. return __awaiter(this, void 0, void 0, function* () {
  294. const url = 'apis/v4/unibase/notificationrule/platform/geteventgroups/RuleId/' + ruleid + '';
  295. return yield this.dataHelper().getAsync(url).then(function (response) {
  296. return JSON.parse(response.result);
  297. });
  298. });
  299. }
  300. getActions() {
  301. return __awaiter(this, void 0, void 0, function* () {
  302. const url = 'apis/v4/unibase/notificationrule/platform/getactions';
  303. return yield this.dataHelper().getAsync(url).then(function (response) {
  304. return JSON.parse(response.result);
  305. });
  306. });
  307. }
  308. getEventTemplateNotesByLanguageId(doctypeid, languageid) {
  309. return __awaiter(this, void 0, void 0, function* () {
  310. const url = 'apis/v4/unibase/notificationrule/platform/geteventtemplatenotesbylanguageid/DoctypeId/' + doctypeid + '/LanguageId/' + languageid;
  311. let eventtemplatenoteinfo;
  312. return yield this.dataHelper().getAsync(url).then(function (response) {
  313. eventtemplatenoteinfo = JSON.parse(response.result);
  314. return eventtemplatenoteinfo;
  315. });
  316. });
  317. }
  318. refreshNotes(doctypeid, isrefresh) {
  319. return __awaiter(this, void 0, void 0, function* () {
  320. const url = 'apis/v4/unibase/notificationrule/platform/refreshnotes/DoctypeId/' + doctypeid + '/Isrefresh/' + isrefresh;
  321. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  322. if (response.result != null) {
  323. response.result = JSON.parse(response.result);
  324. }
  325. alert(response.message);
  326. return response;
  327. });
  328. });
  329. }
  330. getRecipientProviders() {
  331. return __awaiter(this, void 0, void 0, function* () {
  332. const url = 'apis/v4/unibase/notificationrule/platform/getrecipientproviders';
  333. return yield this.dataHelper().getAsync(url).then(function (response) {
  334. return JSON.parse(response.result);
  335. });
  336. });
  337. }
  338. getActionRecipient(ruleactionid) {
  339. return __awaiter(this, void 0, void 0, function* () {
  340. const url = 'apis/v4/unibase/notificationrule/platform/getactionrecipient/RuleActionId/' + ruleactionid;
  341. return yield this.dataHelper().getAsync(url).then(function (response) {
  342. return JSON.parse(response.result);
  343. });
  344. });
  345. }
  346. getAction(actionid) {
  347. return __awaiter(this, void 0, void 0, function* () {
  348. const url = 'apis/v4/unibase/notificationrule/platform/getaction/ActionId/' + actionid;
  349. return yield this.dataHelper().getAsync(url).then(function (response) {
  350. return JSON.parse(response.result);
  351. });
  352. });
  353. }
  354. exportRuleProiders() {
  355. return __awaiter(this, void 0, void 0, function* () {
  356. const url = 'apis/v4/unibase/notificationrule/platform/exportruleproviders/';
  357. return yield this.dataHelper().getAsync(url).then(function (response) {
  358. if (response.result != null) {
  359. response.result = response.result;
  360. }
  361. return response;
  362. });
  363. });
  364. }
  365. exportSingleRuleProiders(ruleproviderid) {
  366. return __awaiter(this, void 0, void 0, function* () {
  367. const url = 'apis/v4/unibase/notificationrule/platform/ExportSingleProvider/ruleproviderid/' + ruleproviderid;
  368. return yield this.dataHelper().getAsync(url).then(function (response) {
  369. if (response.result != null) {
  370. response.result = response.result;
  371. }
  372. return response;
  373. });
  374. });
  375. }
  376. exportSingleRule(ruleid) {
  377. return __awaiter(this, void 0, void 0, function* () {
  378. const url = 'apis/v4/unibase/notificationrule/platform/ExportSingleRule/RuleId/' + ruleid;
  379. return yield this.dataHelper().getAsync(url).then(function (response) {
  380. if (response.result != null) {
  381. response.result = response.result;
  382. }
  383. return response;
  384. });
  385. });
  386. }
  387. exportRules() {
  388. return __awaiter(this, void 0, void 0, function* () {
  389. const url = 'apis/v4/unibase/notificationrule/platform/exportrules/';
  390. return yield this.dataHelper().getAsync(url).then(function (response) {
  391. if (response.result != null) {
  392. response.result = response.result;
  393. }
  394. return response;
  395. });
  396. });
  397. }
  398. getTimeLineLogs(refid, installedappid, ispriority) {
  399. return __awaiter(this, void 0, void 0, function* () {
  400. const url = 'apis/v4/unibase/notificationrule/platform/gettimelinelogs/refid/' + refid + '/installedappid/' + installedappid + '/ispriority/' + ispriority;
  401. return yield this.dataHelper().getAsync(url).then(function (response) {
  402. if (response.result !== null)
  403. response.result = JSON.parse(response.result);
  404. return response;
  405. });
  406. });
  407. }
  408. deleteEventGroup(EventGroupId) {
  409. return __awaiter(this, void 0, void 0, function* () {
  410. const url = 'apis/v4/unibase/notificationrule/platform/deleteeventgroup/EventGroupId/' + EventGroupId;
  411. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  412. if (response.result != null) {
  413. response.result = response.result;
  414. }
  415. return response;
  416. });
  417. });
  418. }
  419. ExecutedActions() {
  420. return __awaiter(this, void 0, void 0, function* () {
  421. const url = 'apis/v4/unibase/notificationrule/platform/executedactions';
  422. return yield this.dataHelper().getAsync(url).then(function (response) {
  423. response.result = JSON.parse(response.result);
  424. return response;
  425. });
  426. });
  427. }
  428. ExecutedActionsList(obj) {
  429. return __awaiter(this, void 0, void 0, function* () {
  430. const url = 'apis/v4/unibase/notificationrule/platform/executedactionslist';
  431. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  432. response.result = JSON.parse(response.result);
  433. return response;
  434. });
  435. });
  436. }
  437. UpdateRuleActionStatus(RuleActionId, Status) {
  438. return __awaiter(this, void 0, void 0, function* () {
  439. const url = 'apis/v4/unibase/notificationrule/platform/changeruleactionstatus/RuleActionId/' + RuleActionId + '/Status/' + Status;
  440. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  441. if (response.result != null) {
  442. response.result = JSON.parse(response.result);
  443. }
  444. return response;
  445. });
  446. });
  447. }
  448. getActiveRules(ruleid) {
  449. return __awaiter(this, void 0, void 0, function* () {
  450. const url = 'apis/v4/unibase/notificationrule/platform/getactiverules/RuleId/' + ruleid;
  451. let activeruleinfo;
  452. return yield this.dataHelper().getAsync(url).then(function (response) {
  453. activeruleinfo = JSON.parse(response.result);
  454. return activeruleinfo;
  455. });
  456. });
  457. }
  458. UpdateActiveRuleStatus(ActiveRuleId, Status) {
  459. return __awaiter(this, void 0, void 0, function* () {
  460. const url = 'apis/v4/unibase/notificationrule/platform/changeactiverulestatus/ActiveRuleId/' + ActiveRuleId + '/Status/' + Status;
  461. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  462. if (response.result != null) {
  463. response.result = JSON.parse(response.result);
  464. }
  465. return response;
  466. });
  467. });
  468. }
  469. UpdateRuleScheduler(obj) {
  470. return __awaiter(this, void 0, void 0, function* () {
  471. const url = 'apis/v4/unibase/notificationrule/platform/updatescheduledrule';
  472. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  473. if (response.result != null) {
  474. response.result = JSON.parse(response.result);
  475. }
  476. return response;
  477. });
  478. });
  479. }
  480. getSelectedRecipientsData(RecipientProviderId, SelectedIds, IdColumn) {
  481. return __awaiter(this, void 0, void 0, function* () {
  482. const url = 'apis/v4/unibase/notificationrule/platform/getselectedrecipientsdata/recipientproviderid/' + RecipientProviderId + '/selectedids/' + SelectedIds + '/idcolumn/' + IdColumn;
  483. return yield this.dataHelper().getAsync(url).then(function (response) {
  484. if (response.result != null) {
  485. response.result = JSON.parse(response.result);
  486. }
  487. return response;
  488. });
  489. });
  490. }
  491. getCreateFormsByInstalledAppId(Installedappid) {
  492. return __awaiter(this, void 0, void 0, function* () {
  493. const url = 'apis/v4/unibase/notificationrule/platform/getCreateFormsByInstalledAppId/installedappid/' + Installedappid;
  494. return yield this.dataHelper().getAsync(url).then(function (response) {
  495. if (response.result !== null)
  496. response.result = JSON.parse(response.result);
  497. return response;
  498. });
  499. });
  500. }
  501. getExternalContactsFromReport(reportid) {
  502. return __awaiter(this, void 0, void 0, function* () {
  503. const url = 'apis/v4/unibase/platform/analytics/getiscontactreportcolumns/reportid/' + reportid;
  504. return yield this.dataHelper().getAsync(url).then(function (response) {
  505. if (response.result !== null)
  506. response.result = JSON.parse(response.result);
  507. return response;
  508. });
  509. });
  510. }
  511. exporteventtemplates() {
  512. return __awaiter(this, void 0, void 0, function* () {
  513. const url = 'apis/v4/unibase/notificationrule/platform/ExportAllTemplates';
  514. return yield this.dataHelper().getAsync(url).then(function (response) {
  515. if (response.result !== null) {
  516. response = response.result;
  517. }
  518. return response;
  519. });
  520. });
  521. }
  522. exportsingletemplate(doctypeid) {
  523. return __awaiter(this, void 0, void 0, function* () {
  524. const url = 'apis/v4/unibase/notificationrule/platform/ExportSingleDoctemplate/doctypeid/' + doctypeid;
  525. return yield this.dataHelper().getAsync(url).then(function (response) {
  526. if (response.result !== null) {
  527. response = response.result;
  528. }
  529. return response;
  530. });
  531. });
  532. }
  533. GetFollwersByPkid(pkid) {
  534. return __awaiter(this, void 0, void 0, function* () {
  535. const url = 'apis/v4/unibase/notificationrule/platform/GetFollowersByPkId/PrimaryKeyId/' + pkid;
  536. return yield this.dataHelper().getAsync(url).then(function (response) {
  537. if (response.result != null) {
  538. response.result = JSON.parse(response.result);
  539. }
  540. return response;
  541. });
  542. });
  543. }
  544. GetFollwersByVersionGuid(versionGuid) {
  545. return __awaiter(this, void 0, void 0, function* () {
  546. const url = 'apis/v4/unibase/notificationrule/platform/GetFollowersByVersionGuid/versionguid/' + versionGuid;
  547. return yield this.dataHelper().getAsync(url).then(function (response) {
  548. if (response.result != null) {
  549. response.result = JSON.parse(response.result);
  550. }
  551. return response;
  552. });
  553. });
  554. }
  555. refreshNotificationProviders() {
  556. return __awaiter(this, void 0, void 0, function* () {
  557. const url = 'apis/v4/unibase/notificationrule/platform/RefreshNotificationProviders/np';
  558. return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
  559. MessageHelper.Instance().showSuccess(response.message, "Unibase_ValidationSummary");
  560. return response;
  561. });
  562. });
  563. }
  564. getImportLogs(logtype) {
  565. return __awaiter(this, void 0, void 0, function* () {
  566. const url = 'apis/v4/unibase/notificationrule/platform/GetImportLogs/logType/' + logtype;
  567. return yield this.dataHelper().getAsync(url).then(function (response) {
  568. if (response.result !== null)
  569. response.result = JSON.parse(response.result);
  570. return response;
  571. });
  572. });
  573. }
  574. }
  575. Managers.RuleManager = RuleManager;
  576. })(Managers = Automation.Managers || (Automation.Managers = {}));
  577. })(Automation = Platform.Automation || (Platform.Automation = {}));
  578. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  579. })(Unibase || (Unibase = {}));