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.

supportmanager.js 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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 Bizgaze;
  11. (function (Bizgaze) {
  12. let Apps;
  13. (function (Apps) {
  14. let Support;
  15. (function (Support) {
  16. let Managers;
  17. (function (Managers) {
  18. class SupportManager extends Unibase.Platform.Core.BaseManager {
  19. updateTicket(ticketId, acceptedby) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/bizgaze/support/tickets/update/ticketid/' + ticketId + '/acceptedby/' + acceptedby;
  22. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  23. if (response.result !== null)
  24. response.result = JSON.parse(JSON.parse(response.result));
  25. return response;
  26. });
  27. });
  28. }
  29. getRoleTicketGroups(ticketgroupid) {
  30. return __awaiter(this, void 0, void 0, function* () {
  31. const url = 'apis/v4/bizgaze/support/tickets/getroleticketgroups/ticketgroupid/' + ticketgroupid;
  32. return yield this.dataHelper().getAsync(url).then(function (response) {
  33. if (response.result !== null) {
  34. response.result = JSON.parse(response.result);
  35. }
  36. return response;
  37. });
  38. });
  39. }
  40. getRoleTicketGroup(roleids) {
  41. return __awaiter(this, void 0, void 0, function* () {
  42. const url = 'apis/v4/bizgaze/crm/employees/getemployeesbyroleids/roleid/' + roleids;
  43. return yield this.dataHelper().getAsync(url).then(function (response) {
  44. if (response.result !== null) {
  45. response.result = JSON.parse(response.result);
  46. }
  47. return response;
  48. });
  49. });
  50. }
  51. getTicketGroup(ticketgroupid) {
  52. return __awaiter(this, void 0, void 0, function* () {
  53. const url = 'apis/v4/bizgaze/support/ticketgroups/getticketgroup/ticketgroupid/' + ticketgroupid;
  54. return yield this.dataHelper().getAsync(url).then(function (response) {
  55. if (response.result !== null && response.result != "") {
  56. response.result = JSON.parse(response.result);
  57. }
  58. return response;
  59. });
  60. });
  61. }
  62. getTicket(ticketid) {
  63. return __awaiter(this, void 0, void 0, function* () {
  64. const url = 'apis/v4/bizgaze/support/tickets/getticket/ticketid/' + ticketid;
  65. return yield this.dataHelper().getAsync(url).then(function (response) {
  66. if (response.result !== null && response.result != "") {
  67. response.result = JSON.parse(response.result);
  68. }
  69. return response;
  70. });
  71. });
  72. }
  73. getTicketIssue(ticketid) {
  74. return __awaiter(this, void 0, void 0, function* () {
  75. const url = 'apis/v4/bizgaze/support/tickets/getticketissuesbyticketid/ticketid/' + ticketid;
  76. return yield this.dataHelper().getAsync(url).then(function (response) {
  77. if (response.result !== null && response.result != "") {
  78. response.result = JSON.parse(response.result);
  79. }
  80. return response;
  81. });
  82. });
  83. }
  84. getIssueGroup(issuegroupid) {
  85. return __awaiter(this, void 0, void 0, function* () {
  86. const url = 'apis/v4/bizgaze/support/issuegroups/getissuegroup/issuegroupid/' + issuegroupid;
  87. return yield this.dataHelper().getAsync(url).then(function (response) {
  88. if (response.result !== null && response.result != "") {
  89. response.result = JSON.parse(response.result);
  90. }
  91. return response;
  92. });
  93. });
  94. }
  95. getRoleEmployee(employeeid) {
  96. return __awaiter(this, void 0, void 0, function* () {
  97. const url = 'apis/v4/bizgaze/crm/employees/getemployees/employeeid/' + employeeid;
  98. return yield this.dataHelper().getAsync(url).then(function (response) {
  99. if (response.result !== null) {
  100. response.result = JSON.parse(response.result);
  101. }
  102. return response;
  103. });
  104. });
  105. }
  106. UpdateAllocate(ticketId, allocatedto) {
  107. return __awaiter(this, void 0, void 0, function* () {
  108. const url = 'apis/v4/bizgaze/support/tickets/updateallocate/ticketid/' + ticketId + '/allocatedto/' + allocatedto;
  109. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  110. if (response.result !== null) {
  111. response.result = JSON.parse(response.result);
  112. }
  113. return response;
  114. });
  115. });
  116. }
  117. UpdatePriority(ticketId, priorityid) {
  118. return __awaiter(this, void 0, void 0, function* () {
  119. const url = 'apis/v4/bizgaze/support/tickets/updatepriority/ticketid/' + ticketId + '/priorityid/' + priorityid;
  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. deletelevel(levelid) {
  129. return __awaiter(this, void 0, void 0, function* () {
  130. const url = 'apis/v4/bizgaze/support/ticketgroups/deletelevel/id/' + levelid;
  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. deleteissue(issueid) {
  140. return __awaiter(this, void 0, void 0, function* () {
  141. const url = 'apis/v4/bizgaze/support/ticketgroups/deleteissue/id/' + issueid;
  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. getLevelMembers(levelid) {
  151. return __awaiter(this, void 0, void 0, function* () {
  152. const url = 'apis/v4/bizgaze/support/tickets/getlevelmembers/levelid/' + levelid;
  153. return yield this.dataHelper().getAsync(url).then(function (response) {
  154. if (response.result !== null)
  155. response.result = JSON.parse(response.result);
  156. return response;
  157. });
  158. });
  159. }
  160. getSuppotSettings() {
  161. return __awaiter(this, void 0, void 0, function* () {
  162. const url = 'apis/v4/bizgaze/support/tickets/getsuppotsettings';
  163. return yield this.dataHelper().getAsync(url).then(function (response) {
  164. if (response.result !== null)
  165. response.result = JSON.parse(response.result);
  166. return response;
  167. });
  168. });
  169. }
  170. getSuppotSetting(supportsettingid) {
  171. return __awaiter(this, void 0, void 0, function* () {
  172. const url = 'apis/v4/bizgaze/support/tickets/getsuppotsetting/settingid/' + supportsettingid;
  173. return yield this.dataHelper().getAsync(url).then(function (response) {
  174. if (response.result !== null)
  175. response.result = JSON.parse(response.result);
  176. return response;
  177. });
  178. });
  179. }
  180. savehelpusertenant(obj) {
  181. return __awaiter(this, void 0, void 0, function* () {
  182. const url = 'apis/v4/unibase/platform/tickets/savehelpusertenant';
  183. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  184. if (response.result !== null)
  185. response.result = JSON.parse(response.result);
  186. return response;
  187. }).fail(function () {
  188. });
  189. });
  190. }
  191. static Instance() {
  192. if (this._instance === undefined)
  193. this._instance = new SupportManager();
  194. return this._instance;
  195. }
  196. }
  197. Managers.SupportManager = SupportManager;
  198. })(Managers = Support.Managers || (Support.Managers = {}));
  199. })(Support = Apps.Support || (Apps.Support = {}));
  200. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  201. })(Bizgaze || (Bizgaze = {}));