Iniit
This commit is contained in:
@@ -0,0 +1,270 @@
|
||||
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 = {}));
|
||||
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"idataapimanager.js","sourceRoot":"","sources":["idataapimanager.ts"],"names":[],"mappings":""}
|
||||
Reference in New Issue
Block a user