Built files from Bizgaze WebServer
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

opportunitymanager.js 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 Transact;
  15. (function (Transact) {
  16. let Managers;
  17. (function (Managers) {
  18. class OpportunityManager extends Unibase.Platform.Core.BaseManager {
  19. getOpportunityItems(OpportunityItemId) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/bizgaze/transact/opportunity/getopportunityitem/opportunityitemid/' + OpportunityItemId;
  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. getOpportunityItemsById(OpportunityId) {
  30. return __awaiter(this, void 0, void 0, function* () {
  31. const url = 'apis/v4/bizgaze/transact/opportunity/getopportunityitems/opportunityid/' + OpportunityId;
  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. getOpportunity(OpportunityId) {
  40. return __awaiter(this, void 0, void 0, function* () {
  41. const url = 'apis/v4/bizgaze/transact/opportunity/getopportunity/opportunityid/' + OpportunityId;
  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. getOpportunityInformaion(OrganizationId) {
  50. return __awaiter(this, void 0, void 0, function* () {
  51. const url = 'apis/v4/bizgaze/mobil/MobilLeads/getmobilleadbycontactid/contactid/' + OrganizationId;
  52. return yield this.dataHelper().getAsync(url).then(function (response) {
  53. if (response.result !== null && response.result !== "")
  54. response.result = JSON.parse(response.result);
  55. return response;
  56. });
  57. });
  58. }
  59. getDetails(url) {
  60. return __awaiter(this, void 0, void 0, function* () {
  61. const url1 = url;
  62. return yield this.dataHelper().getAsync(url1).then(function (response) {
  63. if (response.result !== null && response.result != "")
  64. response.result = JSON.parse(response.result);
  65. return response;
  66. });
  67. });
  68. }
  69. deleteOpportunityItem(OpportunityItemId) {
  70. return __awaiter(this, void 0, void 0, function* () {
  71. debugger;
  72. const url = 'apis/v4/bizgaze/transact/opportunity/deleteopportunityitem/opportunityitemid/' + OpportunityItemId;
  73. return yield this.dataHelper().postAsync(url, OpportunityItemId).then(function (response) {
  74. if (response.result !== null && response.result != "")
  75. response.result = JSON.parse(response.result);
  76. return response;
  77. });
  78. });
  79. }
  80. deleteOpportunityItemForl360(OpportunityItemId) {
  81. return __awaiter(this, void 0, void 0, function* () {
  82. debugger;
  83. const url = 'apis/v4/bizgaze/mobil/opportunity/deleteOpportunityItemForl360/opportunityitemid/' + OpportunityItemId;
  84. return yield this.dataHelper().postAsync(url, OpportunityItemId).then(function (response) {
  85. if (response.result !== null && response.result != "")
  86. response.result = JSON.parse(response.result);
  87. return response;
  88. });
  89. });
  90. }
  91. static Instance() {
  92. if (this._instance === undefined)
  93. this._instance = new OpportunityManager();
  94. return this._instance;
  95. }
  96. }
  97. Managers.OpportunityManager = OpportunityManager;
  98. })(Managers = Transact.Managers || (Transact.Managers = {}));
  99. })(Transact = Apps.Transact || (Apps.Transact = {}));
  100. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  101. })(Bizgaze || (Bizgaze = {}));