Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / api / intFreshdeskAccount / intFreshdeskAccount.rpc.js
1 const a257_0x1163=['debug','error','where','raw','findAll','model','then','attributes','message','stringify','info','findOne','GetFreshdeskAccount','ShowFreshdeskAccount','options','limit','map','FreshdeskAccount','../../config/logger','../../mysqldb','catch','include','rpc','lodash'];(function(_0x522cdc,_0x1163c6){const _0x143e8e=function(_0x823015){while(--_0x823015){_0x522cdc['push'](_0x522cdc['shift']());}};_0x143e8e(++_0x1163c6);}(a257_0x1163,0x100));const a257_0x143e=function(_0x522cdc,_0x1163c6){_0x522cdc=_0x522cdc-0x0;let _0x143e8e=a257_0x1163[_0x522cdc];return _0x143e8e;};const _0x146927=a257_0x143e;'use strict';const _=require(_0x146927('0x7')),db=require(_0x146927('0x3'))['db'],logger=require(_0x146927('0x2'))(_0x146927('0x6'));exports[_0x146927('0x14')]=function(_0x823015){const _0x599bc1=this;return new Promise(function(_0x1c2165,_0x10e36b){const _0x124521=a257_0x143e;return db[_0x124521('0x1')][_0x124521('0xc')]({'raw':_0x823015['options']?_0x823015[_0x124521('0x16')][_0x124521('0xb')]===undefined?!![]:![]:!![],'where':_0x823015['options']?_0x823015[_0x124521('0x16')][_0x124521('0xa')]||null:null,'attributes':_0x823015[_0x124521('0x16')]?_0x823015[_0x124521('0x16')][_0x124521('0xf')]||null:null,'limit':_0x823015[_0x124521('0x16')]?_0x823015[_0x124521('0x16')][_0x124521('0x17')]||null:null,'include':_0x823015[_0x124521('0x16')]?_0x823015[_0x124521('0x16')][_0x124521('0x5')]?_[_0x124521('0x0')](_0x823015[_0x124521('0x16')]['include'],function(_0x95659e){const _0x296833=_0x124521;return{'model':db[_0x95659e[_0x296833('0xd')]],'as':_0x95659e['as'],'attributes':_0x95659e[_0x296833('0xf')],'include':_0x95659e[_0x296833('0x5')]?_[_0x296833('0x0')](_0x95659e[_0x296833('0x5')],function(_0x8f7771){const _0x234914=_0x296833;return{'model':db[_0x8f7771[_0x234914('0xd')]],'as':_0x8f7771['as'],'attributes':_0x8f7771[_0x234914('0xf')],'include':_0x8f7771['include']?_[_0x234914('0x0')](_0x8f7771[_0x234914('0x5')],function(_0x500adc){return{'model':db[_0x500adc['model']],'as':_0x500adc['as'],'attributes':_0x500adc['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x11635d){const _0x4b8395=_0x124521;logger[_0x4b8395('0x12')](_0x4b8395('0x14'),_0x823015),logger['debug']('GetFreshdeskAccount',_0x823015,JSON[_0x4b8395('0x11')](_0x11635d)),_0x1c2165(_0x11635d);})[_0x124521('0x4')](function(_0x4286e7){const _0x57d808=_0x124521;logger['error'](_0x57d808('0x14'),_0x4286e7['message'],_0x823015),_0x10e36b(_0x599bc1['error'](0x1f4,_0x4286e7['message']));});});},exports[_0x146927('0x15')]=function(_0x366a49){const _0x3a118f=this;return new Promise(function(_0x5c1cbf,_0x570d61){const _0x374b46=a257_0x143e;return db[_0x374b46('0x1')][_0x374b46('0x13')]({'raw':_0x366a49[_0x374b46('0x16')]?_0x366a49[_0x374b46('0x16')][_0x374b46('0xb')]===undefined?!![]:![]:!![],'where':_0x366a49[_0x374b46('0x16')]?_0x366a49[_0x374b46('0x16')][_0x374b46('0xa')]||null:null,'attributes':_0x366a49[_0x374b46('0x16')]?_0x366a49['options']['attributes']||null:null,'include':_0x366a49[_0x374b46('0x16')]?_0x366a49['options'][_0x374b46('0x5')]?_[_0x374b46('0x0')](_0x366a49[_0x374b46('0x16')]['include'],function(_0x5b1589){const _0x9199e6=_0x374b46;return{'model':db[_0x5b1589[_0x9199e6('0xd')]],'as':_0x5b1589['as'],'attributes':_0x5b1589[_0x9199e6('0xf')],'include':_0x5b1589[_0x9199e6('0x5')]?_[_0x9199e6('0x0')](_0x5b1589[_0x9199e6('0x5')],function(_0x1d0a32){const _0x495b1c=_0x9199e6;return{'model':db[_0x1d0a32[_0x495b1c('0xd')]],'as':_0x1d0a32['as'],'attributes':_0x1d0a32['attributes'],'include':_0x1d0a32[_0x495b1c('0x5')]?_[_0x495b1c('0x0')](_0x1d0a32['include'],function(_0x11598b){const _0x325ce1=_0x495b1c;return{'model':db[_0x11598b[_0x325ce1('0xd')]],'as':_0x11598b['as'],'attributes':_0x11598b['attributes']};}):[]};}):[]};}):[]:[]})[_0x374b46('0xe')](function(_0x234cbf){const _0x30e196=_0x374b46;logger[_0x30e196('0x12')]('ShowFreshdeskAccount',_0x366a49),logger[_0x30e196('0x8')](_0x30e196('0x15'),_0x366a49,JSON[_0x30e196('0x11')](_0x234cbf)),_0x5c1cbf(_0x234cbf);})['catch'](function(_0x3d078c){const _0x2c6a33=_0x374b46;logger[_0x2c6a33('0x9')](_0x2c6a33('0x15'),_0x3d078c[_0x2c6a33('0x10')],_0x366a49),_0x570d61(_0x3a118f[_0x2c6a33('0x9')](0x1f4,_0x3d078c['message']));});});};