123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- 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 Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Transact;
- (function (Transact) {
- let Managers;
- (function (Managers) {
- class RuleManager extends Unibase.Platform.Core.BaseManager {
- savecontactdefault(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/saveorderapprovalruledefaultcontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getRuleTags(IncludedTags, ExcludedTags, TagLobs) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/platform/forms/getincludedandexcludedtags/includedtags/' + IncludedTags + '/excludedtags/' + ExcludedTags + '/taggroupids/' + TagLobs + '';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- savecontactdefaultPaymentTerm(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/savepaymenttermruledefaultcontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- savecontactdetails(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/savecreditimitruledefaultcontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- UpdateCreditLimitRuleContact(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/updatecreditlimitrulecontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- UpdatePriceCodeRuleContact(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/updatepricecoderulecontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- UpdatePaymentTermRuleContact(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/updatepaymenttermrulecontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- UpdateOrderApprovalRuleContact(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/updateorderapprovalrulecontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- savecontactdefaultPriceCode(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/savepricecoderuledefaultcontact';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- updateRuleTags(IncludedTags, ExcludedTags, TagLobIds, PKId, InstalledAppId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/transact/rules/updateruletagsdetailsbytags/includedtags/' + IncludedTags + '/excludedtags/' + ExcludedTags + '/lobids/' + TagLobIds + '/pkid/' + PKId + '/installedappid/' + InstalledAppId;
- return yield this.dataHelper().postAsync(url, null).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshcreditlimitrules(versionguid, rulename, pkid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/configureruleactionprovider/versionguid/' + versionguid + '/rulename/' + rulename + '/pkid/' + pkid + '/lobid/0';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- debugger;
- return response;
- });
- });
- }
- refreshPriceCodeRule(PriceCodeRuleId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/refreshpricecoderule/pricecoderuleid/' + PriceCodeRuleId;
- return yield this.dataHelper().postAsync(url, PriceCodeRuleId).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshCreditRule(ruleid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/refreshcreditlimitrule/ruleid/' + ruleid;
- return yield this.dataHelper().postAsync(url, ruleid).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshPaymentTermRule(PaymentTermRuleId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/refreshpaymenttermrule/paymenttermruleid/' + PaymentTermRuleId;
- return yield this.dataHelper().postAsync(url, PaymentTermRuleId).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshOrderApprovalRule(OrderApprovalRuleId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/refreshorderapprovalrule/orderapprovalruleid/' + OrderApprovalRuleId;
- return yield this.dataHelper().postAsync(url, OrderApprovalRuleId).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- refreshSkuRecommendation(SkuRecommendationId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/refreshskurecommendation/skurecommendationid/' + SkuRecommendationId;
- return yield this.dataHelper().postAsync(url, SkuRecommendationId).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new RuleManager();
- }
- return this.instance;
- }
- }
- Managers.RuleManager = RuleManager;
- })(Managers = Transact.Managers || (Transact.Managers = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|