Built motion from commit 362b9399b4d0ed5560fbb795af995925d345fc38. Version 3.0.0...
[motion-next.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
1 const a307_0x33c1=['then','GetFreshdeskAccount','raw','../../mysqldb','include','lodash','debug','error','where','model','ShowFreshdeskAccount','message','findAll','options','map','info','../../config/logger','FreshdeskAccount','limit','catch','attributes'];(function(_0xe7d2d,_0x37af1d){const _0x33c1a1=function(_0x1926d6){while(--_0x1926d6){_0xe7d2d['push'](_0xe7d2d['shift']());}};_0x33c1a1(++_0x37af1d);}(a307_0x33c1,0xc2));const a307_0x1926=function(_0xe7d2d,_0x37af1d){_0xe7d2d=_0xe7d2d-0x153;let _0x33c1a1=a307_0x33c1[_0xe7d2d];return _0x33c1a1;};const a307_0x149976=a307_0x1926;'use strict';const _=require(a307_0x149976(0x153)),db=require(a307_0x149976(0x166))['db'],logger=require(a307_0x149976(0x15e))('rpc');exports['GetFreshdeskAccount']=function(_0x4ac072){const _0x5a0e49=this;return new Promise(function(_0x4f3c82,_0x4b9b92){const _0x914c08=a307_0x1926;return db['FreshdeskAccount'][_0x914c08(0x15a)]({'raw':_0x4ac072[_0x914c08(0x15b)]?_0x4ac072['options'][_0x914c08(0x165)]===undefined?!![]:![]:!![],'where':_0x4ac072['options']?_0x4ac072[_0x914c08(0x15b)][_0x914c08(0x156)]||null:null,'attributes':_0x4ac072[_0x914c08(0x15b)]?_0x4ac072[_0x914c08(0x15b)][_0x914c08(0x162)]||null:null,'limit':_0x4ac072[_0x914c08(0x15b)]?_0x4ac072[_0x914c08(0x15b)][_0x914c08(0x160)]||null:null,'include':_0x4ac072['options']?_0x4ac072[_0x914c08(0x15b)][_0x914c08(0x167)]?_[_0x914c08(0x15c)](_0x4ac072[_0x914c08(0x15b)][_0x914c08(0x167)],function(_0x28a273){const _0x4d93b8=_0x914c08;return{'model':db[_0x28a273[_0x4d93b8(0x157)]],'as':_0x28a273['as'],'attributes':_0x28a273[_0x4d93b8(0x162)],'include':_0x28a273[_0x4d93b8(0x167)]?_[_0x4d93b8(0x15c)](_0x28a273['include'],function(_0x47259e){const _0x3ed2eb=_0x4d93b8;return{'model':db[_0x47259e[_0x3ed2eb(0x157)]],'as':_0x47259e['as'],'attributes':_0x47259e[_0x3ed2eb(0x162)],'include':_0x47259e['include']?_[_0x3ed2eb(0x15c)](_0x47259e[_0x3ed2eb(0x167)],function(_0x153946){const _0x374e6c=_0x3ed2eb;return{'model':db[_0x153946['model']],'as':_0x153946['as'],'attributes':_0x153946[_0x374e6c(0x162)]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4d1af1){const _0x4a9114=_0x914c08;logger['info']('GetFreshdeskAccount',_0x4ac072),logger[_0x4a9114(0x154)](_0x4a9114(0x164),_0x4ac072,JSON['stringify'](_0x4d1af1)),_0x4f3c82(_0x4d1af1);})[_0x914c08(0x161)](function(_0x2d2e4a){const _0x1a9199=_0x914c08;logger['error'](_0x1a9199(0x164),_0x2d2e4a['message'],_0x4ac072),_0x4b9b92(_0x5a0e49[_0x1a9199(0x155)](0x1f4,_0x2d2e4a[_0x1a9199(0x159)]));});});},exports[a307_0x149976(0x158)]=function(_0x2f207f){const _0x1f5843=this;return new Promise(function(_0x3355c7,_0x3b51c7){const _0x24b0f5=a307_0x1926;return db[_0x24b0f5(0x15f)]['findOne']({'raw':_0x2f207f[_0x24b0f5(0x15b)]?_0x2f207f[_0x24b0f5(0x15b)]['raw']===undefined?!![]:![]:!![],'where':_0x2f207f[_0x24b0f5(0x15b)]?_0x2f207f['options']['where']||null:null,'attributes':_0x2f207f[_0x24b0f5(0x15b)]?_0x2f207f['options'][_0x24b0f5(0x162)]||null:null,'include':_0x2f207f[_0x24b0f5(0x15b)]?_0x2f207f[_0x24b0f5(0x15b)][_0x24b0f5(0x167)]?_[_0x24b0f5(0x15c)](_0x2f207f[_0x24b0f5(0x15b)][_0x24b0f5(0x167)],function(_0x28744a){const _0x5f1051=_0x24b0f5;return{'model':db[_0x28744a[_0x5f1051(0x157)]],'as':_0x28744a['as'],'attributes':_0x28744a[_0x5f1051(0x162)],'include':_0x28744a[_0x5f1051(0x167)]?_[_0x5f1051(0x15c)](_0x28744a['include'],function(_0x5bef50){const _0x57de3b=_0x5f1051;return{'model':db[_0x5bef50[_0x57de3b(0x157)]],'as':_0x5bef50['as'],'attributes':_0x5bef50[_0x57de3b(0x162)],'include':_0x5bef50[_0x57de3b(0x167)]?_[_0x57de3b(0x15c)](_0x5bef50[_0x57de3b(0x167)],function(_0x5b7cf2){const _0x42d694=_0x57de3b;return{'model':db[_0x5b7cf2[_0x42d694(0x157)]],'as':_0x5b7cf2['as'],'attributes':_0x5b7cf2[_0x42d694(0x162)]};}):[]};}):[]};}):[]:[]})[_0x24b0f5(0x163)](function(_0x18eff3){const _0x214fdf=_0x24b0f5;logger[_0x214fdf(0x15d)](_0x214fdf(0x158),_0x2f207f),logger[_0x214fdf(0x154)]('ShowFreshdeskAccount',_0x2f207f,JSON['stringify'](_0x18eff3)),_0x3355c7(_0x18eff3);})[_0x24b0f5(0x161)](function(_0x577304){const _0x522637=_0x24b0f5;logger[_0x522637(0x155)](_0x522637(0x158),_0x577304['message'],_0x2f207f),_0x3b51c7(_0x1f5843[_0x522637(0x155)](0x1f4,_0x577304[_0x522637(0x159)]));});});};