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.

portabilitymanager.js 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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 Portability;
  15. (function (Portability) {
  16. let Managers;
  17. (function (Managers) {
  18. class PortabilityManager extends Platform.Core.BaseManager {
  19. downloaddata(reportId) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = '/apis/v4/unibase/platform/portability/downloaddata/reportid/' + reportId;
  22. return yield this.dataHelper().postAsync(url, reportId).then(function (response) {
  23. if (response.result != null) {
  24. response.result = JSON.parse(response.result);
  25. }
  26. return response;
  27. });
  28. });
  29. }
  30. downloadExcel(formId) {
  31. return __awaiter(this, void 0, void 0, function* () {
  32. const url = 'apis/v4/unibase/platform/portability/export/' + formId;
  33. return yield this.dataHelper().getAsync(url).then(function (response) {
  34. if (response.result != null) {
  35. response.result = JSON.parse(response.result);
  36. }
  37. return response;
  38. });
  39. });
  40. }
  41. downloadExcelData(importid) {
  42. return __awaiter(this, void 0, void 0, function* () {
  43. const url = 'apis/v4/unibase/platform/portability/downloadexceldata/importid/' + importid;
  44. return yield this.dataHelper().getAsync(url).then(function (response) {
  45. if (response.result != null) {
  46. response.result = JSON.parse(response.result);
  47. }
  48. return response;
  49. });
  50. });
  51. }
  52. importExcel(formId, fileData) {
  53. return __awaiter(this, void 0, void 0, function* () {
  54. const url = 'apis/v4/unibase/platform/portability/import/' + formId;
  55. return yield this.dataHelper().post(url, fileData, null, function (response) {
  56. return response;
  57. });
  58. });
  59. }
  60. save(obj) {
  61. return __awaiter(this, void 0, void 0, function* () {
  62. const url = 'apis/v4/unibase/platform/portability/save';
  63. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  64. if (response.result != null) {
  65. response.result = JSON.parse(response.result);
  66. }
  67. return response;
  68. });
  69. });
  70. }
  71. getPortabilityProvider(portabilityProviderId) {
  72. return __awaiter(this, void 0, void 0, function* () {
  73. const url = 'apis/v4/unibase/platform/portability/get/' + portabilityProviderId;
  74. return yield this.dataHelper().getAsync(url).then(function (response) {
  75. if (response.result != null) {
  76. response.result = JSON.parse(response.result);
  77. }
  78. return response;
  79. });
  80. });
  81. }
  82. getPortabilityProviders(InstalledappId) {
  83. return __awaiter(this, void 0, void 0, function* () {
  84. const url = 'apis/v4/unibase/platform/portability/getportabilityproviders/installedappid/' + InstalledappId;
  85. return yield this.dataHelper().getAsync(url).then(function (response) {
  86. if (response.result != null) {
  87. response.result = JSON.parse(response.result);
  88. }
  89. return response;
  90. });
  91. });
  92. }
  93. getConnectedFormsByPortbailityProvider(portabilityProviderId) {
  94. return __awaiter(this, void 0, void 0, function* () {
  95. const url = 'apis/v4/unibase/platform/portability/connectedforms/' + portabilityProviderId;
  96. return yield this.dataHelper().getAsync(url).then(function (response) {
  97. if (response.result != null) {
  98. response.result = JSON.parse(response.result);
  99. }
  100. return response;
  101. });
  102. });
  103. }
  104. getImportColumnsByPortbailityProvider(portabilityProviderId) {
  105. return __awaiter(this, void 0, void 0, function* () {
  106. const url = 'apis/v4/unibase/platform/portability/importcolumns/' + portabilityProviderId;
  107. return yield this.dataHelper().getAsync(url).then(function (response) {
  108. if (response.result != null) {
  109. response.result = JSON.parse(response.result);
  110. }
  111. return response;
  112. });
  113. });
  114. }
  115. exportProvider(portabilityProviderId) {
  116. return __awaiter(this, void 0, void 0, function* () {
  117. const url = 'apis/v4/unibase/platform/portability/exportprovider/' + portabilityProviderId;
  118. return yield this.dataHelper().getAsync(url).then(function (response) {
  119. if (response.result != null) {
  120. response.result = response.result;
  121. }
  122. return response;
  123. });
  124. });
  125. }
  126. importProvider(importReq) {
  127. return __awaiter(this, void 0, void 0, function* () {
  128. const url = '/apis/v4/unibase/platform/portability/importprovider';
  129. return yield this.dataHelper().postAsync(url, importReq).then(function (response) {
  130. if (response.result != null) {
  131. response.result = JSON.parse(response.result);
  132. }
  133. return response;
  134. });
  135. });
  136. }
  137. static Instance() {
  138. if (this._instance === undefined)
  139. this._instance = new PortabilityManager();
  140. return this._instance;
  141. }
  142. }
  143. Managers.PortabilityManager = PortabilityManager;
  144. })(Managers = Portability.Managers || (Portability.Managers = {}));
  145. })(Portability = Platform.Portability || (Platform.Portability = {}));
  146. })(Platform = Unibase.Platform || (Unibase.Platform = {}));
  147. })(Unibase || (Unibase = {}));