123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var Unibase;
- (function (Unibase) {
- let Platform;
- (function (Platform) {
- let DataApis;
- (function (DataApis) {
- let Manangers;
- (function (Manangers) {
- class DataApiManager extends Platform.Core.BaseManager {
- saveDataApi(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/savedataapi';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getManagers() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getmanagers';
- var mangerinfo;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getMethodProviderData(systemname) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getmethodproviders/systemname/' + systemname;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getMethodProviderDataByRequestType(systemname, requesttypeid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getmethodproviders/systemname/' + systemname + '/requesttypeid/' + requesttypeid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getdataApiLog(dataapilogid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getdataapilog/' + dataapilogid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getProperties(paramType) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getproperties/paramtype/' + paramType;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getMethodProvider(id) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getmethodprovider/methodproviderid/' + id;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- refreshDataApis() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'dataapi/refreshdataapis';
- return yield this.dataHelper().post(url, null, function (response) {
- MessageHelper.Instance().showSuccess("Data Apis refreshed successfully", "Unibase_ValidationSummary");
- return response;
- }, function (response) {
- });
- });
- }
- executefailedapisbyfilter(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/executefailedapisbyfilter';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getDataApiLogfilter(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getdataapilogitemsforfilter';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getapilogitembydataapilogid(dataapilogid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getapilogitembydataapilogid/' + dataapilogid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getDataApi(id) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/get/' + id;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getDataApiExecutionData(id) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getdataapiexecutiondata/' + id;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- exportDataApis(installedappid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/export/' + installedappid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null) {
- response.result = response.result;
- }
- return response;
- });
- });
- }
- getApiLogItemsfilter(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getapilogitemsforfilter';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getApiLogItems(refid, page, rows) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getapilogitems/refid/' + refid + '/page/' + page + '/rows/' + rows;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- getApiLogItem(apilogitemid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/getapilogitem/' + apilogitemid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result != null && response.result != "") {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- refreshDataApisByManager(manager) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'dataapi/refreshdataapis/' + manager;
- return yield this.dataHelper().post(url, null, function (response) {
- MessageHelper.Instance().showSuccess("Data Apis refreshed successfully", "Unibase_ValidationSummary");
- return response;
- }, function (response) {
- });
- });
- }
- executeFailedApiLog(dataApiLogId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/executefailedapi/id/' + dataApiLogId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- executeFailedApiQueue(apiQueueId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/executefailedapiqueue/id/' + apiQueueId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- reInitiateApi() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/reintiateapiqueue/np';
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- changeQueueStatus() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/dataapis/changeapiqueuestatus/np';
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new DataApiManager();
- return this._instance;
- }
- }
- Manangers.DataApiManager = DataApiManager;
- })(Manangers = DataApis.Manangers || (DataApis.Manangers = {}));
- })(DataApis = Platform.DataApis || (Platform.DataApis = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|