Built files from Bizgaze WebServer
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

mailmanager.js 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 Apps;
  13. (function (Apps) {
  14. let Communications;
  15. (function (Communications) {
  16. let Managers;
  17. (function (Managers) {
  18. class MailManager extends Unibase.Platform.Core.BaseManager {
  19. getDefaultMailAccount() {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/bizgaze/communications/mail/getdefaultmailaccount';
  22. return yield this.dataHelper().getAsync(url).then(function (response) {
  23. if (response.result !== null)
  24. response.result = JSON.parse(response.result);
  25. return response;
  26. });
  27. });
  28. }
  29. getUserDefaultMailAccount() {
  30. return __awaiter(this, void 0, void 0, function* () {
  31. const url = 'apis/v4/bizgaze/communications/mail/getuserdefaultmailaccount';
  32. return yield this.dataHelper().getAsync(url).then(function (response) {
  33. if (response.result !== null)
  34. response.result = JSON.parse(response.result);
  35. return response;
  36. });
  37. });
  38. }
  39. getMailAccount(MailAcoountId) {
  40. return __awaiter(this, void 0, void 0, function* () {
  41. const url = 'apis/v4/bizgaze/communications/mail/getmailaccount/mailAccountId/' + MailAcoountId;
  42. return yield this.dataHelper().getAsync(url).then(function (response) {
  43. if (response.result !== null)
  44. response.result = JSON.parse(response.result);
  45. return response;
  46. });
  47. });
  48. }
  49. getMailByExecutedActionId(executedactionid) {
  50. return __awaiter(this, void 0, void 0, function* () {
  51. const url = 'apis/v4/bizgaze/communications/mail/getmailbyexecutedactionid/executedactionid/' + executedactionid;
  52. return yield this.dataHelper().getAsync(url).then(function (response) {
  53. if (response.result !== null)
  54. response.result = JSON.parse(response.result);
  55. return response;
  56. });
  57. });
  58. }
  59. static Instance() {
  60. if (this._instance === undefined)
  61. this._instance = new MailManager();
  62. return this._instance;
  63. }
  64. }
  65. Managers.MailManager = MailManager;
  66. })(Managers = Communications.Managers || (Communications.Managers = {}));
  67. })(Communications = Apps.Communications || (Apps.Communications = {}));
  68. })(Apps = Unibase.Apps || (Unibase.Apps = {}));
  69. })(Unibase || (Unibase = {}));