This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,173 @@
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 = {}));
@@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CAAC;4BACpB,CAAC,CAAC,CAAC;wBACP,CAAC;qBAAA;oBACK,iBAAiB,CAAC,MAAM;;4BAC1B,MAAM,GAAG,GAAG,yEAAyE,GAAG,MAAM,CAAC;4BAC/F,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;gCACzE,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,IAAI,QAAQ,CAAC,MAAM,IAAI,EAAE;oCACjD,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gCAClD,OAAO,QAAQ,CAAC;4BACpB,CAAC,CAAC,CAAC;wBACP,CAAC;qBAAA;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;4BAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;yBACrC;wBACD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBACJ;gBA7FY,oBAAW,cA6FvB,CAAA;YACL,CAAC,EA/FgB,QAAQ,GAAR,iBAAQ,KAAR,iBAAQ,QA+FxB;QACL,CAAC,EAjGgB,QAAQ,GAAR,aAAQ,KAAR,aAAQ,QAiGxB;IACL,CAAC,EAnGgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAmGpB;AACL,CAAC,EArGS,OAAO,KAAP,OAAO,QAqGhB"}
+1
View File
@@ -0,0 +1 @@
var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Bizgaze;(function(n){let t;(function(n){let t;(function(n){let t;(function(n){class t extends Unibase.Platform.Core.BaseManager{savecontactdefault(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/saveorderapprovalruledefaultcontact",n).then(function(n){return n})})}getRuleTags(n,t,i){return __awaiter(this,void 0,void 0,function*(){const r="apis/v4/unibase/platform/forms/getincludedandexcludedtags/includedtags/"+n+"/excludedtags/"+t+"/taggroupids/"+i+"";return yield this.dataHelper().getAsync(r).then(function(n){return n.result!==null&&(n.result=JSON.parse(n.result)),n})})}savecontactdefaultPaymentTerm(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/savepaymenttermruledefaultcontact",n).then(function(n){return n})})}savecontactdetails(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/savecreditimitruledefaultcontact",n).then(function(n){return n})})}UpdateCreditLimitRuleContact(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/updatecreditlimitrulecontact",n).then(function(n){return n})})}UpdatePriceCodeRuleContact(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/updatepricecoderulecontact",n).then(function(n){return n})})}UpdatePaymentTermRuleContact(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/updatepaymenttermrulecontact",n).then(function(n){return n})})}UpdateOrderApprovalRuleContact(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/updateorderapprovalrulecontact",n).then(function(n){return n})})}savecontactdefaultPriceCode(n){return __awaiter(this,void 0,void 0,function*(){return yield this.dataHelper().postAsync("apis/v4/bizgaze/transact/automationrules/savepricecoderuledefaultcontact",n).then(function(n){return n})})}updateRuleTags(n,t,i,r,u){return __awaiter(this,void 0,void 0,function*(){const f="apis/v4/unibase/transact/rules/updateruletagsdetailsbytags/includedtags/"+n+"/excludedtags/"+t+"/lobids/"+i+"/pkid/"+r+"/installedappid/"+u;return yield this.dataHelper().postAsync(f,null).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}refreshcreditlimitrules(n,t,i){return __awaiter(this,void 0,void 0,function*(){const r="apis/v4/bizgaze/transact/pricelists/configureruleactionprovider/versionguid/"+n+"/rulename/"+t+"/pkid/"+i+"/lobid/0";return yield this.dataHelper().getAsync(r).then(function(n){return n})})}refreshPriceCodeRule(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/automationrules/refreshpricecoderule/pricecoderuleid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}refreshCreditRule(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/automationrules/refreshcreditlimitrule/ruleid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}refreshPaymentTermRule(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/automationrules/refreshpaymenttermrule/paymenttermruleid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}refreshOrderApprovalRule(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/automationrules/refreshorderapprovalrule/orderapprovalruleid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}refreshSkuRecommendation(n){return __awaiter(this,void 0,void 0,function*(){const t="apis/v4/bizgaze/transact/automationrules/refreshskurecommendation/skurecommendationid/"+n;return yield this.dataHelper().postAsync(t,n).then(function(n){return n.result!==null&&n.result!=""&&(n.result=JSON.parse(n.result)),n})})}static Instance(){return this.instance===undefined&&(this.instance=new t),this.instance}}n.RuleManager=t})(t=n.Managers||(n.Managers={}))})(t=n.Transact||(n.Transact={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));