Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / api / voiceQueueReport / voiceQueueReport.rpc.js
1 const a763_0x433c=['then','model','../../rediscache','body','info','UpdateVoiceQueueReport','stringify','include','options','CreateVoiceQueueReport','create','error','../../mysqldb','../../config/logger','./voiceQueueReport.socket','where','limit','raw','register','debug','message','GetVoiceQueueReport','catch','attributes','VoiceQueueReport','lodash','findAll','map'];(function(_0x107c04,_0x433cf9){const _0x329bc8=function(_0x1669af){while(--_0x1669af){_0x107c04['push'](_0x107c04['shift']());}};_0x329bc8(++_0x433cf9);}(a763_0x433c,0x110));const a763_0x329b=function(_0x107c04,_0x433cf9){_0x107c04=_0x107c04-0x0;let _0x329bc8=a763_0x433c[_0x107c04];return _0x329bc8;};const _0x59e2c4=a763_0x329b;'use strict';const _=require(_0x59e2c4('0x5')),db=require(_0x59e2c4('0x14'))['db'],logger=require(_0x59e2c4('0x15'))('rpc'),{getSocket}=require(_0x59e2c4('0xa')),socket=getSocket();require(_0x59e2c4('0x16'))[_0x59e2c4('0x1a')](socket),exports[_0x59e2c4('0x1')]=function(_0x1669af){const _0x1fd96f=this;return new Promise(function(_0x30e6d4,_0x42fe24){const _0x4d4db3=a763_0x329b;return db[_0x4d4db3('0x4')][_0x4d4db3('0x6')]({'raw':_0x1669af[_0x4d4db3('0x10')]?_0x1669af['options']['raw']===undefined?!![]:![]:!![],'where':_0x1669af[_0x4d4db3('0x10')]?_0x1669af[_0x4d4db3('0x10')][_0x4d4db3('0x17')]||null:null,'attributes':_0x1669af[_0x4d4db3('0x10')]?_0x1669af[_0x4d4db3('0x10')]['attributes']||null:null,'limit':_0x1669af[_0x4d4db3('0x10')]?_0x1669af[_0x4d4db3('0x10')][_0x4d4db3('0x18')]||null:null,'include':_0x1669af[_0x4d4db3('0x10')]?_0x1669af[_0x4d4db3('0x10')][_0x4d4db3('0xf')]?_['map'](_0x1669af[_0x4d4db3('0x10')][_0x4d4db3('0xf')],function(_0x477223){const _0x1c64d2=_0x4d4db3;return{'model':db[_0x477223[_0x1c64d2('0x9')]],'as':_0x477223['as'],'attributes':_0x477223[_0x1c64d2('0x3')],'include':_0x477223[_0x1c64d2('0xf')]?_[_0x1c64d2('0x7')](_0x477223[_0x1c64d2('0xf')],function(_0x4a6353){const _0x429ce5=_0x1c64d2;return{'model':db[_0x4a6353[_0x429ce5('0x9')]],'as':_0x4a6353['as'],'attributes':_0x4a6353[_0x429ce5('0x3')],'include':_0x4a6353[_0x429ce5('0xf')]?_[_0x429ce5('0x7')](_0x4a6353[_0x429ce5('0xf')],function(_0x42ef02){const _0x52777c=_0x429ce5;return{'model':db[_0x42ef02[_0x52777c('0x9')]],'as':_0x42ef02['as'],'attributes':_0x42ef02['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x5ec2b0){const _0x4d0d19=_0x4d4db3;logger[_0x4d0d19('0xc')](_0x4d0d19('0x1'),_0x1669af),logger[_0x4d0d19('0x1b')](_0x4d0d19('0x1'),_0x1669af,JSON[_0x4d0d19('0xe')](_0x5ec2b0)),_0x30e6d4(_0x5ec2b0);})[_0x4d4db3('0x2')](function(_0x39e5a3){const _0x35281f=_0x4d4db3;logger['error'](_0x35281f('0x1'),_0x39e5a3[_0x35281f('0x0')],_0x1669af),_0x42fe24(_0x1fd96f[_0x35281f('0x13')](0x1f4,_0x39e5a3['message']));});});},exports[_0x59e2c4('0x11')]=function(_0x26cd04){const _0x4f3c2c=this;return new Promise(function(_0x2978c8,_0x2fc884){const _0x122a15=a763_0x329b;return db[_0x122a15('0x4')][_0x122a15('0x12')](_0x26cd04[_0x122a15('0xb')],{'raw':_0x26cd04[_0x122a15('0x10')]?_0x26cd04[_0x122a15('0x10')][_0x122a15('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x2c2865){const _0x35909b=_0x122a15;logger['info'](_0x35909b('0x11'),_0x26cd04),logger[_0x35909b('0x1b')](_0x35909b('0x11'),_0x26cd04,JSON[_0x35909b('0xe')](_0x2c2865)),_0x2978c8(_0x2c2865);})[_0x122a15('0x2')](function(_0x367718){const _0x4a0f71=_0x122a15;logger[_0x4a0f71('0x13')]('CreateVoiceQueueReport',_0x367718[_0x4a0f71('0x0')],_0x26cd04),_0x2fc884(_0x4f3c2c[_0x4a0f71('0x13')](0x1f4,_0x367718[_0x4a0f71('0x0')]));});});},exports['UpdateVoiceQueueReport']=function(_0x18830a){const _0x1d3b90=this;return new Promise(function(_0x5ecfd0,_0xce28c1){const _0x254c0b=a763_0x329b;return db['VoiceQueueReport']['update'](_0x18830a['body'],{'raw':_0x18830a['options']?_0x18830a[_0x254c0b('0x10')][_0x254c0b('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x18830a['options']?_0x18830a[_0x254c0b('0x10')][_0x254c0b('0x17')]||null:null,'attributes':_0x18830a[_0x254c0b('0x10')]?_0x18830a[_0x254c0b('0x10')][_0x254c0b('0x3')]||null:null,'limit':_0x18830a['options']?_0x18830a[_0x254c0b('0x10')]['limit']||null:null})[_0x254c0b('0x8')](function(_0x1a0ffc){const _0x4a225f=_0x254c0b;logger['info'](_0x4a225f('0xd'),_0x18830a),logger[_0x4a225f('0x1b')](_0x4a225f('0xd'),_0x18830a,JSON[_0x4a225f('0xe')](_0x1a0ffc)),_0x5ecfd0(_0x1a0ffc);})[_0x254c0b('0x2')](function(_0x58ab12){const _0x457110=_0x254c0b;logger['error']('UpdateVoiceQueueReport',_0x58ab12[_0x457110('0x0')],_0x18830a),_0xce28c1(_0x1d3b90[_0x457110('0x13')](0x1f4,_0x58ab12[_0x457110('0x0')]));});});};