Built motion from commit b51cdcb3f2cb46634587ce1d55ea1b8f32dacea6. Version 3.0.0...
[motion-next.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
1 const a257_0x4fa1=['rpc','options','../../mysqldb','GetFreshdeskAccount','model','message','findAll','then','limit','include','FreshdeskAccount','where','ShowFreshdeskAccount','stringify','debug','raw','error','info','catch','attributes','lodash','map','findOne'];(function(_0x1b41bd,_0x4fa1cd){const _0x1dc85e=function(_0x485c48){while(--_0x485c48){_0x1b41bd['push'](_0x1b41bd['shift']());}};_0x1dc85e(++_0x4fa1cd);}(a257_0x4fa1,0x127));const a257_0x1dc8=function(_0x1b41bd,_0x4fa1cd){_0x1b41bd=_0x1b41bd-0x0;let _0x1dc85e=a257_0x4fa1[_0x1b41bd];return _0x1dc85e;};const _0x56c31f=a257_0x1dc8;'use strict';const _=require(_0x56c31f('0x1')),db=require(_0x56c31f('0x6'))['db'],logger=require('../../config/logger')(_0x56c31f('0x4'));exports[_0x56c31f('0x7')]=function(_0x485c48){const _0x61cfe=this;return new Promise(function(_0xca7d25,_0x27ea28){const _0x55e095=a257_0x1dc8;return db['FreshdeskAccount'][_0x55e095('0xa')]({'raw':_0x485c48[_0x55e095('0x5')]?_0x485c48['options']['raw']===undefined?!![]:![]:!![],'where':_0x485c48[_0x55e095('0x5')]?_0x485c48['options'][_0x55e095('0xf')]||null:null,'attributes':_0x485c48[_0x55e095('0x5')]?_0x485c48['options'][_0x55e095('0x0')]||null:null,'limit':_0x485c48['options']?_0x485c48[_0x55e095('0x5')][_0x55e095('0xc')]||null:null,'include':_0x485c48[_0x55e095('0x5')]?_0x485c48['options'][_0x55e095('0xd')]?_[_0x55e095('0x2')](_0x485c48[_0x55e095('0x5')]['include'],function(_0x18dcd6){const _0x393bf8=_0x55e095;return{'model':db[_0x18dcd6['model']],'as':_0x18dcd6['as'],'attributes':_0x18dcd6[_0x393bf8('0x0')],'include':_0x18dcd6[_0x393bf8('0xd')]?_['map'](_0x18dcd6['include'],function(_0x3f6046){const _0x315527=_0x393bf8;return{'model':db[_0x3f6046[_0x315527('0x8')]],'as':_0x3f6046['as'],'attributes':_0x3f6046[_0x315527('0x0')],'include':_0x3f6046[_0x315527('0xd')]?_[_0x315527('0x2')](_0x3f6046[_0x315527('0xd')],function(_0x4e1e3f){const _0xebeda8=_0x315527;return{'model':db[_0x4e1e3f[_0xebeda8('0x8')]],'as':_0x4e1e3f['as'],'attributes':_0x4e1e3f[_0xebeda8('0x0')]};}):[]};}):[]};}):[]:[]})[_0x55e095('0xb')](function(_0x4e3388){const _0x1aa0e8=_0x55e095;logger[_0x1aa0e8('0x15')](_0x1aa0e8('0x7'),_0x485c48),logger[_0x1aa0e8('0x12')](_0x1aa0e8('0x7'),_0x485c48,JSON['stringify'](_0x4e3388)),_0xca7d25(_0x4e3388);})[_0x55e095('0x16')](function(_0x9a9db5){const _0x57fc37=_0x55e095;logger[_0x57fc37('0x14')]('GetFreshdeskAccount',_0x9a9db5[_0x57fc37('0x9')],_0x485c48),_0x27ea28(_0x61cfe[_0x57fc37('0x14')](0x1f4,_0x9a9db5[_0x57fc37('0x9')]));});});},exports['ShowFreshdeskAccount']=function(_0x5752a8){const _0x1494e4=this;return new Promise(function(_0x3b82af,_0x2ee7a4){const _0x3dd12d=a257_0x1dc8;return db[_0x3dd12d('0xe')][_0x3dd12d('0x3')]({'raw':_0x5752a8[_0x3dd12d('0x5')]?_0x5752a8[_0x3dd12d('0x5')][_0x3dd12d('0x13')]===undefined?!![]:![]:!![],'where':_0x5752a8[_0x3dd12d('0x5')]?_0x5752a8[_0x3dd12d('0x5')][_0x3dd12d('0xf')]||null:null,'attributes':_0x5752a8[_0x3dd12d('0x5')]?_0x5752a8[_0x3dd12d('0x5')][_0x3dd12d('0x0')]||null:null,'include':_0x5752a8[_0x3dd12d('0x5')]?_0x5752a8[_0x3dd12d('0x5')][_0x3dd12d('0xd')]?_[_0x3dd12d('0x2')](_0x5752a8[_0x3dd12d('0x5')]['include'],function(_0x27ca8d){const _0x56ca89=_0x3dd12d;return{'model':db[_0x27ca8d['model']],'as':_0x27ca8d['as'],'attributes':_0x27ca8d[_0x56ca89('0x0')],'include':_0x27ca8d['include']?_[_0x56ca89('0x2')](_0x27ca8d[_0x56ca89('0xd')],function(_0x5215a0){const _0x3c6685=_0x56ca89;return{'model':db[_0x5215a0[_0x3c6685('0x8')]],'as':_0x5215a0['as'],'attributes':_0x5215a0[_0x3c6685('0x0')],'include':_0x5215a0[_0x3c6685('0xd')]?_['map'](_0x5215a0[_0x3c6685('0xd')],function(_0xc2bd62){const _0x17a3bb=_0x3c6685;return{'model':db[_0xc2bd62[_0x17a3bb('0x8')]],'as':_0xc2bd62['as'],'attributes':_0xc2bd62['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x5e3bdb){const _0x587166=_0x3dd12d;logger['info'](_0x587166('0x10'),_0x5752a8),logger['debug'](_0x587166('0x10'),_0x5752a8,JSON[_0x587166('0x11')](_0x5e3bdb)),_0x3b82af(_0x5e3bdb);})[_0x3dd12d('0x16')](function(_0x3545b9){const _0x45f8a6=_0x3dd12d;logger['error']('ShowFreshdeskAccount',_0x3545b9['message'],_0x5752a8),_0x2ee7a4(_0x1494e4[_0x45f8a6('0x14')](0x1f4,_0x3545b9[_0x45f8a6('0x9')]));});});};