123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- 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 Common;
- (function (Common) {
- let Managers;
- (function (Managers) {
- class CommonManager extends Platform.Core.BaseManager {
- getusertenant(tenantid, unibaseid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/common/getusertenant/tenantid/' + tenantid + '/unibaseid/' + unibaseid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- }).fail(function () {
- });
- });
- }
- getuserbyusername(username) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/users/getuserbyusername/username/' + username;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- }).fail(function () {
- });
- });
- }
- gettenantbytenantid(tenantid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/common/gettenantbytenantid/tenantid/' + tenantid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- }).fail(function () {
- });
- });
- }
- getsharedtenants() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/common/getsharedtenantsinfo';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- }).fail(function () {
- });
- });
- }
- getSupportUser(userid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/common/getcommonsupportuser/userid/' + userid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- updateTenant(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- var url = "apis/v4/unibase/platform/common/updatecommontenant";
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- refreshConnectedTenants() {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/tenants/refreshconnectedtenants/np';
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- return response.message;
- });
- });
- }
- setTenantAsDefault(tenantId, unibaseId) {
- return __awaiter(this, void 0, void 0, function* () {
- var url = "apis/v4/unibase/platform/common/settenantasdefault/tenantid/" + tenantId + "/unibaseid/" + unibaseId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveDomain(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- var url = "apis/v4/unibase/platform/common/savedomain";
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveSettingType(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- var url = "apis/v4/unibase/platform/common/savesettingtype";
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- saveCommonSharedTenants(tenantid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = '/apis/v4/unibase/platform/common/savecommonsharedtenants/fromtenantid/' + tenantid;
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response.result;
- });
- });
- }
- deleteCommonSharedTenants(tenantid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = '/apis/v4/unibase/platform/common/deletesharedtenant/fromtenantid/' + tenantid;
- return yield this.dataHelper().postAsync(url, "{}").then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response.result;
- });
- });
- }
- saveDomainSettings(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- var url = "apis/v4/unibase/platform/common/savedomainsettings";
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- if (response.result != null) {
- response.result = JSON.parse(response.result);
- }
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new CommonManager();
- return this._instance;
- }
- }
- Managers.CommonManager = CommonManager;
- })(Managers = Common.Managers || (Common.Managers = {}));
- })(Common = Platform.Common || (Platform.Common = {}));
- })(Platform = Unibase.Platform || (Unibase.Platform = {}));
- })(Unibase || (Unibase = {}));
|