Built motion from commit 362b9399b4d0ed5560fbb795af995925d345fc38. Version 3.0.0...
[motion-next.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
1 const a291_0x37ee=['catch','../../config/logger','findOne','Dynamics365Account','error','map','model','info','ShowDynamics365Account','findAll','where','rpc','attributes','include','GetDynamics365Account','debug','limit','stringify','options','then','message','../../mysqldb'];(function(_0x2ef7d9,_0x523a13){const _0x37ee79=function(_0x3b9828){while(--_0x3b9828){_0x2ef7d9['push'](_0x2ef7d9['shift']());}};_0x37ee79(++_0x523a13);}(a291_0x37ee,0x1f3));const a291_0x3b98=function(_0x2ef7d9,_0x523a13){_0x2ef7d9=_0x2ef7d9-0xe1;let _0x37ee79=a291_0x37ee[_0x2ef7d9];return _0x37ee79;};const a291_0x54a8f3=a291_0x3b98;'use strict';const _=require('lodash'),db=require(a291_0x54a8f3(0xe7))['db'],logger=require(a291_0x54a8f3(0xe9))(a291_0x54a8f3(0xf3));exports['GetDynamics365Account']=function(_0x268485){const _0x5c3bbf=this;return new Promise(function(_0x32b43c,_0x33a6d2){const _0x1a326b=a291_0x3b98;return db[_0x1a326b(0xeb)][_0x1a326b(0xf1)]({'raw':_0x268485[_0x1a326b(0xe4)]?_0x268485[_0x1a326b(0xe4)]['raw']===undefined?!![]:![]:!![],'where':_0x268485[_0x1a326b(0xe4)]?_0x268485['options']['where']||null:null,'attributes':_0x268485[_0x1a326b(0xe4)]?_0x268485[_0x1a326b(0xe4)][_0x1a326b(0xf4)]||null:null,'limit':_0x268485['options']?_0x268485[_0x1a326b(0xe4)][_0x1a326b(0xe2)]||null:null,'include':_0x268485[_0x1a326b(0xe4)]?_0x268485['options']['include']?_[_0x1a326b(0xed)](_0x268485[_0x1a326b(0xe4)][_0x1a326b(0xf5)],function(_0x2eabdf){const _0x33c8fb=_0x1a326b;return{'model':db[_0x2eabdf[_0x33c8fb(0xee)]],'as':_0x2eabdf['as'],'attributes':_0x2eabdf['attributes'],'include':_0x2eabdf[_0x33c8fb(0xf5)]?_[_0x33c8fb(0xed)](_0x2eabdf[_0x33c8fb(0xf5)],function(_0x40704b){const _0x28d6fa=_0x33c8fb;return{'model':db[_0x40704b[_0x28d6fa(0xee)]],'as':_0x40704b['as'],'attributes':_0x40704b[_0x28d6fa(0xf4)],'include':_0x40704b[_0x28d6fa(0xf5)]?_[_0x28d6fa(0xed)](_0x40704b[_0x28d6fa(0xf5)],function(_0x504a1c){return{'model':db[_0x504a1c['model']],'as':_0x504a1c['as'],'attributes':_0x504a1c['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x21211c){const _0x20ad81=_0x1a326b;logger[_0x20ad81(0xef)](_0x20ad81(0xf6),_0x268485),logger['debug'](_0x20ad81(0xf6),_0x268485,JSON[_0x20ad81(0xe3)](_0x21211c)),_0x32b43c(_0x21211c);})[_0x1a326b(0xe8)](function(_0x4e793a){const _0x2ac39d=_0x1a326b;logger['error'](_0x2ac39d(0xf6),_0x4e793a['message'],_0x268485),_0x33a6d2(_0x5c3bbf[_0x2ac39d(0xec)](0x1f4,_0x4e793a[_0x2ac39d(0xe6)]));});});},exports['ShowDynamics365Account']=function(_0x2ad094){const _0x1d4884=this;return new Promise(function(_0x2f4be3,_0x1f6b30){const _0x2ed0fa=a291_0x3b98;return db[_0x2ed0fa(0xeb)][_0x2ed0fa(0xea)]({'raw':_0x2ad094['options']?_0x2ad094['options']['raw']===undefined?!![]:![]:!![],'where':_0x2ad094[_0x2ed0fa(0xe4)]?_0x2ad094['options'][_0x2ed0fa(0xf2)]||null:null,'attributes':_0x2ad094[_0x2ed0fa(0xe4)]?_0x2ad094['options'][_0x2ed0fa(0xf4)]||null:null,'include':_0x2ad094[_0x2ed0fa(0xe4)]?_0x2ad094[_0x2ed0fa(0xe4)][_0x2ed0fa(0xf5)]?_[_0x2ed0fa(0xed)](_0x2ad094[_0x2ed0fa(0xe4)][_0x2ed0fa(0xf5)],function(_0x3274cb){const _0x4250dc=_0x2ed0fa;return{'model':db[_0x3274cb[_0x4250dc(0xee)]],'as':_0x3274cb['as'],'attributes':_0x3274cb[_0x4250dc(0xf4)],'include':_0x3274cb[_0x4250dc(0xf5)]?_[_0x4250dc(0xed)](_0x3274cb['include'],function(_0x2bfe5f){const _0x300cdf=_0x4250dc;return{'model':db[_0x2bfe5f[_0x300cdf(0xee)]],'as':_0x2bfe5f['as'],'attributes':_0x2bfe5f[_0x300cdf(0xf4)],'include':_0x2bfe5f[_0x300cdf(0xf5)]?_[_0x300cdf(0xed)](_0x2bfe5f[_0x300cdf(0xf5)],function(_0x3f87c9){const _0x207601=_0x300cdf;return{'model':db[_0x3f87c9[_0x207601(0xee)]],'as':_0x3f87c9['as'],'attributes':_0x3f87c9['attributes']};}):[]};}):[]};}):[]:[]})[_0x2ed0fa(0xe5)](function(_0xa9ef32){const _0x1fde45=_0x2ed0fa;logger[_0x1fde45(0xef)](_0x1fde45(0xf0),_0x2ad094),logger[_0x1fde45(0xe1)](_0x1fde45(0xf0),_0x2ad094,JSON[_0x1fde45(0xe3)](_0xa9ef32)),_0x2f4be3(_0xa9ef32);})[_0x2ed0fa(0xe8)](function(_0x27c2a3){const _0x452517=_0x2ed0fa;logger[_0x452517(0xec)](_0x452517(0xf0),_0x27c2a3[_0x452517(0xe6)],_0x2ad094),_0x1f6b30(_0x1d4884['error'](0x1f4,_0x27c2a3['message']));});});};